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

Can't merge BAM files containing the same sample #1663

Closed
fnothaft opened this issue Aug 10, 2017 · 1 comment
Closed

Can't merge BAM files containing the same sample #1663

fnothaft opened this issue Aug 10, 2017 · 1 comment
Assignees
Labels
bug
Milestone

Comments

@fnothaft
Copy link
Member

@fnothaft fnothaft commented Aug 10, 2017

We outlawed this in our glob loader code. However, this comes up if you want to do something like load in BAM files that are split out by sample. I had a benchmarking workflow where I had split a single aligned dataset into a single file per chromosome for debug, and got this on load:

User class threw exception: java.lang.IllegalArgumentException: requirement failed: Read group dictionary contains multiple samples with identical read group names.
java.lang.IllegalArgumentException: requirement failed: Read group dictionary contains multiple samples with identical read group names.
	at scala.Predef$.require(Predef.scala:233)
	at org.bdgenomics.adam.models.RecordGroupDictionary.<init>(RecordGroupDictionary.scala:85)
	at org.bdgenomics.adam.models.RecordGroupDictionary.$plus$plus(RecordGroupDictionary.scala:97)
	at org.bdgenomics.adam.rdd.ADAMContext$$anonfun$loadBam$1$$anonfun$13.apply(ADAMContext.scala:1485)
	at org.bdgenomics.adam.rdd.ADAMContext$$anonfun$loadBam$1$$anonfun$13.apply(ADAMContext.scala:1484)
@fnothaft fnothaft added the bug label Aug 10, 2017
@fnothaft fnothaft added this to the 0.23.0 milestone Aug 10, 2017
@fnothaft fnothaft self-assigned this Aug 10, 2017
@heuermh
Copy link
Member

@heuermh heuermh commented Aug 10, 2017

I may have mentioned this before, but I ran into the other case, where I have BAM files for 450 samples that all re-use the same read group names. I didn't come up with a good way to handle this. While including all reads from all samples in the same RDD perhaps doesn't make a lot of sense, including reads overlapping a region of interest across all samples certainly does.

fnothaft added a commit to fnothaft/adam that referenced this issue Aug 11, 2017
Resolves bigdatagenomics#1663. When unioning two read groups together, calls distinct after
appending the two RecordGroupDictionaries.
heuermh added a commit that referenced this issue Aug 15, 2017
Resolves #1663. When unioning two read groups together, calls distinct after
appending the two RecordGroupDictionaries.
@heuermh heuermh added this to Completed in Release 0.23.0 Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.