This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get consensus fastq file without IUPAC codes using vcfutils?

The only code that appears to work for me when I want to generate consensus sequences have been:

samtools mpileup -Q 20 -q 20 -d 5000 -uf ref.fa sorted.bam | bcftools call -c | vcfutils.pl vcf2fq -d 10 -Q 20 -l 1 > consensus_output.fq

However, I don't need ambiguity and almost every spot in the alignment across my samples have ambuiguous data but I want it to just give me the top called base. Even if it was 50/50 between two bases I need it to just give me one or the other. Anyway to insert this into the line of code above?

Literally has been the only code that worked on my data using samtools and bcftools v 1.8. I'm not even using the -i option which says to use IUPAC so why am I getting it???

Thanks!

bcftools samtools consensus

Tried it but it didn't work no output consensus file would even be created for me to check. It definitely runs (no weird errors pop up) and something happens but it does not give me the output. I didn't understand how to use mosdepth, it seemed like I would have to relearn quite a bit when I was at the final step of bcftools.

Hello DNAngel!

We believe that this post does not fit the main topic of this site.

This seems to be the same problem you have in Confused about how to generate a consensus sequence after bwa. Please post there if something is still unclear or doesn't work.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

I can create consensus sequences now, I just cannot get them to not include IUPAC codes so I do think they are different questions.

0 answers

No answers yet.

Log in to answer this question.