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

Projects
None yet
2 participants
@arahuja
Contributor

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

This comment has been minimized.

@fnothaft

fnothaft Jul 23, 2015

Member

License header.

@fnothaft

fnothaft Jul 23, 2015

Member

License header.

@@ -17,6 +17,9 @@
*/
package org.bdgenomics.adam.converters
import java.io.File

This comment has been minimized.

@fnothaft

fnothaft Jul 23, 2015

Member

Nit: Extra space.

@fnothaft

fnothaft Jul 23, 2015

Member

Nit: Extra space.

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jul 23, 2015

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)
Member

fnothaft commented Jul 23, 2015

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

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 23, 2015

Contributor

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?

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 23, 2015

Contributor

Jenkins, test this please.

Contributor

arahuja commented Jul 23, 2015

Jenkins, test this please.

@arahuja

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 23, 2015

Contributor

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

Contributor

arahuja commented Jul 23, 2015

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

@arahuja

This comment has been minimized.

Show comment
Hide comment
@arahuja

arahuja Jul 23, 2015

Contributor

Jenkins, test this please.

Contributor

arahuja commented Jul 23, 2015

Jenkins, test this please.

fnothaft added a commit that referenced this pull request Jul 23, 2015

Merge pull request #737 from hammerlab/issue-736
Reverse complement negative strand reads in fastq output

@fnothaft fnothaft merged commit 05addd3 into bigdatagenomics:master Jul 23, 2015

1 check passed

default Merged build finished.
Details
@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Jul 23, 2015

Member

Merged! Thanks @arahuja.

Member

fnothaft commented Jul 23, 2015

Merged! Thanks @arahuja.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment