How to create consensus from bam file without IUPAC code?
1
0
Entering edit mode
5.2 years ago

Hello,

I am working in Genome assembly(Reference Guided), I want to create consensus sequence from bam file.I tried bcftools and vcf-consensus. But, I got some IUPAC code. I want consensus sequence without IUPAC Code.

Reads:

ATGCATGCATGC

ATGCGTGCATGC

ATGCATGCATGC

Consensus: ATGCRTGCATGC

I want to create like this:

ATGCATGCATGC

Please suggest any tool or software. Thanks in advance.

genome sequence Assembly • 2.6k views
ADD COMMENT
2
Entering edit mode

Can't you write a bit of code to "resolve" these ambiguous nucleotides, and randomly chose one of the options? It's obviously not fully correct, but what do you think is the best for a heterozygous variant?

ADD REPLY
0
Entering edit mode

Did you find out how to create the consensus sequences without IUPAC codes? I'm having the same problem using samtools and bcftools.

ADD REPLY
1
Entering edit mode
5.2 years ago
Tm ★ 1.1k

Suresh,

Before converting IUPAC ambiguity base symbols to regular bases, I would suggest you to go through the below mentioned post and understand its relation with ploidy.

Questions Regarding Consensus Sequence Calling With Samtools / Bcftools / Vcfutils.Pl

However, if you are still interested in doing it, then kindly check the weblink:

https://genomicislands.wordpress.com/2014/06/27/converting-ambiguity-codes-in-fasta-files/

Where a person has provided a simple python code to randomly convert ambiguity codes in a FASTA file i.e given a consensus fasta, it randomly choose one of the segregating alleles based on the ambiguity codes. This is very much similar to what WouterDeCoster has mentioned in his comment above.

note: I have not tried this python script myself.

ADD COMMENT

Login before adding your answer.

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