Reference region cleanup #1291

Merged
merged 3 commits into from Dec 8, 2016

Conversation

Projects
3 participants
@fnothaft
Member

fnothaft commented Nov 25, 2016

Resolves #1285 and #1286. The first two commits need to be squashed together.

@fnothaft fnothaft added this to the 0.21.0 milestone Nov 25, 2016

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Nov 25, 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/1637/
Test PASSed.

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

@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Dec 1, 2016

Member

Ping @heuermh @jpdna for review.

Member

fnothaft commented Dec 1, 2016

Ping @heuermh @jpdna for review.

new ReferenceRegion(feature.getContigName, feature.getStart, feature.getEnd)
}
+ /**
+ * Builds a reference region for a feature without strand information.

This comment has been minimized.

@heuermh

heuermh Dec 2, 2016

Member

without strand information.with strand set.

@heuermh

heuermh Dec 2, 2016

Member

without strand information.with strand set.

+ def stranded(feature: Feature): ReferenceRegion = {
+ checkFeature(feature)
+ require(feature.getStrand != null,
+ "Strand is not defined in feature %s.".format(feature))

This comment has been minimized.

@heuermh

heuermh Dec 2, 2016

Member

Add @throws doc for this

@heuermh

heuermh Dec 2, 2016

Member

Add @throws doc for this

@@ -148,7 +148,9 @@ object ReferenceRegion {
* @return The site where this genotype lives.
*/
def apply(genotype: Genotype): ReferenceRegion = {
- ReferenceRegion(genotype.getVariant)
+ ReferenceRegion(genotype.getContigName,

This comment has been minimized.

@heuermh

heuermh Dec 2, 2016

Member

A few general questions (not about this line specifically):

Rename ReferenceRegion.orientation to ReferenceRegion.strand?
Add strand parameters to other methods (e.g. fromStart, toEnd, all)?
Set strand when copying from one ReferenceRegion to another (i.e. line 234)?

@heuermh

heuermh Dec 2, 2016

Member

A few general questions (not about this line specifically):

Rename ReferenceRegion.orientation to ReferenceRegion.strand?
Add strand parameters to other methods (e.g. fromStart, toEnd, all)?
Set strand when copying from one ReferenceRegion to another (i.e. line 234)?

fnothaft added some commits Nov 24, 2016

[ADAM-1286] Fixed ReferenceRegion.apply(genotype: Genotype) method.
Resolves #1286. After commit 525fda8, we don't
set several of the fields in `Variant` when nested in a `Genotype`. Here, we add
code to `ReferenceRegion` to pull the fields that are not set in the nested
`Variant` from the core `Genotype` fields.
@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Dec 8, 2016

Member

Thanks for the comments @heuermh. I've rebased and pushed two commits addressing your comments. When this looks good to you, I'll squash commits 2–4 down into a single commit for merge.

Member

fnothaft commented Dec 8, 2016

Thanks for the comments @heuermh. I've rebased and pushed two commits addressing your comments. When this looks good to you, I'll squash commits 2–4 down into a single commit for merge.

@heuermh

heuermh approved these changes Dec 8, 2016

[ADAM-1285] Stranded objects should have (un)stranded ReferenceRegion…
… methods.


Resolves #1285. Removes `ReferenceRegion.apply` methods for `Feature` and
`AlignmentRecord` schemas, and replaces with `stranded` and `unstranded`.
Additionally, we change `orientation` to `strand` thoughout Reference{Region,
Position} and add strand as an optional argument on the various apply-like
methods.
@fnothaft

This comment has been minimized.

Show comment
Hide comment
@fnothaft

fnothaft Dec 8, 2016

Member

Squashed down.

Member

fnothaft commented Dec 8, 2016

Squashed down.

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Dec 8, 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/1667/
Test PASSed.

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

@heuermh heuermh merged commit e98ee2d into bigdatagenomics:master Dec 8, 2016

1 check was pending

default Merged build started.
Details
@heuermh

This comment has been minimized.

Show comment
Hide comment
@heuermh

heuermh Dec 8, 2016

Member

Thank you, @fnothaft

Member

heuermh commented Dec 8, 2016

Thank you, @fnothaft

@AmplabJenkins

This comment has been minimized.

Show comment
Hide comment
@AmplabJenkins

AmplabJenkins Dec 8, 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/1668/
Test PASSed.

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

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