Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Make referencesets optional when possible #1596

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

david4096
Copy link
Member

@david4096 david4096 commented Mar 2, 2017

The repo manager requires that a reference set is provided when it is really only a metadata item from the perspective of the variants, features, and RNA. For this reason, we can make it an optional flag at the repo manager.

I am able to add a variant set using just:
python repo_dev.py add-variantset ga4gh-example-data/registry.db brca1 ga4gh-example-data/brca1_1kgPhase3_variants.vcf.gz

  • Update docs to reflect optional fields.
  • Remove reference set from RNA paths in build test data
    Allow nullity for referencesetid field in models
  • Safely access the referenceset name in a few places
  • Make repo manager safely access referenceset for featuresets, RNA, annotations

We should strongly consider a PR at the schemas that removes the referenceId as a required field of a reads search, as that is the only endpoint that can't implement this feature.

Works to close #1528, thanks @ejacox for helping us keep focus on usability features.

@@ -221,9 +221,13 @@ def printSummary(self):
sep="\t")
print("\tVariantSets:")
for variantSet in dataset.getVariantSets():
referenceSetName = ""
Copy link
Member Author

@david4096 david4096 Mar 2, 2017

Choose a reason for hiding this comment

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

These should be refactored into one method, safeGetReferenceSetName.

@david4096 david4096 force-pushed the 1528_referencesets_optional branch from 578a2d7 to a8814a5 Compare March 2, 2017 21:58
Allow nullity for referencesetid field in models
Safely access the referenceset name in a few places
Remove reference set from RNA (it's not in the schemas)
Adding functions to safely get reference set name and ID
@david4096 david4096 force-pushed the 1528_referencesets_optional branch from a8814a5 to 53319d3 Compare March 4, 2017 01:47
def safeGetReferenceSetByName(self, referenceSetName):
"""
Gets a reference set by name from the repository throwing a useful
exception if it is not found.
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is a noop

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

Successfully merging this pull request may close these issues.

Allow "loose" referential integrity
1 participant