This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to create a multifasta file from miltisample vcf file?

Hi everyone. I'd like to create a new fasta file containing all sequences for which I called variants in a vcf file. I can only get one sequence, but I would like to rebuild the sequence for all my samples. I know I can do it individually, but is there any tool to do it for all my samples at once? Thank you very much!

snp sequencing rna-seq alignment

How about a simple iteration of vcf-consensus -s <sample_name> . The new version also gives an option to use IUPAC ambiguity codes for hetrozygotes or no-calls.

1 answer

Thank you very much! This is what I actually did, one by one within an iteration. But it is a long pipeline (split the vcf into individual files, bzip, tabix, then vcf-consensus for each one and finally cat all fasta in one file). Also, I end up with many unuseful (intermediate) files (I'm analyzing 48 samples). The vcf to MAF maybe can help.

Log in to answer this question.