-
Notifications
You must be signed in to change notification settings - Fork 309
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
add function:filterByOverlappingRegions #1287
Conversation
for multiple regions data select.
Can one of the admins verify this patch? |
Jenkins, test this please |
Test FAILed. Build result: FAILURE[...truncated 3 lines...]Building remotely on amp-jenkins-worker-05 (centos spark-test) in workspace /home/jenkins/workspace/ADAM-prbWiping out workspace first.Cloning the remote Git repositoryCloning repository https://github.com/bigdatagenomics/adam.git > /home/jenkins/git2/bin/git init /home/jenkins/workspace/ADAM-prb # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/adam.git > /home/jenkins/git2/bin/git --version # timeout=10 > /home/jenkins/git2/bin/git -c core.askpass=true fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/heads/:refs/remotes/origin/ # timeout=15 > /home/jenkins/git2/bin/git config remote.origin.url https://github.com/bigdatagenomics/adam.git # timeout=10 > /home/jenkins/git2/bin/git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 > /home/jenkins/git2/bin/git config remote.origin.url https://github.com/bigdatagenomics/adam.git # timeout=10Fetching upstream changes from https://github.com/bigdatagenomics/adam.git > /home/jenkins/git2/bin/git -c core.askpass=true fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ # timeout=15 > /home/jenkins/git2/bin/git rev-parse origin/pr/1287/merge^{commit} # timeout=10 > /home/jenkins/git2/bin/git branch -a --contains 57397933361bd4535c372f6c54dfa496a16372a2 # timeout=10 > /home/jenkins/git2/bin/git rev-parse remotes/origin/pr/1287/merge^{commit} # timeout=10Checking out Revision 57397933361bd4535c372f6c54dfa496a16372a2 (origin/pr/1287/merge) > /home/jenkins/git2/bin/git config core.sparsecheckout # timeout=10 > /home/jenkins/git2/bin/git checkout -f 57397933361bd4535c372f6c54dfa496a16372a2First time build. Skipping changelog.Triggering ADAM-prb ? 2.6.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.10,1.5.2,centosTouchstone configurations resulted in FAILURE, so aborting...Notifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'Test FAILed. |
From the failed Jenkins build
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only two small changes. Otherwise looks very good! Thank you for the contribution.
|
||
querys.map(query => { | ||
regions.exists(_.overlaps(query)) | ||
}).reduce((a, b) => a || b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace reduce((a, b) => a || b)
with fold(false)((a, b) => a || b)
as reduce
will fail on an empty collection. You can get an empty result from getReferenceRegions(elem)
with unmapped reads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very helpful advise, Thanks!
@@ -106,6 +106,16 @@ class AlignmentRecordRDDSuite extends ADAMFunSuite { | |||
assert(coverage.rdd.filter(r => r.start == 30).first.count == pointCoverage) | |||
} | |||
|
|||
sparkTest("test filterByOverlappingRegions") { | |||
val inputPath = resourcePath("artificial.sam") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to change resourcePath("artificial.sam")
to testFile("artificial.sam")
and then this should compile.
Jenkins, test this please. |
Test PASSed. |
Merged! Thank you very much @liamlee for the contribution! |
My pleasure. |
for multiple regions data select.