This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SNP Files to VCF files in terminal window

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

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.

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.

What about zcat <filename> | head?

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

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

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

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

Would you know why?

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 :-)

0 answers

No answers yet.

Log in to answer this question.