Totally agree with Devon Ryan. Once we develop a good knowledge of grep, sed, awk and coreutils such as cat, tr and cut , data munging becomes a piece of delicious cake.
Hi All,
I want to do variant-effect prediction on SNP data from multiple individuals with the following format. SNPEff only accept vcf format. Does any other tool exist to accept this format or what is the best way to convert this format to vcf format?
chr1 21 C T 0.6629 N N N N N N T C,T N N C,T N N C,T N C,T N T T C,T N T N N C,T N N N N N N
chromosome, position, reference base, Alternative alleles, Alternative allele frequency, SNPs from multiple individuals (col 6-36)
Thanks,
RT
1 answer
Well, you could use the following to prepare things for VEP:
awk '{sub(/chr/,"",$1); print $1,$2,$2+length($3)-1,sprintf("%s/%s",$3,$4)}' your_file > your_file.reformatted
This would convert to a deprecated (but possibly still functional) SNPeff format:
cut -f 1,2,3,4 your_file > your_file.reformatted
You could convert things to VCF in a similar manner, if you really wanted. Note that these examples may not work for your entire dataset. In particular, the probably won't work for InDels, but I'll leave that as an exercise for you.
BTW, you'll find data munging to be a pretty core bioinformatics skill.
Log in to answer this question.
Hi,
What is this format called and what tool did you get this as output from?
In the title and tags you mention Ensembl's VEP, but in the actual question you mention SNPeff. So which do you want to convert things for? VEP accepts a pretty straight forward tab-separated format, so that's be pretty trivial to convert to.
Edit: In fact, SNPeff can accept a pretty similar tabular format to VEP.