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

Reverse complement negative strand reads in fastq output #737

Merged
merged 1 commit into from
Jul 23, 2015

Conversation

arahuja
Copy link
Contributor

@arahuja arahuja commented Jul 22, 2015

Fixes #736

This does slightly differ from Picard. AlignmentRecordConverter currently ignores the negative strand flag is the read is unmapped. That would result in the read not being reverse complemented when output. I've left as is and only compared with Picard on mapped reads.

This then will leave unmapped reads unaltered on output (which seems to be the correct thing to do) but I'm not sure why the aligner would mark it as negative if it was unmapped. I.E. if the aligner reverse complements but then removes the mapping (sets the mapq to 0) perhaps we should look at the flag?

@@ -0,0 +1,63 @@
package org.bdgenomics.adam.cli
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License header.

@fnothaft
Copy link
Member

Other than a few nits, looks good to me! Thanks @arahuja.

Also, the failing test in Jenkins appears to be org.bdgenomics.adam.cli.Adam2FastqSuite.convert SAM to paired FASTQ. The stack trace is:

java.lang.NullPointerException
      at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:114)
      at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:114)
      at scala.collection.SeqLike$class.size(SeqLike.scala:106)
      at scala.collection.mutable.ArrayOps$ofRef.size(ArrayOps.scala:108)
      at scala.collection.mutable.Builder$class.sizeHint(Builder.scala:69)
      at scala.collection.mutable.ArrayBuilder.sizeHint(ArrayBuilder.scala:24)
      at scala.collection.TraversableLike$class.builder$1(TraversableLike.scala:240)
      at scala.collection.TraversableLike$class.map(TraversableLike.scala:243)
      at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:108)
      at org.bdgenomics.adam.rdd.ADAMContext.loadBam(ADAMContext.scala:239)
      at org.bdgenomics.adam.rdd.ADAMContext$$anonfun$loadAlignments$1.apply(ADAMContext.scala:516)
      at org.bdgenomics.adam.rdd.ADAMContext$$anonfun$loadAlignments$1.apply(ADAMContext.scala:513)
      at org.apache.spark.rdd.Timer.time(Timer.scala:57)
      at org.bdgenomics.adam.rdd.ADAMContext.loadAlignments(ADAMContext.scala:511)
      at org.bdgenomics.adam.cli.Adam2FastqSuite$$anonfun$1.apply$mcV$sp(ADAM2FastqSuite.scala:42)
      at org.bdgenomics.utils.misc.SparkFunSuite$$anonfun$sparkTest$1.apply$mcV$sp(SparkFunSuite.scala:97)
      at org.bdgenomics.utils.misc.SparkFunSuite$$anonfun$sparkTest$1.apply(SparkFunSuite.scala:93)
      at org.bdgenomics.utils.misc.SparkFunSuite$$anonfun$sparkTest$1.apply(SparkFunSuite.scala:93)
      at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
      at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      at org.scalatest.Transformer.apply(Transformer.scala:22)
      at org.scalatest.Transformer.apply(Transformer.scala:20)
      at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
      at org.scalatest.Suite$class.withFixture(Suite.scala:1122)
      at org.scalatest.FunSuite.withFixture(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
      at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)

@arahuja
Copy link
Contributor Author

arahuja commented Jul 23, 2015

Imports and license cleaned up

Test pasts for me locally, but possibly some weirdness in the paths on Jenkins. Updated it, let's see if it works, if not is there somewhere to view the Jenkins page?

@arahuja
Copy link
Contributor Author

arahuja commented Jul 23, 2015

Jenkins, test this please.

@arahuja
Copy link
Contributor Author

arahuja commented Jul 23, 2015

Looks I had to move where the test resources file were, should work now.

@arahuja
Copy link
Contributor Author

arahuja commented Jul 23, 2015

Jenkins, test this please.

fnothaft added a commit that referenced this pull request Jul 23, 2015
Reverse complement negative strand reads in fastq output
@fnothaft fnothaft merged commit 05addd3 into bigdatagenomics:master Jul 23, 2015
@fnothaft
Copy link
Member

Merged! Thanks @arahuja.

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

Successfully merging this pull request may close these issues.

2 participants