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

Estimate contig lengths in SequenceDictionary for BED, GFF3, GTF, and NarrowPeak feature formats #1411

Merged
merged 2 commits into from
Mar 3, 2017

Conversation

heuermh
Copy link
Member

@heuermh heuermh commented Mar 1, 2017

Split from #1378 for easier review and merge. Fixes #1409, fixes #1410.

@coveralls
Copy link

coveralls commented Mar 1, 2017

Coverage Status

Coverage decreased (-0.1%) to 76.161% when pulling e74c392 on heuermh:feature-seq-dict into eb4aa6c on bigdatagenomics:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 76.161% when pulling e74c392 on heuermh:feature-seq-dict into eb4aa6c on bigdatagenomics:master.

@AmplabJenkins
Copy link

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

Copy link
Member

@fnothaft fnothaft left a comment

Choose a reason for hiding this comment

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

Small nits; otherwise LGTM!

// create sequence records with length max(start, end) + 1L
val sequenceRecords = rdd
.keyBy(_.getContigName)
.map(kv => (kv._1, Math.max(kv._2.getStart, kv._2.getEnd) + 1L))
Copy link
Member

Choose a reason for hiding this comment

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

Small preference, but I'd rather import scala.math.max and change Math.max -> max.

val sequenceRecords = rdd
.keyBy(_.getContigName)
.map(kv => (kv._1, Math.max(kv._2.getStart, kv._2.getEnd) + 1L))
.reduceByKey(math.max(_, _))
Copy link
Member

Choose a reason for hiding this comment

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

Same here math.max(_, _) -> max

@coveralls
Copy link

coveralls commented Mar 2, 2017

Coverage Status

Coverage decreased (-0.1%) to 76.161% when pulling d77a184 on heuermh:feature-seq-dict into eb4aa6c on bigdatagenomics:master.

@AmplabJenkins
Copy link

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

@fnothaft fnothaft merged commit 6ee0b8b into bigdatagenomics:master Mar 3, 2017
@fnothaft
Copy link
Member

fnothaft commented Mar 3, 2017

Merged! Thanks @heuermh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants