New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The .bam file refers to a chromosome 'MT+' not present in the annotation (.gtf) file. #1545
Comments
Samtools is totally unaware of specifics of organism or reference sequences - it just uses the data presented to it in the header and binary file. If the header claims MT+ it's because that's what was given to the aligner. (I also recommend that you use the appropriate SQ header tags, such as DS description, UR and M5 fields to annotate references so there is clear data provenance, along with PG lines.) What you're seeing in those "marking up" lines isn't Samtools output. I suspect it's your conversion script. It looks like that has a baked in notion of which reference is used and isn't honouring what the sam header contains. It's possible you can rename references using Regardless, this looks to be a bug with something other than samtools itself, so closing the issue. |
This is definitely a You may be able to fix it by changing |
Hello samtools, |
Are you using the latest version of samtools and HTSlib? If not, please specify.
(run
samtools --version
)samtools 1.14
Please describe your environment.
uname -sr
on Linux/Mac OS orwmic os get Caption, Version
on Windows)Ubuntu 20.4 LTS
uname -m
on Linux/Mac OS orwmic os get OSArchitecture
on Windows)x86_64
gcc --version
orclang --version
)gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Please specify the steps taken to generate the issue, the command you are running and the relevant output.
Hello samtools,
Sorry for reporting this bug. It's a little complicated.
I'm using velocyto.py to convert bam file to loom file.
The bug is:
When samtools is making up chromosomes, it can make up chromosomes 1-22 well, but cannot make up chromosome MT (see below), resulting in no mitochondrial genes information in the final loom files.
Because the bam file is generated from fastq by aligning to the reference "chrM", so the mito chromosome name inside of bam is chrM. Checked by below.
Also the mito chromosome name inside of gene.gtf is chrM.
So we're thinking that the bug may be caused by samtools using 'chrMT' to search the mito chromosome inside of bam to do alignment? So no chrMT is founded, leading to no mito genes alignment. We're writing to confirm whether our understanding is right?
Thanks!
Best,
YJ
Here is the illustration of my description.
The text was updated successfully, but these errors were encountered: