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

Commit

Permalink
Merge pull request #1239 from david4096/va_client_doc
Browse files Browse the repository at this point in the history
Add sphinx comment for variant annotation search
  • Loading branch information
jeromekelleher committed May 24, 2016
2 parents 782bfd6 + 9137f58 commit 9d0ce0f
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 9d0ce0f

Please sign in to comment.