SNP Files to VCF files in terminal window
0
0
Entering edit mode
5.7 years ago
Sa • 0

Hi,

I am using MacOS, and I am having a bit of trouble in viewing a few germline SNP files that I have.

First, I was wondering if there is any way to view an .SNP file in the terminal window. If not, is there any way for me to convert a .SNP file to a .VCF file?

Also, an unrelated question, how can I open files from my VPN connection in my finder? This will really help me a lot in visualization and make the transferring of files less troublesome.

Thank you so much for your help in advance!

SNP VCF Terminal genome RNA-Seq • 2.3k views
ADD COMMENT
0
Entering edit mode

What is an .snp file? What tool did you use to create it?

Have you tried head <filename> or less -S <filename>? That would work for most plain text files.

A VPN connection only changes how you access the Internet (or any network). Unless a file is available to be downloaded, you cannot use Finder to open it.

ADD REPLY
0
Entering edit mode

Thank you for your reply!

Sorry it is a .snps file. I am not sure how they were generated as I was not the one who generated them. However, they contain RNA-Seq (germline) samples and the SNPs that occur on the chromosomes.

I have tried those commands; however, those didn't work as the file I have isn't a traditional file I believe. I just wasn't certain about what this file format is even. And I thought someone might have seen it here.

Thank you for clarifying my doubts about VPN usage. I will manage.

ADD REPLY
0
Entering edit mode

What about zcat <filename> | head?

ADD REPLY
0
Entering edit mode

Use type <filename> or file <filename> and try Googling the output of those commands.

ADD REPLY
0
Entering edit mode

Hi, Thank you so much for your guys' help!! I really appreciate it.

Actually, I was just told that these .snps files are just VCF files in a slightly different layout. Is there anyway for me to open this VCF file from the terminal or to view it in the terminal?

Thanks

ADD REPLY
0
Entering edit mode

Yes, Use less -S <filename>. Google "view plain text file on terminal" to get more tools.

ADD REPLY
0
Entering edit mode

I keep on receiving this error when I type less -S <snpcalls.snps> -bash: syntax error near unexpected token `newline'

Would you know why?

ADD REPLY
0
Entering edit mode

Your command should be less -S snpcalls.snps. The symbols < and > are used to wrap arguments as an indicator that you should substitute appropriately there, they are not to be used as part of the command.

If you Googled "bash syntax error near unexpected token newline", the first StackOverflow link gives this answer: https://stackoverflow.com/questions/5134399/bash-syntax-error-near-unexpected-token-newline

Google is your best friend for tech errors :-)

ADD REPLY

Login before adding your answer.

Traffic: 2412 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6