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

FromKnowns consensus generator fails if no reads overlap a consensus #1362

Closed
fnothaft opened this issue Jan 21, 2017 · 0 comments
Closed

FromKnowns consensus generator fails if no reads overlap a consensus #1362

fnothaft opened this issue Jan 21, 2017 · 0 comments
Assignees
Labels
bug
Milestone

Comments

@fnothaft
Copy link
Member

@fnothaft fnothaft commented Jan 21, 2017

This happens because we call a .min on an empty collection:

  org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 8.0 failed 1 times, most recent failure: Lost task 0.0 in stage 8.0 (TID 28, localhost): java.lang.UnsupportedOperationException: empty.min
	at scala.collection.TraversableOnce$class.min(TraversableOnce.scala:209)
	at scala.collection.AbstractTraversable.min(Traversable.scala:105)
	at org.bdgenomics.adam.algorithms.consensus.ConsensusGeneratorFromKnowns.findConsensus(ConsensusGeneratorFromKnowns.scala:82)
	at org.bdgenomics.adam.rdd.read.realignment.RealignIndels$$anonfun$realignTargetGroup$1.apply(RealignIndels.scala:260)
	at org.bdgenomics.adam.rdd.read.realignment.RealignIndels$$anonfun$realignTargetGroup$1.apply(RealignIndels.scala:240)
	at scala.Option.fold(Option.scala:157)
	at org.apache.spark.rdd.Timer.time(Timer.scala:48)
	at org.bdgenomics.adam.rdd.read.realignment.RealignIndels.realignTargetGroup(RealignIndels.scala:240)
	at org.bdgenomics.adam.rdd.read.realignment.RealignIndels$$anonfun$realignIndels$1.apply(RealignIndels.scala:498)
	at org.bdgenomics.adam.rdd.read.realignment.RealignIndels$$anonfun$realignIndels$1.apply(RealignIndels.scala:498)
@fnothaft fnothaft added the bug label Jan 21, 2017
@fnothaft fnothaft added this to the 0.21.1 milestone Jan 21, 2017
@fnothaft fnothaft self-assigned this Jan 21, 2017
fnothaft added a commit to fnothaft/adam that referenced this issue Jan 23, 2017
… reads hit a target.

Fixes bigdatagenomics#1362:

* Adding ConsensusGeneratorFromKnownsSuite.
* ConsensusGeneratorFromKnowns drops any targets that did not get hit with any
  reads, instead of trying to identify the full reference region overlapped by
  reads. While this case (target with no reads) cannot happen in the FromReads
  consensus model, it can happen in the FromKnowns model (e.g., use all known
  INDELs from 1000G with a WES dataset).
* Additionally, tracked down a minor off by one bug in RealignIndels that caused
  one index in the consensus sequence to not get tested. This could cause reads
  that aligned to the end of the target to not get realigned.
* To improve legibility, broke up a set of long lines in RealignIndels.
heuermh added a commit that referenced this issue Jan 23, 2017
… reads hit a target.

Fixes #1362:

* Adding ConsensusGeneratorFromKnownsSuite.
* ConsensusGeneratorFromKnowns drops any targets that did not get hit with any
  reads, instead of trying to identify the full reference region overlapped by
  reads. While this case (target with no reads) cannot happen in the FromReads
  consensus model, it can happen in the FromKnowns model (e.g., use all known
  INDELs from 1000G with a WES dataset).
* Additionally, tracked down a minor off by one bug in RealignIndels that caused
  one index in the consensus sequence to not get tested. This could cause reads
  that aligned to the end of the target to not get realigned.
* To improve legibility, broke up a set of long lines in RealignIndels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.