FASTA file header
0
0
Entering edit mode
3.5 years ago
storm1907 ▴ 30

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 • 871 views
ADD COMMENT
0
Entering edit mode

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

Can you show an example of your expected output?

ADD REPLY
0
Entering edit mode

It takes sample name from the vcf file

sample_name nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn

ADD REPLY

Login before adding your answer.

Traffic: 1679 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