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

add function:filterByOverlappingRegions #1287

Merged
merged 2 commits into from Nov 23, 2016
Merged

Conversation

@liamlee
Copy link
Contributor

liamlee commented Nov 21, 2016

for multiple regions data select.

liming
for multiple regions data select.
@AmplabJenkins
Copy link

AmplabJenkins commented Nov 21, 2016

Can one of the admins verify this patch?

@heuermh
Copy link
Member

heuermh commented Nov 21, 2016

Jenkins, test this please

@AmplabJenkins
Copy link

AmplabJenkins commented Nov 21, 2016

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1634/

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.

@heuermh
Copy link
Member

heuermh commented Nov 21, 2016

From the failed Jenkins build

[INFO] Compiling 71 source files to /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/2.6.0/SCALAVER/2.10/SPARK_VERSION/1.5.2/label/centos/adam-core/target/2.10.6/test-classes at 1479736143868
[ERROR] /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/2.6.0/SCALAVER/2.10/SPARK_VERSION/1.5.2/label/centos/adam-core/src/test/scala/org/bdgenomics/adam/rdd/read/AlignmentRecordRDDSuite.scala:110: error: not found: value resourcePath
[ERROR]     val inputPath = resourcePath("artificial.sam")
[ERROR]                     ^
[ERROR] one error found
Copy link
Member

fnothaft left a comment

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)

This comment has been minimized.

Copy link
@fnothaft

fnothaft Nov 21, 2016

Member

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.

This comment has been minimized.

Copy link
@liamlee

liamlee Nov 22, 2016

Author Contributor

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

This comment has been minimized.

Copy link
@fnothaft

fnothaft Nov 21, 2016

Member

You'll want to change resourcePath("artificial.sam") to testFile("artificial.sam") and then this should compile.

liming
@fnothaft
Copy link
Member

fnothaft commented Nov 22, 2016

Jenkins, test this please.

@AmplabJenkins
Copy link

AmplabJenkins commented Nov 22, 2016

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1635/
Test PASSed.

@fnothaft fnothaft merged commit 9a6ceb3 into bigdatagenomics:master Nov 23, 2016
1 check passed
1 check passed
default Merged build finished.
Details
@fnothaft
Copy link
Member

fnothaft commented Nov 23, 2016

Merged! Thank you very much @liamlee for the contribution!

@liamlee
Copy link
Contributor Author

liamlee commented Nov 23, 2016

My pleasure.

@liamlee liamlee deleted the liamlee:feature branch Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.