Entering edit mode
4.1 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
Can you show an example of your expected output?
It takes sample name from the vcf file