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

Commit

Permalink
Add sphinx comment for va search
Browse files Browse the repository at this point in the history
Add docs client docs for VA
Re-add referenceId
  • Loading branch information
david4096 committed May 23, 2016
1 parent 782bfd6 commit 9137f58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ Client API
getReadGroupSet, getReadGroup,
searchDatasets, searchReferenceSets, searchReferences,
searchVariantSets, searchVariants, searchReadGroupSets,
searchReads
searchReads, searchVariantAnnotations,
searchVariantAnnotationSets

28 changes: 23 additions & 5 deletions ga4gh/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,29 @@ def searchVariants(
request, "variants", protocol.SearchVariantsResponse)

def searchVariantAnnotations(
self, variantAnnotationSetId, referenceName=None, referenceId=None,
start=None, end=None, effects=[]):
self, variantAnnotationSetId, referenceName=None,
referenceId=None, start=None, end=None, effects=[]):
"""
Returns an iterator over the Annotations fulfilling the specified
conditions from the specified AnnotationSet.
Returns an iterator over the Variant Annotations fulfilling
the specified conditions from the specified VariantSet.
:param str variantAnnotationSetId: The ID of the
:class:`ga4gh.protocol.VariantAnnotationSet` of interest.
:param int start: Required. The beginning of the window (0-based,
inclusive) for which overlapping variants should be returned.
Genomic positions are non-negative integers less than reference
length. Requests spanning the join of circular genomes are
represented as two requests one on each side of the join
(position 0).
:param int end: Required. The end of the window (0-based, exclusive)
for which overlapping variants should be returned.
:param str referenceName: The name of the
:class:`ga4gh.protocol.Reference` we wish to return variants from.
:return: An iterator over the
:class:`ga4gh.protocol.VariantAnnotation` objects
defined by the query parameters.
:rtype: iter
"""
request = protocol.SearchVariantAnnotationsRequest()
request.variantAnnotationSetId = variantAnnotationSetId
Expand Down Expand Up @@ -361,7 +379,7 @@ def searchVariantSets(self, datasetId):

def searchVariantAnnotationSets(self, variantSetId):
"""
Returns an iterator over the AnnotationSets fulfilling the specified
Returns an iterator over the Annotation Sets fulfilling the specified
conditions from the specified variant set.
:param str variantSetId: The ID of the
Expand Down

0 comments on commit 9137f58

Please sign in to comment.