BAM file's reference sequence IDs doesnt match contigs ID's
1
0
Entering edit mode
3.1 years ago

Hello I have been experiencing some issues while using binning tools, on the coverage estimation modules of the binning tools I have got 0% of coverage and the reason seems to be that BAM file's contigs IDs are not the same that the contigs IDs of my contigs.fasta file.

Here are the contigs IDs on my bam files:

K00171:838:H25L5BBXX:6:1202:15179:21957 163    k119_248961
K00171:838:H25L5BBXX:6:2102:14174:7767  163     k119_248961
..
..

and here are the contigs.fasta file's contigs IDs:

>c_000000000001
>c_000000000002
>c_000000000003
..
..

How can I deal with this? Is there a option when using samtools that I can use to cope with this (or any tool option)?

metagenomics alignment bam • 1.4k views
ADD COMMENT
1
Entering edit mode
3.1 years ago
GenoMax 141k

If you aligned your data to right set of reference sequences then those fasta headers would be in your BAM. You should re-map your data to correct reference.

ADD COMMENT
0
Entering edit mode

yes I aligned the reads to the correct reference sequences, getting 60-90% of alignment rate with bowtie2, I ran again the alignment and got th same results ): ( diffrent sequences IDs, the same that I described above).

what can be happening?, I made the assembly using megahit if that helps

ADD REPLY
0
Entering edit mode

If you need id's shown in contigs.fasta example above in your BAM file then you need to create an index with contigs.fasta file and then align your data to that index.

ADD REPLY
0
Entering edit mode

the problem was regarding to the alignment process using bowtie2, I reindexed my contigs and now I got the proper contigs names on my bam files :)

Thanks for answering.

ADD REPLY

Login before adding your answer.

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