This is a test version of Biostars. For the public version, visit https://www.biostars.org.
A question about reference genome for creating the consensus sequence

Hi, I wonder how the samtools consensus work without explicitly pointing out the reference genome. If I intend to add a reference genome to generate the consensus sequence, is it possible based on samtools? Thanks a lot.

Reference: https://www.htslib.org/doc/samtools-consensus.html

fasta fa cram genome

1 answer

It is the consensus for all reads that overlap a given base, it's not a genome consensus unless your reads cover the entire genome.

Hi, yes, my cram files cover the whole genome, which is actually individual genome information. I wonder how to adjust the base genome. Thanks.

You aligned your data, that is your reference genome to compare against. If you want to change reference then realign.

Hi, thanks for your information. I am a bit confused now. Does this mean the cram file already contained reference genome information? I intend to generate a new fasta file based on the cram file, so that means I only need to consider the consensu sequence. Is it correct? Thanks.

Log in to answer this question.