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

Reference region cleanup #1291

Merged

Conversation

@fnothaft
Copy link
Member

@fnothaft 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
Copy link

@AmplabJenkins AmplabJenkins commented 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.

@fnothaft
Copy link
Member Author

@fnothaft 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.

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

@@ -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)?

fnothaft added 2 commits Nov 24, 2016
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 fnothaft force-pushed the fnothaft:issues/1285-1286-rr-cleanup branch from e0a0367 to 361f923 Dec 8, 2016
@fnothaft
Copy link
Member Author

@fnothaft 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
… 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 fnothaft force-pushed the fnothaft:issues/1285-1286-rr-cleanup branch from 361f923 to 70160d7 Dec 8, 2016
@fnothaft
Copy link
Member Author

@fnothaft fnothaft commented Dec 8, 2016

Squashed down.

@AmplabJenkins
Copy link

@AmplabJenkins AmplabJenkins commented 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.

@heuermh heuermh merged commit e98ee2d into bigdatagenomics:master Dec 8, 2016
1 check was pending
1 check was pending
default Merged build started.
Details
@heuermh
Copy link
Member

@heuermh heuermh commented Dec 8, 2016

Thank you, @fnothaft

@AmplabJenkins
Copy link

@AmplabJenkins AmplabJenkins commented 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.

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

Successfully merging this pull request may close these issues.

None yet

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