This is a test version of Biostars. For the public version, visit https://www.biostars.org.
FASTA file header

Hello, I am trying to convert my vcf files to fasta. However, after aligning to reference, vcf ID from the header disappears, and bcftools/vcftools are writing only reference seq name in file header. Like > NC_xxxx.1

Any ideas?

I run consensus script like

for file in $inpath/*.vcf ;
do
        echo $file
        bname=$(basename $file)
        echo "base name is $bname"
        bfile=$inpath/$bname".gz"
        outfile=$outpath/$bname".fasta"
        bgzip -c $file > $bfile
        tabix -p vcf $bfile
        cat $reference | vcf-consensus $bfile > $outfile

done
consensus

However, after aligning to reference, vcf ID from the header disappears,

Can you show an example of your expected output?

It takes sample name from the vcf file

sample_name nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

0 answers

No answers yet.

Log in to answer this question.