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

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

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 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.
Copy link
Member

Choose a reason for hiding this comment

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

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))
Copy link
Member

Choose a reason for hiding this comment

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

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,
Copy link
Member

@heuermh heuermh Dec 2, 2016

Choose a reason for hiding this comment

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

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

Resolves bigdatagenomics#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
Copy link
Member Author

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.

… methods.

Resolves bigdatagenomics#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
Copy link
Member Author

fnothaft commented Dec 8, 2016

Squashed down.

@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/1667/
Test PASSed.

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

heuermh commented Dec 8, 2016

Thank you, @fnothaft

@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/1668/
Test PASSed.

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

Successfully merging this pull request may close these issues.

3 participants