Skip to content
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

Error encounterd querying alignments #1305

Closed
Yijun-Tian opened this issue Mar 23, 2023 · 5 comments
Closed

Error encounterd querying alignments #1305

Yijun-Tian opened this issue Mar 23, 2023 · 5 comments
Assignees
Milestone

Comments

@Yijun-Tian
Copy link

Hello IGV creator,

I want to load some single-cell RNA-seq BAM file to igv (linux 2.16.0, with carryon java), and after drag and release, the coverage, junctions and the alignment panel showed up correctly. But when I picked a specific gene, and click "go", a dialogue box appears says:
"Error encountered querying alignments: java.lang.StringIndexOutOfBoundsException: String index out of range: 1"
After click the OK, some alignments can show up, but I am not sure if the demonstration are error free.
I have switch the machine, but both centos and ubuntu showed the same error.

Below is the igv.log when error box jumps:
INFO [Mar 23,2023 13:27] [CommandListener] Listening on port 60151 INFO [Mar 23,2023 13:27] [GenomeManager] Loading genome: /home/user/igv/genomes/hg38.json INFO [Mar 23,2023 13:27] [TrackLoader] Loading resource: https://s3.amazonaws.com/igv.org.genomes/hg38/ncbiRefSeq.txt.gz INFO [Mar 23,2023 13:27] [TrackLoader] Loading resource: /mnt/raid0/Yijun_Tian/ATAC_GEX/multiome_GEX/22Rv1D.exonic.bam SEVERE [Mar 23,2023 13:27] [AlignmentTileLoader] Error loading alignment data SEVERE [Mar 23,2023 13:27] [AlignmentTileLoader] java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.base/java.lang.StringLatin1.charAt(Unknown Source) at java.base/java.lang.String.charAt(Unknown Source) at org.igv/org.broad.igv.sam.mods.BaseModificationUtils.getBaseModificationSets(BaseModificationUtils.java:76) at org.igv/org.broad.igv.sam.SAMAlignment.getBaseModificationSets(SAMAlignment.java:338) at org.igv/org.broad.igv.sam.mods.BaseModificationCounts.incrementCounts(BaseModificationCounts.java:81) at org.igv/org.broad.igv.sam.BaseAlignmentCounts.incCounts(BaseAlignmentCounts.java:132) at org.igv/org.broad.igv.sam.AlignmentTileLoader$AlignmentTile.addRecord(AlignmentTileLoader.java:494) at org.igv/org.broad.igv.sam.AlignmentTileLoader.loadTile(AlignmentTileLoader.java:245) at org.igv/org.broad.igv.sam.AlignmentDataManager.loadInterval(AlignmentDataManager.java:391) at org.igv/org.broad.igv.sam.AlignmentDataManager.load(AlignmentDataManager.java:338) at org.igv/org.broad.igv.sam.CoverageTrack.load(CoverageTrack.java:186) at org.igv/org.broad.igv.ui.IGV.lambda$repaint$16(IGV.java:2267) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

I also attached a bam file to reproduce this error, you may try jump to "chr1:165,905-165,944" to meet the error.
error.zip

Thanks,
Yijun

@jrobinso jrobinso self-assigned this Mar 23, 2023
@jrobinso jrobinso added this to the 2.17.0 milestone Mar 23, 2023
@jrobinso
Copy link
Contributor

The error is caused by the presence of an "MM" tag in the alignment records. "MM" is a reserved tag for base modifications (see section 1.7 here): https://samtools.github.io/hts-specs/SAMtags.pdf. The use in this file is for something else, it does not conform to the expected pattern. Do you know what "MM" is used for here, and also what software produced this file?

@Yijun-Tian
Copy link
Author

Thanks for the sharp comment! The BAM is generated from cellranger-arc, and they do have a MM tag listed in this documentation:
https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/pipelines/latest/output/bam-gex

Could IGV recognize the tag type, too, before parsing the base modification info? The 10x MM tag type is an integer and the base modification is a string. What a coincidence.

@jrobinso
Copy link
Contributor

jrobinso commented Mar 23, 2023

Thanks for bringing that to my attention. I don't think this is a legal use for MM, and 10X should fix it, but since these files are being produced I will see what I can do to support it.

@jkbonfield Thoughts on this 10X use of "MM"? My understanding was all cap tags are reserved. Its a conundrum if MM can mean anything. In this specific case I can recognize it by type.

https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/pipelines/latest/output/bam-gex

@jkbonfield
Copy link

I can confirm this tag breaks the SAM specification. There are many more choices of private user-space tags than there are reserved tags, so it's disappointing when people use the reserved tags for their own purposes.

This is something to raise with the 10x genomics support. They need to fix their software.

@Yijun-Tian
Copy link
Author

Yijun-Tian commented Mar 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants