partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
AbstractFeatureSet.getCompoundIdForFeatureId
Returns server-style compound ID for an internal featureId. :param long featureId: id of feature in database :return: string representing ID for the specified GA4GH protocol Feature object in this FeatureSet.
ga4gh/server/datamodel/sequence_annotations.py
def getCompoundIdForFeatureId(self, featureId): """ Returns server-style compound ID for an internal featureId. :param long featureId: id of feature in database :return: string representing ID for the specified GA4GH protocol Feature object in this FeatureSet. """ ...
def getCompoundIdForFeatureId(self, featureId): """ Returns server-style compound ID for an internal featureId. :param long featureId: id of feature in database :return: string representing ID for the specified GA4GH protocol Feature object in this FeatureSet. """ ...
[ "Returns", "server", "-", "style", "compound", "ID", "for", "an", "internal", "featureId", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L202-L215
[ "def", "getCompoundIdForFeatureId", "(", "self", ",", "featureId", ")", ":", "if", "featureId", "is", "not", "None", "and", "featureId", "!=", "\"\"", ":", "compoundId", "=", "datamodel", ".", "FeatureCompoundId", "(", "self", ".", "getCompoundId", "(", ")", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SimulatedFeatureSet.getFeature
Fetches a simulated feature by ID. :param compoundId: any non-null string :return: A simulated feature with id set to the same value as the passed-in compoundId. ":raises: exceptions.ObjectWithIdNotFoundException if None is passed in for the compoundId.
ga4gh/server/datamodel/sequence_annotations.py
def getFeature(self, compoundId): """ Fetches a simulated feature by ID. :param compoundId: any non-null string :return: A simulated feature with id set to the same value as the passed-in compoundId. ":raises: exceptions.ObjectWithIdNotFoundException if None is passe...
def getFeature(self, compoundId): """ Fetches a simulated feature by ID. :param compoundId: any non-null string :return: A simulated feature with id set to the same value as the passed-in compoundId. ":raises: exceptions.ObjectWithIdNotFoundException if None is passe...
[ "Fetches", "a", "simulated", "feature", "by", "ID", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L254-L271
[ "def", "getFeature", "(", "self", ",", "compoundId", ")", ":", "if", "compoundId", "is", "None", ":", "raise", "exceptions", ".", "ObjectWithIdNotFoundException", "(", "compoundId", ")", "randomNumberGenerator", "=", "random", ".", "Random", "(", ")", "randomNum...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SimulatedFeatureSet.getFeatures
Returns a set number of simulated features. :param referenceName: name of reference to "search" on :param start: start coordinate of query :param end: end coordinate of query :param startIndex: None or int :param maxResults: None or int :param featureTypes: optional list...
ga4gh/server/datamodel/sequence_annotations.py
def getFeatures(self, referenceName=None, start=None, end=None, startIndex=None, maxResults=None, featureTypes=None, parentId=None, name=None, geneSymbol=None, numFeatures=10): """ Returns a set number of simulated features. :param ref...
def getFeatures(self, referenceName=None, start=None, end=None, startIndex=None, maxResults=None, featureTypes=None, parentId=None, name=None, geneSymbol=None, numFeatures=10): """ Returns a set number of simulated features. :param ref...
[ "Returns", "a", "set", "number", "of", "simulated", "features", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L273-L306
[ "def", "getFeatures", "(", "self", ",", "referenceName", "=", "None", ",", "start", "=", "None", ",", "end", "=", "None", ",", "startIndex", "=", "None", ",", "maxResults", "=", "None", ",", "featureTypes", "=", "None", ",", "parentId", "=", "None", ",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3DbFeatureSet.populateFromFile
Populates the instance variables of this FeatureSet from the specified data URL.
ga4gh/server/datamodel/sequence_annotations.py
def populateFromFile(self, dataUrl): """ Populates the instance variables of this FeatureSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = Gff3DbBackend(self._dbFilePath)
def populateFromFile(self, dataUrl): """ Populates the instance variables of this FeatureSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = Gff3DbBackend(self._dbFilePath)
[ "Populates", "the", "instance", "variables", "of", "this", "FeatureSet", "from", "the", "specified", "data", "URL", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L334-L340
[ "def", "populateFromFile", "(", "self", ",", "dataUrl", ")", ":", "self", ".", "_dbFilePath", "=", "dataUrl", "self", ".", "_db", "=", "Gff3DbBackend", "(", "self", ".", "_dbFilePath", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3DbFeatureSet.populateFromRow
Populates the instance variables of this FeatureSet from the specified DB row.
ga4gh/server/datamodel/sequence_annotations.py
def populateFromRow(self, featureSetRecord): """ Populates the instance variables of this FeatureSet from the specified DB row. """ self._dbFilePath = featureSetRecord.dataurl self.setAttributesJson(featureSetRecord.attributes) self._db = Gff3DbBackend(self._dbFil...
def populateFromRow(self, featureSetRecord): """ Populates the instance variables of this FeatureSet from the specified DB row. """ self._dbFilePath = featureSetRecord.dataurl self.setAttributesJson(featureSetRecord.attributes) self._db = Gff3DbBackend(self._dbFil...
[ "Populates", "the", "instance", "variables", "of", "this", "FeatureSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L342-L349
[ "def", "populateFromRow", "(", "self", ",", "featureSetRecord", ")", ":", "self", ".", "_dbFilePath", "=", "featureSetRecord", ".", "dataurl", "self", ".", "setAttributesJson", "(", "featureSetRecord", ".", "attributes", ")", "self", ".", "_db", "=", "Gff3DbBack...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3DbFeatureSet.getFeature
Returns a protocol.Feature object corresponding to a compoundId :param compoundId: a datamodel.FeatureCompoundId object :return: a Feature object. :raises: exceptions.ObjectWithIdNotFoundException if invalid compoundId is provided.
ga4gh/server/datamodel/sequence_annotations.py
def getFeature(self, compoundId): """ Returns a protocol.Feature object corresponding to a compoundId :param compoundId: a datamodel.FeatureCompoundId object :return: a Feature object. :raises: exceptions.ObjectWithIdNotFoundException if invalid compoundId is provided...
def getFeature(self, compoundId): """ Returns a protocol.Feature object corresponding to a compoundId :param compoundId: a datamodel.FeatureCompoundId object :return: a Feature object. :raises: exceptions.ObjectWithIdNotFoundException if invalid compoundId is provided...
[ "Returns", "a", "protocol", ".", "Feature", "object", "corresponding", "to", "a", "compoundId", ":", "param", "compoundId", ":", "a", "datamodel", ".", "FeatureCompoundId", "object", ":", "return", ":", "a", "Feature", "object", ".", ":", "raises", ":", "exc...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L357-L373
[ "def", "getFeature", "(", "self", ",", "compoundId", ")", ":", "featureId", "=", "long", "(", "compoundId", ".", "featureId", ")", "with", "self", ".", "_db", "as", "dataSource", ":", "featureReturned", "=", "dataSource", ".", "getFeatureById", "(", "feature...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3DbFeatureSet._gaFeatureForFeatureDbRecord
:param feature: The DB Row representing a feature :return: the corresponding GA4GH protocol.Feature object
ga4gh/server/datamodel/sequence_annotations.py
def _gaFeatureForFeatureDbRecord(self, feature): """ :param feature: The DB Row representing a feature :return: the corresponding GA4GH protocol.Feature object """ gaFeature = protocol.Feature() gaFeature.id = self.getCompoundIdForFeatureId(feature['id']) if featu...
def _gaFeatureForFeatureDbRecord(self, feature): """ :param feature: The DB Row representing a feature :return: the corresponding GA4GH protocol.Feature object """ gaFeature = protocol.Feature() gaFeature.id = self.getCompoundIdForFeatureId(feature['id']) if featu...
[ ":", "param", "feature", ":", "The", "DB", "Row", "representing", "a", "feature", ":", "return", ":", "the", "corresponding", "GA4GH", "protocol", ".", "Feature", "object" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L375-L409
[ "def", "_gaFeatureForFeatureDbRecord", "(", "self", ",", "feature", ")", ":", "gaFeature", "=", "protocol", ".", "Feature", "(", ")", "gaFeature", ".", "id", "=", "self", ".", "getCompoundIdForFeatureId", "(", "feature", "[", "'id'", "]", ")", "if", "feature...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3DbFeatureSet.getFeatures
method passed to runSearchRequest to fulfill the request :param str referenceName: name of reference (ex: "chr1") :param start: castable to int, start position on reference :param end: castable to int, end position on reference :param startIndex: none or castable to int :param ma...
ga4gh/server/datamodel/sequence_annotations.py
def getFeatures(self, referenceName=None, start=None, end=None, startIndex=None, maxResults=None, featureTypes=None, parentId=None, name=None, geneSymbol=None): """ method passed to runSearchRequest to fulfill the request :param str ref...
def getFeatures(self, referenceName=None, start=None, end=None, startIndex=None, maxResults=None, featureTypes=None, parentId=None, name=None, geneSymbol=None): """ method passed to runSearchRequest to fulfill the request :param str ref...
[ "method", "passed", "to", "runSearchRequest", "to", "fulfill", "the", "request", ":", "param", "str", "referenceName", ":", "name", "of", "reference", "(", "ex", ":", "chr1", ")", ":", "param", "start", ":", "castable", "to", "int", "start", "position", "o...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/sequence_annotations.py#L411-L437
[ "def", "getFeatures", "(", "self", ",", "referenceName", "=", "None", ",", "start", "=", "None", ",", "end", "=", "None", ",", "startIndex", "=", "None", ",", "maxResults", "=", "None", ",", "featureTypes", "=", "None", ",", "parentId", "=", "None", ",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractRnaQuantificationSet.addRnaQuantification
Add an rnaQuantification to this rnaQuantificationSet
ga4gh/server/datamodel/rna_quantification.py
def addRnaQuantification(self, rnaQuantification): """ Add an rnaQuantification to this rnaQuantificationSet """ id_ = rnaQuantification.getId() self._rnaQuantificationIdMap[id_] = rnaQuantification self._rnaQuantificationIds.append(id_)
def addRnaQuantification(self, rnaQuantification): """ Add an rnaQuantification to this rnaQuantificationSet """ id_ = rnaQuantification.getId() self._rnaQuantificationIdMap[id_] = rnaQuantification self._rnaQuantificationIds.append(id_)
[ "Add", "an", "rnaQuantification", "to", "this", "rnaQuantificationSet" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L130-L136
[ "def", "addRnaQuantification", "(", "self", ",", "rnaQuantification", ")", ":", "id_", "=", "rnaQuantification", ".", "getId", "(", ")", "self", ".", "_rnaQuantificationIdMap", "[", "id_", "]", "=", "rnaQuantification", "self", ".", "_rnaQuantificationIds", ".", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractRnaQuantificationSet.toProtocolElement
Converts this rnaQuant into its GA4GH protocol equivalent.
ga4gh/server/datamodel/rna_quantification.py
def toProtocolElement(self): """ Converts this rnaQuant into its GA4GH protocol equivalent. """ protocolElement = protocol.RnaQuantificationSet() protocolElement.id = self.getId() protocolElement.dataset_id = self._parentContainer.getId() protocolElement.name = se...
def toProtocolElement(self): """ Converts this rnaQuant into its GA4GH protocol equivalent. """ protocolElement = protocol.RnaQuantificationSet() protocolElement.id = self.getId() protocolElement.dataset_id = self._parentContainer.getId() protocolElement.name = se...
[ "Converts", "this", "rnaQuant", "into", "its", "GA4GH", "protocol", "equivalent", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L138-L147
[ "def", "toProtocolElement", "(", "self", ")", ":", "protocolElement", "=", "protocol", ".", "RnaQuantificationSet", "(", ")", "protocolElement", ".", "id", "=", "self", ".", "getId", "(", ")", "protocolElement", ".", "dataset_id", "=", "self", ".", "_parentCon...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantificationSet.populateFromFile
Populates the instance variables of this RnaQuantificationSet from the specified data URL.
ga4gh/server/datamodel/rna_quantification.py
def populateFromFile(self, dataUrl): """ Populates the instance variables of this RnaQuantificationSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = SqliteRnaBackend(self._dbFilePath) self.addRnaQuants()
def populateFromFile(self, dataUrl): """ Populates the instance variables of this RnaQuantificationSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = SqliteRnaBackend(self._dbFilePath) self.addRnaQuants()
[ "Populates", "the", "instance", "variables", "of", "this", "RnaQuantificationSet", "from", "the", "specified", "data", "URL", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L167-L174
[ "def", "populateFromFile", "(", "self", ",", "dataUrl", ")", ":", "self", ".", "_dbFilePath", "=", "dataUrl", "self", ".", "_db", "=", "SqliteRnaBackend", "(", "self", ".", "_dbFilePath", ")", "self", ".", "addRnaQuants", "(", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantificationSet.populateFromRow
Populates the instance variables of this RnaQuantificationSet from the specified DB row.
ga4gh/server/datamodel/rna_quantification.py
def populateFromRow(self, quantificationSetRecord): """ Populates the instance variables of this RnaQuantificationSet from the specified DB row. """ self._dbFilePath = quantificationSetRecord.dataurl self.setAttributesJson(quantificationSetRecord.attributes) self....
def populateFromRow(self, quantificationSetRecord): """ Populates the instance variables of this RnaQuantificationSet from the specified DB row. """ self._dbFilePath = quantificationSetRecord.dataurl self.setAttributesJson(quantificationSetRecord.attributes) self....
[ "Populates", "the", "instance", "variables", "of", "this", "RnaQuantificationSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L176-L184
[ "def", "populateFromRow", "(", "self", ",", "quantificationSetRecord", ")", ":", "self", ".", "_dbFilePath", "=", "quantificationSetRecord", ".", "dataurl", "self", ".", "setAttributesJson", "(", "quantificationSetRecord", ".", "attributes", ")", "self", ".", "_db",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractRnaQuantification.toProtocolElement
Converts this rnaQuant into its GA4GH protocol equivalent.
ga4gh/server/datamodel/rna_quantification.py
def toProtocolElement(self): """ Converts this rnaQuant into its GA4GH protocol equivalent. """ protocolElement = protocol.RnaQuantification() protocolElement.id = self.getId() protocolElement.name = self._name protocolElement.description = self._description ...
def toProtocolElement(self): """ Converts this rnaQuant into its GA4GH protocol equivalent. """ protocolElement = protocol.RnaQuantification() protocolElement.id = self.getId() protocolElement.name = self._name protocolElement.description = self._description ...
[ "Converts", "this", "rnaQuant", "into", "its", "GA4GH", "protocol", "equivalent", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L213-L228
[ "def", "toProtocolElement", "(", "self", ")", ":", "protocolElement", "=", "protocol", ".", "RnaQuantification", "(", ")", "protocolElement", ".", "id", "=", "self", ".", "getId", "(", ")", "protocolElement", ".", "name", "=", "self", ".", "_name", "protocol...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractRnaQuantification.addRnaQuantMetadata
data elements are: Id, annotations, description, name, readGroupId where annotations is a comma separated list
ga4gh/server/datamodel/rna_quantification.py
def addRnaQuantMetadata(self, fields): """ data elements are: Id, annotations, description, name, readGroupId where annotations is a comma separated list """ self._featureSetIds = fields["feature_set_ids"].split(',') self._description = fields["description"] ...
def addRnaQuantMetadata(self, fields): """ data elements are: Id, annotations, description, name, readGroupId where annotations is a comma separated list """ self._featureSetIds = fields["feature_set_ids"].split(',') self._description = fields["description"] ...
[ "data", "elements", "are", ":", "Id", "annotations", "description", "name", "readGroupId", "where", "annotations", "is", "a", "comma", "separated", "list" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L230-L249
[ "def", "addRnaQuantMetadata", "(", "self", ",", "fields", ")", ":", "self", ".", "_featureSetIds", "=", "fields", "[", "\"feature_set_ids\"", "]", ".", "split", "(", "','", ")", "self", ".", "_description", "=", "fields", "[", "\"description\"", "]", "self",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantification.getRnaQuantMetadata
input is tab file with no header. Columns are: Id, annotations, description, name, readGroupId where annotation is a comma separated list
ga4gh/server/datamodel/rna_quantification.py
def getRnaQuantMetadata(self): """ input is tab file with no header. Columns are: Id, annotations, description, name, readGroupId where annotation is a comma separated list """ rnaQuantId = self.getLocalId() with self._db as dataSource: rnaQuantReturn...
def getRnaQuantMetadata(self): """ input is tab file with no header. Columns are: Id, annotations, description, name, readGroupId where annotation is a comma separated list """ rnaQuantId = self.getLocalId() with self._db as dataSource: rnaQuantReturn...
[ "input", "is", "tab", "file", "with", "no", "header", ".", "Columns", "are", ":", "Id", "annotations", "description", "name", "readGroupId", "where", "annotation", "is", "a", "comma", "separated", "list" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L283-L293
[ "def", "getRnaQuantMetadata", "(", "self", ")", ":", "rnaQuantId", "=", "self", ".", "getLocalId", "(", ")", "with", "self", ".", "_db", "as", "dataSource", ":", "rnaQuantReturned", "=", "dataSource", ".", "getRnaQuantificationById", "(", "rnaQuantId", ")", "s...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantification.populateFromFile
Populates the instance variables of this FeatureSet from the specified data URL.
ga4gh/server/datamodel/rna_quantification.py
def populateFromFile(self, dataUrl): """ Populates the instance variables of this FeatureSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = SqliteRnaBackend(self._dbFilePath) self.getRnaQuantMetadata()
def populateFromFile(self, dataUrl): """ Populates the instance variables of this FeatureSet from the specified data URL. """ self._dbFilePath = dataUrl self._db = SqliteRnaBackend(self._dbFilePath) self.getRnaQuantMetadata()
[ "Populates", "the", "instance", "variables", "of", "this", "FeatureSet", "from", "the", "specified", "data", "URL", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L295-L302
[ "def", "populateFromFile", "(", "self", ",", "dataUrl", ")", ":", "self", ".", "_dbFilePath", "=", "dataUrl", "self", ".", "_db", "=", "SqliteRnaBackend", "(", "self", ".", "_dbFilePath", ")", "self", ".", "getRnaQuantMetadata", "(", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantification.populateFromRow
Populates the instance variables of this FeatureSet from the specified DB row.
ga4gh/server/datamodel/rna_quantification.py
def populateFromRow(self, row): """ Populates the instance variables of this FeatureSet from the specified DB row. """ self._dbFilePath = row[b'dataUrl'] self._db = SqliteRnaBackend(self._dbFilePath) self.getRnaQuantMetadata()
def populateFromRow(self, row): """ Populates the instance variables of this FeatureSet from the specified DB row. """ self._dbFilePath = row[b'dataUrl'] self._db = SqliteRnaBackend(self._dbFilePath) self.getRnaQuantMetadata()
[ "Populates", "the", "instance", "variables", "of", "this", "FeatureSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L304-L311
[ "def", "populateFromRow", "(", "self", ",", "row", ")", ":", "self", ".", "_dbFilePath", "=", "row", "[", "b'dataUrl'", "]", "self", ".", "_db", "=", "SqliteRnaBackend", "(", "self", ".", "_dbFilePath", ")", "self", ".", "getRnaQuantMetadata", "(", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaQuantification.getExpressionLevels
Returns the list of ExpressionLevels in this RNA Quantification.
ga4gh/server/datamodel/rna_quantification.py
def getExpressionLevels( self, threshold=0.0, names=[], startIndex=0, maxResults=0): """ Returns the list of ExpressionLevels in this RNA Quantification. """ rnaQuantificationId = self.getLocalId() with self._db as dataSource: expressionsReturned = dataSou...
def getExpressionLevels( self, threshold=0.0, names=[], startIndex=0, maxResults=0): """ Returns the list of ExpressionLevels in this RNA Quantification. """ rnaQuantificationId = self.getLocalId() with self._db as dataSource: expressionsReturned = dataSou...
[ "Returns", "the", "list", "of", "ExpressionLevels", "in", "this", "RNA", "Quantification", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L319-L335
[ "def", "getExpressionLevels", "(", "self", ",", "threshold", "=", "0.0", ",", "names", "=", "[", "]", ",", "startIndex", "=", "0", ",", "maxResults", "=", "0", ")", ":", "rnaQuantificationId", "=", "self", ".", "getLocalId", "(", ")", "with", "self", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaBackend.searchRnaQuantificationsInDb
:param rnaQuantificationId: string restrict search by id :return an array of dictionaries, representing the returned data.
ga4gh/server/datamodel/rna_quantification.py
def searchRnaQuantificationsInDb( self, rnaQuantificationId=""): """ :param rnaQuantificationId: string restrict search by id :return an array of dictionaries, representing the returned data. """ sql = ("SELECT * FROM RnaQuantification") sql_args = () ...
def searchRnaQuantificationsInDb( self, rnaQuantificationId=""): """ :param rnaQuantificationId: string restrict search by id :return an array of dictionaries, representing the returned data. """ sql = ("SELECT * FROM RnaQuantification") sql_args = () ...
[ ":", "param", "rnaQuantificationId", ":", "string", "restrict", "search", "by", "id", ":", "return", "an", "array", "of", "dictionaries", "representing", "the", "returned", "data", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L353-L369
[ "def", "searchRnaQuantificationsInDb", "(", "self", ",", "rnaQuantificationId", "=", "\"\"", ")", ":", "sql", "=", "(", "\"SELECT * FROM RnaQuantification\"", ")", "sql_args", "=", "(", ")", "if", "len", "(", "rnaQuantificationId", ")", ">", "0", ":", "sql", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaBackend.getRnaQuantificationById
:param rnaQuantificationId: the RNA Quantification ID :return: dictionary representing an RnaQuantification object, or None if no match is found.
ga4gh/server/datamodel/rna_quantification.py
def getRnaQuantificationById(self, rnaQuantificationId): """ :param rnaQuantificationId: the RNA Quantification ID :return: dictionary representing an RnaQuantification object, or None if no match is found. """ sql = ("SELECT * FROM RnaQuantification WHERE id = ?") ...
def getRnaQuantificationById(self, rnaQuantificationId): """ :param rnaQuantificationId: the RNA Quantification ID :return: dictionary representing an RnaQuantification object, or None if no match is found. """ sql = ("SELECT * FROM RnaQuantification WHERE id = ?") ...
[ ":", "param", "rnaQuantificationId", ":", "the", "RNA", "Quantification", "ID", ":", "return", ":", "dictionary", "representing", "an", "RnaQuantification", "object", "or", "None", "if", "no", "match", "is", "found", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L371-L383
[ "def", "getRnaQuantificationById", "(", "self", ",", "rnaQuantificationId", ")", ":", "sql", "=", "(", "\"SELECT * FROM RnaQuantification WHERE id = ?\"", ")", "query", "=", "self", ".", "_dbconn", ".", "execute", "(", "sql", ",", "(", "rnaQuantificationId", ",", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaBackend.searchExpressionLevelsInDb
:param rnaQuantId: string restrict search by quantification id :param threshold: float minimum expression values to return :return an array of dictionaries, representing the returned data.
ga4gh/server/datamodel/rna_quantification.py
def searchExpressionLevelsInDb( self, rnaQuantId, names=[], threshold=0.0, startIndex=0, maxResults=0): """ :param rnaQuantId: string restrict search by quantification id :param threshold: float minimum expression values to return :return an array of dictionaries,...
def searchExpressionLevelsInDb( self, rnaQuantId, names=[], threshold=0.0, startIndex=0, maxResults=0): """ :param rnaQuantId: string restrict search by quantification id :param threshold: float minimum expression values to return :return an array of dictionaries,...
[ ":", "param", "rnaQuantId", ":", "string", "restrict", "search", "by", "quantification", "id", ":", "param", "threshold", ":", "float", "minimum", "expression", "values", "to", "return", ":", "return", "an", "array", "of", "dictionaries", "representing", "the", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L385-L406
[ "def", "searchExpressionLevelsInDb", "(", "self", ",", "rnaQuantId", ",", "names", "=", "[", "]", ",", "threshold", "=", "0.0", ",", "startIndex", "=", "0", ",", "maxResults", "=", "0", ")", ":", "sql", "=", "(", "\"SELECT * FROM Expression WHERE \"", "\"rna...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqliteRnaBackend.getExpressionLevelById
:param expressionId: the ExpressionLevel ID :return: dictionary representing an ExpressionLevel object, or None if no match is found.
ga4gh/server/datamodel/rna_quantification.py
def getExpressionLevelById(self, expressionId): """ :param expressionId: the ExpressionLevel ID :return: dictionary representing an ExpressionLevel object, or None if no match is found. """ sql = ("SELECT * FROM Expression WHERE id = ?") query = self._dbconn.e...
def getExpressionLevelById(self, expressionId): """ :param expressionId: the ExpressionLevel ID :return: dictionary representing an ExpressionLevel object, or None if no match is found. """ sql = ("SELECT * FROM Expression WHERE id = ?") query = self._dbconn.e...
[ ":", "param", "expressionId", ":", "the", "ExpressionLevel", "ID", ":", "return", ":", "dictionary", "representing", "an", "ExpressionLevel", "object", "or", "None", "if", "no", "match", "is", "found", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/rna_quantification.py#L408-L420
[ "def", "getExpressionLevelById", "(", "self", ",", "expressionId", ")", ":", "sql", "=", "(", "\"SELECT * FROM Expression WHERE id = ?\"", ")", "query", "=", "self", ".", "_dbconn", ".", "execute", "(", "sql", ",", "(", "expressionId", ",", ")", ")", "try", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
CallSet.populateFromRow
Populates this CallSet from the specified DB row.
ga4gh/server/datamodel/variants.py
def populateFromRow(self, callSetRecord): """ Populates this CallSet from the specified DB row. """ self._biosampleId = callSetRecord.biosampleid self.setAttributesJson(callSetRecord.attributes)
def populateFromRow(self, callSetRecord): """ Populates this CallSet from the specified DB row. """ self._biosampleId = callSetRecord.biosampleid self.setAttributesJson(callSetRecord.attributes)
[ "Populates", "this", "CallSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L61-L66
[ "def", "populateFromRow", "(", "self", ",", "callSetRecord", ")", ":", "self", ".", "_biosampleId", "=", "callSetRecord", ".", "biosampleid", "self", ".", "setAttributesJson", "(", "callSetRecord", ".", "attributes", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
CallSet.toProtocolElement
Returns the representation of this CallSet as the corresponding ProtocolElement.
ga4gh/server/datamodel/variants.py
def toProtocolElement(self): """ Returns the representation of this CallSet as the corresponding ProtocolElement. """ variantSet = self.getParentContainer() gaCallSet = protocol.CallSet( biosample_id=self.getBiosampleId()) if variantSet.getCreationTime...
def toProtocolElement(self): """ Returns the representation of this CallSet as the corresponding ProtocolElement. """ variantSet = self.getParentContainer() gaCallSet = protocol.CallSet( biosample_id=self.getBiosampleId()) if variantSet.getCreationTime...
[ "Returns", "the", "representation", "of", "this", "CallSet", "as", "the", "corresponding", "ProtocolElement", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L68-L84
[ "def", "toProtocolElement", "(", "self", ")", ":", "variantSet", "=", "self", ".", "getParentContainer", "(", ")", "gaCallSet", "=", "protocol", ".", "CallSet", "(", "biosample_id", "=", "self", ".", "getBiosampleId", "(", ")", ")", "if", "variantSet", ".", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.addVariantAnnotationSet
Adds the specified variantAnnotationSet to this dataset.
ga4gh/server/datamodel/variants.py
def addVariantAnnotationSet(self, variantAnnotationSet): """ Adds the specified variantAnnotationSet to this dataset. """ id_ = variantAnnotationSet.getId() self._variantAnnotationSetIdMap[id_] = variantAnnotationSet self._variantAnnotationSetIds.append(id_)
def addVariantAnnotationSet(self, variantAnnotationSet): """ Adds the specified variantAnnotationSet to this dataset. """ id_ = variantAnnotationSet.getId() self._variantAnnotationSetIdMap[id_] = variantAnnotationSet self._variantAnnotationSetIds.append(id_)
[ "Adds", "the", "specified", "variantAnnotationSet", "to", "this", "dataset", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L130-L136
[ "def", "addVariantAnnotationSet", "(", "self", ",", "variantAnnotationSet", ")", ":", "id_", "=", "variantAnnotationSet", ".", "getId", "(", ")", "self", ".", "_variantAnnotationSetIdMap", "[", "id_", "]", "=", "variantAnnotationSet", "self", ".", "_variantAnnotatio...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.getVariantAnnotationSet
Returns the AnnotationSet in this dataset with the specified 'id'
ga4gh/server/datamodel/variants.py
def getVariantAnnotationSet(self, id_): """ Returns the AnnotationSet in this dataset with the specified 'id' """ if id_ not in self._variantAnnotationSetIdMap: raise exceptions.AnnotationSetNotFoundException(id_) return self._variantAnnotationSetIdMap[id_]
def getVariantAnnotationSet(self, id_): """ Returns the AnnotationSet in this dataset with the specified 'id' """ if id_ not in self._variantAnnotationSetIdMap: raise exceptions.AnnotationSetNotFoundException(id_) return self._variantAnnotationSetIdMap[id_]
[ "Returns", "the", "AnnotationSet", "in", "this", "dataset", "with", "the", "specified", "id" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L146-L152
[ "def", "getVariantAnnotationSet", "(", "self", ",", "id_", ")", ":", "if", "id_", "not", "in", "self", ".", "_variantAnnotationSetIdMap", ":", "raise", "exceptions", ".", "AnnotationSetNotFoundException", "(", "id_", ")", "return", "self", ".", "_variantAnnotation...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.addCallSet
Adds the specfied CallSet to this VariantSet.
ga4gh/server/datamodel/variants.py
def addCallSet(self, callSet): """ Adds the specfied CallSet to this VariantSet. """ callSetId = callSet.getId() self._callSetIdMap[callSetId] = callSet self._callSetNameMap[callSet.getLocalId()] = callSet self._callSetIds.append(callSetId) self._callSetId...
def addCallSet(self, callSet): """ Adds the specfied CallSet to this VariantSet. """ callSetId = callSet.getId() self._callSetIdMap[callSetId] = callSet self._callSetNameMap[callSet.getLocalId()] = callSet self._callSetIds.append(callSetId) self._callSetId...
[ "Adds", "the", "specfied", "CallSet", "to", "this", "VariantSet", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L192-L200
[ "def", "addCallSet", "(", "self", ",", "callSet", ")", ":", "callSetId", "=", "callSet", ".", "getId", "(", ")", "self", ".", "_callSetIdMap", "[", "callSetId", "]", "=", "callSet", "self", ".", "_callSetNameMap", "[", "callSet", ".", "getLocalId", "(", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.addCallSetFromName
Adds a CallSet for the specified sample name.
ga4gh/server/datamodel/variants.py
def addCallSetFromName(self, sampleName): """ Adds a CallSet for the specified sample name. """ callSet = CallSet(self, sampleName) self.addCallSet(callSet)
def addCallSetFromName(self, sampleName): """ Adds a CallSet for the specified sample name. """ callSet = CallSet(self, sampleName) self.addCallSet(callSet)
[ "Adds", "a", "CallSet", "for", "the", "specified", "sample", "name", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L202-L207
[ "def", "addCallSetFromName", "(", "self", ",", "sampleName", ")", ":", "callSet", "=", "CallSet", "(", "self", ",", "sampleName", ")", "self", ".", "addCallSet", "(", "callSet", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.getCallSetByName
Returns a CallSet with the specified name, or raises a CallSetNameNotFoundException if it does not exist.
ga4gh/server/datamodel/variants.py
def getCallSetByName(self, name): """ Returns a CallSet with the specified name, or raises a CallSetNameNotFoundException if it does not exist. """ if name not in self._callSetNameMap: raise exceptions.CallSetNameNotFoundException(name) return self._callSetNam...
def getCallSetByName(self, name): """ Returns a CallSet with the specified name, or raises a CallSetNameNotFoundException if it does not exist. """ if name not in self._callSetNameMap: raise exceptions.CallSetNameNotFoundException(name) return self._callSetNam...
[ "Returns", "a", "CallSet", "with", "the", "specified", "name", "or", "raises", "a", "CallSetNameNotFoundException", "if", "it", "does", "not", "exist", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L221-L228
[ "def", "getCallSetByName", "(", "self", ",", "name", ")", ":", "if", "name", "not", "in", "self", ".", "_callSetNameMap", ":", "raise", "exceptions", ".", "CallSetNameNotFoundException", "(", "name", ")", "return", "self", ".", "_callSetNameMap", "[", "name", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.getCallSet
Returns a CallSet with the specified id, or raises a CallSetNotFoundException if it does not exist.
ga4gh/server/datamodel/variants.py
def getCallSet(self, id_): """ Returns a CallSet with the specified id, or raises a CallSetNotFoundException if it does not exist. """ if id_ not in self._callSetIdMap: raise exceptions.CallSetNotFoundException(id_) return self._callSetIdMap[id_]
def getCallSet(self, id_): """ Returns a CallSet with the specified id, or raises a CallSetNotFoundException if it does not exist. """ if id_ not in self._callSetIdMap: raise exceptions.CallSetNotFoundException(id_) return self._callSetIdMap[id_]
[ "Returns", "a", "CallSet", "with", "the", "specified", "id", "or", "raises", "a", "CallSetNotFoundException", "if", "it", "does", "not", "exist", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L236-L243
[ "def", "getCallSet", "(", "self", ",", "id_", ")", ":", "if", "id_", "not", "in", "self", ".", "_callSetIdMap", ":", "raise", "exceptions", ".", "CallSetNotFoundException", "(", "id_", ")", "return", "self", ".", "_callSetIdMap", "[", "id_", "]" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.toProtocolElement
Converts this VariantSet into its GA4GH protocol equivalent.
ga4gh/server/datamodel/variants.py
def toProtocolElement(self): """ Converts this VariantSet into its GA4GH protocol equivalent. """ protocolElement = protocol.VariantSet() protocolElement.id = self.getId() protocolElement.dataset_id = self.getParentContainer().getId() protocolElement.reference_set...
def toProtocolElement(self): """ Converts this VariantSet into its GA4GH protocol equivalent. """ protocolElement = protocol.VariantSet() protocolElement.id = self.getId() protocolElement.dataset_id = self.getParentContainer().getId() protocolElement.reference_set...
[ "Converts", "this", "VariantSet", "into", "its", "GA4GH", "protocol", "equivalent", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L251-L264
[ "def", "toProtocolElement", "(", "self", ")", ":", "protocolElement", "=", "protocol", ".", "VariantSet", "(", ")", "protocolElement", ".", "id", "=", "self", ".", "getId", "(", ")", "protocolElement", ".", "dataset_id", "=", "self", ".", "getParentContainer",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet._createGaVariant
Convenience method to set the common fields in a GA Variant object from this variant set.
ga4gh/server/datamodel/variants.py
def _createGaVariant(self): """ Convenience method to set the common fields in a GA Variant object from this variant set. """ ret = protocol.Variant() if self._creationTime: ret.created = self._creationTime if self._updatedTime: ret.updated...
def _createGaVariant(self): """ Convenience method to set the common fields in a GA Variant object from this variant set. """ ret = protocol.Variant() if self._creationTime: ret.created = self._creationTime if self._updatedTime: ret.updated...
[ "Convenience", "method", "to", "set", "the", "common", "fields", "in", "a", "GA", "Variant", "object", "from", "this", "variant", "set", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L272-L283
[ "def", "_createGaVariant", "(", "self", ")", ":", "ret", "=", "protocol", ".", "Variant", "(", ")", "if", "self", ".", "_creationTime", ":", "ret", ".", "created", "=", "self", ".", "_creationTime", "if", "self", ".", "_updatedTime", ":", "ret", ".", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.getVariantId
Returns an ID string suitable for the specified GA Variant object in this variant set.
ga4gh/server/datamodel/variants.py
def getVariantId(self, gaVariant): """ Returns an ID string suitable for the specified GA Variant object in this variant set. """ md5 = self.hashVariant(gaVariant) compoundId = datamodel.VariantCompoundId( self.getCompoundId(), gaVariant.reference_name, ...
def getVariantId(self, gaVariant): """ Returns an ID string suitable for the specified GA Variant object in this variant set. """ md5 = self.hashVariant(gaVariant) compoundId = datamodel.VariantCompoundId( self.getCompoundId(), gaVariant.reference_name, ...
[ "Returns", "an", "ID", "string", "suitable", "for", "the", "specified", "GA", "Variant", "object", "in", "this", "variant", "set", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L285-L294
[ "def", "getVariantId", "(", "self", ",", "gaVariant", ")", ":", "md5", "=", "self", ".", "hashVariant", "(", "gaVariant", ")", "compoundId", "=", "datamodel", ".", "VariantCompoundId", "(", "self", ".", "getCompoundId", "(", ")", ",", "gaVariant", ".", "re...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.getCallSetId
Returns the callSetId for the specified sampleName in this VariantSet.
ga4gh/server/datamodel/variants.py
def getCallSetId(self, sampleName): """ Returns the callSetId for the specified sampleName in this VariantSet. """ compoundId = datamodel.CallSetCompoundId( self.getCompoundId(), sampleName) return str(compoundId)
def getCallSetId(self, sampleName): """ Returns the callSetId for the specified sampleName in this VariantSet. """ compoundId = datamodel.CallSetCompoundId( self.getCompoundId(), sampleName) return str(compoundId)
[ "Returns", "the", "callSetId", "for", "the", "specified", "sampleName", "in", "this", "VariantSet", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L296-L303
[ "def", "getCallSetId", "(", "self", ",", "sampleName", ")", ":", "compoundId", "=", "datamodel", ".", "CallSetCompoundId", "(", "self", ".", "getCompoundId", "(", ")", ",", "sampleName", ")", "return", "str", "(", "compoundId", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantSet.hashVariant
Produces an MD5 hash of the ga variant object to distinguish it from other variants at the same genomic coordinate.
ga4gh/server/datamodel/variants.py
def hashVariant(cls, gaVariant): """ Produces an MD5 hash of the ga variant object to distinguish it from other variants at the same genomic coordinate. """ hash_str = gaVariant.reference_bases + \ str(tuple(gaVariant.alternate_bases)) return hashlib.md5(hash_...
def hashVariant(cls, gaVariant): """ Produces an MD5 hash of the ga variant object to distinguish it from other variants at the same genomic coordinate. """ hash_str = gaVariant.reference_bases + \ str(tuple(gaVariant.alternate_bases)) return hashlib.md5(hash_...
[ "Produces", "an", "MD5", "hash", "of", "the", "ga", "variant", "object", "to", "distinguish", "it", "from", "other", "variants", "at", "the", "same", "genomic", "coordinate", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L306-L313
[ "def", "hashVariant", "(", "cls", ",", "gaVariant", ")", ":", "hash_str", "=", "gaVariant", ".", "reference_bases", "+", "str", "(", "tuple", "(", "gaVariant", ".", "alternate_bases", ")", ")", "return", "hashlib", ".", "md5", "(", "hash_str", ")", ".", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SimulatedVariantSet.generateVariant
Generate a random variant for the specified position using the specified random number generator. This generator should be seeded with a value that is unique to this position so that the same variant will always be produced regardless of the order it is generated in.
ga4gh/server/datamodel/variants.py
def generateVariant(self, referenceName, position, randomNumberGenerator): """ Generate a random variant for the specified position using the specified random number generator. This generator should be seeded with a value that is unique to this position so that the same variant w...
def generateVariant(self, referenceName, position, randomNumberGenerator): """ Generate a random variant for the specified position using the specified random number generator. This generator should be seeded with a value that is unique to this position so that the same variant w...
[ "Generate", "a", "random", "variant", "for", "the", "specified", "position", "using", "the", "specified", "random", "number", "generator", ".", "This", "generator", "should", "be", "seeded", "with", "a", "value", "that", "is", "unique", "to", "this", "position...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L394-L434
[ "def", "generateVariant", "(", "self", ",", "referenceName", ",", "position", ",", "randomNumberGenerator", ")", ":", "variant", "=", "self", ".", "_createGaVariant", "(", ")", "variant", ".", "reference_name", "=", "referenceName", "variant", ".", "start", "=",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.populateFromRow
Populates this VariantSet from the specified DB row.
ga4gh/server/datamodel/variants.py
def populateFromRow(self, variantSetRecord): """ Populates this VariantSet from the specified DB row. """ self._created = variantSetRecord.created self._updated = variantSetRecord.updated self.setAttributesJson(variantSetRecord.attributes) self._chromFileMap = {} ...
def populateFromRow(self, variantSetRecord): """ Populates this VariantSet from the specified DB row. """ self._created = variantSetRecord.created self._updated = variantSetRecord.updated self.setAttributesJson(variantSetRecord.attributes) self._chromFileMap = {} ...
[ "Populates", "this", "VariantSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L466-L482
[ "def", "populateFromRow", "(", "self", ",", "variantSetRecord", ")", ":", "self", ".", "_created", "=", "variantSetRecord", ".", "created", "self", ".", "_updated", "=", "variantSetRecord", ".", "updated", "self", ".", "setAttributesJson", "(", "variantSetRecord",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.populateFromFile
Populates this variant set using the specified lists of data files and indexes. These must be in the same order, such that the jth index file corresponds to the jth data file.
ga4gh/server/datamodel/variants.py
def populateFromFile(self, dataUrls, indexFiles): """ Populates this variant set using the specified lists of data files and indexes. These must be in the same order, such that the jth index file corresponds to the jth data file. """ assert len(dataUrls) == len(indexFiles...
def populateFromFile(self, dataUrls, indexFiles): """ Populates this variant set using the specified lists of data files and indexes. These must be in the same order, such that the jth index file corresponds to the jth data file. """ assert len(dataUrls) == len(indexFiles...
[ "Populates", "this", "variant", "set", "using", "the", "specified", "lists", "of", "data", "files", "and", "indexes", ".", "These", "must", "be", "in", "the", "same", "order", "such", "that", "the", "jth", "index", "file", "corresponds", "to", "the", "jth"...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L484-L496
[ "def", "populateFromFile", "(", "self", ",", "dataUrls", ",", "indexFiles", ")", ":", "assert", "len", "(", "dataUrls", ")", "==", "len", "(", "indexFiles", ")", "for", "dataUrl", ",", "indexFile", "in", "zip", "(", "dataUrls", ",", "indexFiles", ")", ":...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.populateFromDirectory
Populates this VariantSet by examing all the VCF files in the specified directory. This is mainly used for as a convenience for testing purposes.
ga4gh/server/datamodel/variants.py
def populateFromDirectory(self, vcfDirectory): """ Populates this VariantSet by examing all the VCF files in the specified directory. This is mainly used for as a convenience for testing purposes. """ pattern = os.path.join(vcfDirectory, "*.vcf.gz") dataFiles = []...
def populateFromDirectory(self, vcfDirectory): """ Populates this VariantSet by examing all the VCF files in the specified directory. This is mainly used for as a convenience for testing purposes. """ pattern = os.path.join(vcfDirectory, "*.vcf.gz") dataFiles = []...
[ "Populates", "this", "VariantSet", "by", "examing", "all", "the", "VCF", "files", "in", "the", "specified", "directory", ".", "This", "is", "mainly", "used", "for", "as", "a", "convenience", "for", "testing", "purposes", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L498-L510
[ "def", "populateFromDirectory", "(", "self", ",", "vcfDirectory", ")", ":", "pattern", "=", "os", ".", "path", ".", "join", "(", "vcfDirectory", ",", "\"*.vcf.gz\"", ")", "dataFiles", "=", "[", "]", "indexFiles", "=", "[", "]", "for", "vcfFile", "in", "g...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.checkConsistency
Perform consistency check on the variant set
ga4gh/server/datamodel/variants.py
def checkConsistency(self): """ Perform consistency check on the variant set """ for referenceName, (dataUrl, indexFile) in self._chromFileMap.items(): varFile = pysam.VariantFile(dataUrl, index_filename=indexFile) try: for chrom in varFile.index: ...
def checkConsistency(self): """ Perform consistency check on the variant set """ for referenceName, (dataUrl, indexFile) in self._chromFileMap.items(): varFile = pysam.VariantFile(dataUrl, index_filename=indexFile) try: for chrom in varFile.index: ...
[ "Perform", "consistency", "check", "on", "the", "variant", "set" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L519-L532
[ "def", "checkConsistency", "(", "self", ")", ":", "for", "referenceName", ",", "(", "dataUrl", ",", "indexFile", ")", "in", "self", ".", "_chromFileMap", ".", "items", "(", ")", ":", "varFile", "=", "pysam", ".", "VariantFile", "(", "dataUrl", ",", "inde...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._populateFromVariantFile
Populates the instance variables of this VariantSet from the specified pysam VariantFile object.
ga4gh/server/datamodel/variants.py
def _populateFromVariantFile(self, varFile, dataUrl, indexFile): """ Populates the instance variables of this VariantSet from the specified pysam VariantFile object. """ if varFile.index is None: raise exceptions.NotIndexedException(dataUrl) for chrom in varFi...
def _populateFromVariantFile(self, varFile, dataUrl, indexFile): """ Populates the instance variables of this VariantSet from the specified pysam VariantFile object. """ if varFile.index is None: raise exceptions.NotIndexedException(dataUrl) for chrom in varFi...
[ "Populates", "the", "instance", "variables", "of", "this", "VariantSet", "from", "the", "specified", "pysam", "VariantFile", "object", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L534-L553
[ "def", "_populateFromVariantFile", "(", "self", ",", "varFile", ",", "dataUrl", ",", "indexFile", ")", ":", "if", "varFile", ".", "index", "is", "None", ":", "raise", "exceptions", ".", "NotIndexedException", "(", "dataUrl", ")", "for", "chrom", "in", "varFi...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._updateVariantAnnotationSets
Updates the variant annotation set associated with this variant using information in the specified pysam variantFile.
ga4gh/server/datamodel/variants.py
def _updateVariantAnnotationSets(self, variantFile, dataUrl): """ Updates the variant annotation set associated with this variant using information in the specified pysam variantFile. """ # TODO check the consistency of this between VCF files. if not self.isAnnotated(): ...
def _updateVariantAnnotationSets(self, variantFile, dataUrl): """ Updates the variant annotation set associated with this variant using information in the specified pysam variantFile. """ # TODO check the consistency of this between VCF files. if not self.isAnnotated(): ...
[ "Updates", "the", "variant", "annotation", "set", "associated", "with", "this", "variant", "using", "information", "in", "the", "specified", "pysam", "variantFile", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L555-L593
[ "def", "_updateVariantAnnotationSets", "(", "self", ",", "variantFile", ",", "dataUrl", ")", ":", "# TODO check the consistency of this between VCF files.", "if", "not", "self", ".", "isAnnotated", "(", ")", ":", "annotationType", "=", "None", "for", "record", "in", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._updateMetadata
Updates the metadata for his variant set based on the specified variant file
ga4gh/server/datamodel/variants.py
def _updateMetadata(self, variantFile): """ Updates the metadata for his variant set based on the specified variant file """ metadata = self._getMetadataFromVcf(variantFile) if self._metadata is None: self._metadata = metadata
def _updateMetadata(self, variantFile): """ Updates the metadata for his variant set based on the specified variant file """ metadata = self._getMetadataFromVcf(variantFile) if self._metadata is None: self._metadata = metadata
[ "Updates", "the", "metadata", "for", "his", "variant", "set", "based", "on", "the", "specified", "variant", "file" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L595-L602
[ "def", "_updateMetadata", "(", "self", ",", "variantFile", ")", ":", "metadata", "=", "self", ".", "_getMetadataFromVcf", "(", "variantFile", ")", "if", "self", ".", "_metadata", "is", "None", ":", "self", ".", "_metadata", "=", "metadata" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._checkMetadata
Checks that metadata is consistent
ga4gh/server/datamodel/variants.py
def _checkMetadata(self, variantFile): """ Checks that metadata is consistent """ metadata = self._getMetadataFromVcf(variantFile) if self._metadata is not None and self._metadata != metadata: raise exceptions.InconsistentMetaDataException( variantFile...
def _checkMetadata(self, variantFile): """ Checks that metadata is consistent """ metadata = self._getMetadataFromVcf(variantFile) if self._metadata is not None and self._metadata != metadata: raise exceptions.InconsistentMetaDataException( variantFile...
[ "Checks", "that", "metadata", "is", "consistent" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L604-L611
[ "def", "_checkMetadata", "(", "self", ",", "variantFile", ")", ":", "metadata", "=", "self", ".", "_getMetadataFromVcf", "(", "variantFile", ")", "if", "self", ".", "_metadata", "is", "not", "None", "and", "self", ".", "_metadata", "!=", "metadata", ":", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._checkCallSetIds
Checks callSetIds for consistency
ga4gh/server/datamodel/variants.py
def _checkCallSetIds(self, variantFile): """ Checks callSetIds for consistency """ if len(self._callSetIdMap) > 0: callSetIds = set([ self.getCallSetId(sample) for sample in variantFile.header.samples]) if callSetIds != set(self._ca...
def _checkCallSetIds(self, variantFile): """ Checks callSetIds for consistency """ if len(self._callSetIdMap) > 0: callSetIds = set([ self.getCallSetId(sample) for sample in variantFile.header.samples]) if callSetIds != set(self._ca...
[ "Checks", "callSetIds", "for", "consistency" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L613-L623
[ "def", "_checkCallSetIds", "(", "self", ",", "variantFile", ")", ":", "if", "len", "(", "self", ".", "_callSetIdMap", ")", ">", "0", ":", "callSetIds", "=", "set", "(", "[", "self", ".", "getCallSetId", "(", "sample", ")", "for", "sample", "in", "varia...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet._updateCallSetIds
Updates the call set IDs based on the specified variant file.
ga4gh/server/datamodel/variants.py
def _updateCallSetIds(self, variantFile): """ Updates the call set IDs based on the specified variant file. """ if len(self._callSetIdMap) == 0: for sample in variantFile.header.samples: self.addCallSetFromName(sample)
def _updateCallSetIds(self, variantFile): """ Updates the call set IDs based on the specified variant file. """ if len(self._callSetIdMap) == 0: for sample in variantFile.header.samples: self.addCallSetFromName(sample)
[ "Updates", "the", "call", "set", "IDs", "based", "on", "the", "specified", "variant", "file", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L632-L638
[ "def", "_updateCallSetIds", "(", "self", ",", "variantFile", ")", ":", "if", "len", "(", "self", ".", "_callSetIdMap", ")", "==", "0", ":", "for", "sample", "in", "variantFile", ".", "header", ".", "samples", ":", "self", ".", "addCallSetFromName", "(", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.convertVariant
Converts the specified pysam variant record into a GA4GH Variant object. Only calls for the specified list of callSetIds will be included.
ga4gh/server/datamodel/variants.py
def convertVariant(self, record, callSetIds): """ Converts the specified pysam variant record into a GA4GH Variant object. Only calls for the specified list of callSetIds will be included. """ variant = self._createGaVariant() variant.reference_name = record.conti...
def convertVariant(self, record, callSetIds): """ Converts the specified pysam variant record into a GA4GH Variant object. Only calls for the specified list of callSetIds will be included. """ variant = self._createGaVariant() variant.reference_name = record.conti...
[ "Converts", "the", "specified", "pysam", "variant", "record", "into", "a", "GA4GH", "Variant", "object", ".", "Only", "calls", "for", "the", "specified", "list", "of", "callSetIds", "will", "be", "included", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L665-L712
[ "def", "convertVariant", "(", "self", ",", "record", ",", "callSetIds", ")", ":", "variant", "=", "self", ".", "_createGaVariant", "(", ")", "variant", ".", "reference_name", "=", "record", ".", "contig", "if", "record", ".", "id", "is", "not", "None", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.getPysamVariants
Returns an iterator over the pysam VCF records corresponding to the specified query.
ga4gh/server/datamodel/variants.py
def getPysamVariants(self, referenceName, startPosition, endPosition): """ Returns an iterator over the pysam VCF records corresponding to the specified query. """ if referenceName in self._chromFileMap: varFileName = self._chromFileMap[referenceName] refe...
def getPysamVariants(self, referenceName, startPosition, endPosition): """ Returns an iterator over the pysam VCF records corresponding to the specified query. """ if referenceName in self._chromFileMap: varFileName = self._chromFileMap[referenceName] refe...
[ "Returns", "an", "iterator", "over", "the", "pysam", "VCF", "records", "corresponding", "to", "the", "specified", "query", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L734-L747
[ "def", "getPysamVariants", "(", "self", ",", "referenceName", ",", "startPosition", ",", "endPosition", ")", ":", "if", "referenceName", "in", "self", ".", "_chromFileMap", ":", "varFileName", "=", "self", ".", "_chromFileMap", "[", "referenceName", "]", "refere...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.getVariants
Returns an iterator over the specified variants. The parameters correspond to the attributes of a GASearchVariantsRequest object.
ga4gh/server/datamodel/variants.py
def getVariants(self, referenceName, startPosition, endPosition, callSetIds=[]): """ Returns an iterator over the specified variants. The parameters correspond to the attributes of a GASearchVariantsRequest object. """ if callSetIds is None: callSe...
def getVariants(self, referenceName, startPosition, endPosition, callSetIds=[]): """ Returns an iterator over the specified variants. The parameters correspond to the attributes of a GASearchVariantsRequest object. """ if callSetIds is None: callSe...
[ "Returns", "an", "iterator", "over", "the", "specified", "variants", ".", "The", "parameters", "correspond", "to", "the", "attributes", "of", "a", "GASearchVariantsRequest", "object", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L749-L764
[ "def", "getVariants", "(", "self", ",", "referenceName", ",", "startPosition", ",", "endPosition", ",", "callSetIds", "=", "[", "]", ")", ":", "if", "callSetIds", "is", "None", ":", "callSetIds", "=", "self", ".", "_callSetIds", "else", ":", "for", "callSe...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantSet.getMetadataId
Returns the id of a metadata
ga4gh/server/datamodel/variants.py
def getMetadataId(self, metadata): """ Returns the id of a metadata """ return str(datamodel.VariantSetMetadataCompoundId( self.getCompoundId(), 'metadata:' + metadata.key))
def getMetadataId(self, metadata): """ Returns the id of a metadata """ return str(datamodel.VariantSetMetadataCompoundId( self.getCompoundId(), 'metadata:' + metadata.key))
[ "Returns", "the", "id", "of", "a", "metadata" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L766-L771
[ "def", "getMetadataId", "(", "self", ",", "metadata", ")", ":", "return", "str", "(", "datamodel", ".", "VariantSetMetadataCompoundId", "(", "self", ".", "getCompoundId", "(", ")", ",", "'metadata:'", "+", "metadata", ".", "key", ")", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantAnnotationSet._createGaVariantAnnotation
Convenience method to set the common fields in a GA VariantAnnotation object from this variant set.
ga4gh/server/datamodel/variants.py
def _createGaVariantAnnotation(self): """ Convenience method to set the common fields in a GA VariantAnnotation object from this variant set. """ ret = protocol.VariantAnnotation() ret.created = self._creationTime ret.variant_annotation_set_id = self.getId() ...
def _createGaVariantAnnotation(self): """ Convenience method to set the common fields in a GA VariantAnnotation object from this variant set. """ ret = protocol.VariantAnnotation() ret.created = self._creationTime ret.variant_annotation_set_id = self.getId() ...
[ "Convenience", "method", "to", "set", "the", "common", "fields", "in", "a", "GA", "VariantAnnotation", "object", "from", "this", "variant", "set", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L882-L890
[ "def", "_createGaVariantAnnotation", "(", "self", ")", ":", "ret", "=", "protocol", ".", "VariantAnnotation", "(", ")", "ret", ".", "created", "=", "self", ".", "_creationTime", "ret", ".", "variant_annotation_set_id", "=", "self", ".", "getId", "(", ")", "r...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantAnnotationSet.toProtocolElement
Converts this VariantAnnotationSet into its GA4GH protocol equivalent.
ga4gh/server/datamodel/variants.py
def toProtocolElement(self): """ Converts this VariantAnnotationSet into its GA4GH protocol equivalent. """ protocolElement = protocol.VariantAnnotationSet() protocolElement.id = self.getId() protocolElement.variant_set_id = self._variantSet.getId() protocolElemen...
def toProtocolElement(self): """ Converts this VariantAnnotationSet into its GA4GH protocol equivalent. """ protocolElement = protocol.VariantAnnotationSet() protocolElement.id = self.getId() protocolElement.variant_set_id = self._variantSet.getId() protocolElemen...
[ "Converts", "this", "VariantAnnotationSet", "into", "its", "GA4GH", "protocol", "equivalent", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L908-L918
[ "def", "toProtocolElement", "(", "self", ")", ":", "protocolElement", "=", "protocol", ".", "VariantAnnotationSet", "(", ")", "protocolElement", ".", "id", "=", "self", ".", "getId", "(", ")", "protocolElement", ".", "variant_set_id", "=", "self", ".", "_varia...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantAnnotationSet.hashVariantAnnotation
Produces an MD5 hash of the gaVariant and gaVariantAnnotation objects
ga4gh/server/datamodel/variants.py
def hashVariantAnnotation(cls, gaVariant, gaVariantAnnotation): """ Produces an MD5 hash of the gaVariant and gaVariantAnnotation objects """ treffs = [treff.id for treff in gaVariantAnnotation.transcript_effects] return hashlib.md5( "{}\t{}\t{}\t".format( ...
def hashVariantAnnotation(cls, gaVariant, gaVariantAnnotation): """ Produces an MD5 hash of the gaVariant and gaVariantAnnotation objects """ treffs = [treff.id for treff in gaVariantAnnotation.transcript_effects] return hashlib.md5( "{}\t{}\t{}\t".format( ...
[ "Produces", "an", "MD5", "hash", "of", "the", "gaVariant", "and", "gaVariantAnnotation", "objects" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L929-L938
[ "def", "hashVariantAnnotation", "(", "cls", ",", "gaVariant", ",", "gaVariantAnnotation", ")", ":", "treffs", "=", "[", "treff", ".", "id", "for", "treff", "in", "gaVariantAnnotation", ".", "transcript_effects", "]", "return", "hashlib", ".", "md5", "(", "\"{}...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractVariantAnnotationSet.getVariantAnnotationId
Produces a stringified compoundId representing a variant annotation. :param gaVariant: protocol.Variant :param gaAnnotation: protocol.VariantAnnotation :return: compoundId String
ga4gh/server/datamodel/variants.py
def getVariantAnnotationId(self, gaVariant, gaAnnotation): """ Produces a stringified compoundId representing a variant annotation. :param gaVariant: protocol.Variant :param gaAnnotation: protocol.VariantAnnotation :return: compoundId String """ md5 = s...
def getVariantAnnotationId(self, gaVariant, gaAnnotation): """ Produces a stringified compoundId representing a variant annotation. :param gaVariant: protocol.Variant :param gaAnnotation: protocol.VariantAnnotation :return: compoundId String """ md5 = s...
[ "Produces", "a", "stringified", "compoundId", "representing", "a", "variant", "annotation", ".", ":", "param", "gaVariant", ":", "protocol", ".", "Variant", ":", "param", "gaAnnotation", ":", "protocol", ".", "VariantAnnotation", ":", "return", ":", "compoundId", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L940-L952
[ "def", "getVariantAnnotationId", "(", "self", ",", "gaVariant", ",", "gaAnnotation", ")", ":", "md5", "=", "self", ".", "hashVariantAnnotation", "(", "gaVariant", ",", "gaAnnotation", ")", "compoundId", "=", "datamodel", ".", "VariantAnnotationCompoundId", "(", "s...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SimulatedVariantAnnotationSet.generateVariantAnnotation
Generate a random variant annotation based on a given variant. This generator should be seeded with a value that is unique to the variant so that the same annotation will always be produced regardless of the order it is generated in.
ga4gh/server/datamodel/variants.py
def generateVariantAnnotation(self, variant): """ Generate a random variant annotation based on a given variant. This generator should be seeded with a value that is unique to the variant so that the same annotation will always be produced regardless of the order it is generated ...
def generateVariantAnnotation(self, variant): """ Generate a random variant annotation based on a given variant. This generator should be seeded with a value that is unique to the variant so that the same annotation will always be produced regardless of the order it is generated ...
[ "Generate", "a", "random", "variant", "annotation", "based", "on", "a", "given", "variant", ".", "This", "generator", "should", "be", "seeded", "with", "a", "value", "that", "is", "unique", "to", "the", "variant", "so", "that", "the", "same", "annotation", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L985-L1008
[ "def", "generateVariantAnnotation", "(", "self", ",", "variant", ")", ":", "# To make this reproducible, make a seed based on this", "# specific variant.", "seed", "=", "self", ".", "_randomSeed", "+", "variant", ".", "start", "+", "variant", ".", "end", "randomNumberGe...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.populateFromRow
Populates this VariantAnnotationSet from the specified DB row.
ga4gh/server/datamodel/variants.py
def populateFromRow(self, annotationSetRecord): """ Populates this VariantAnnotationSet from the specified DB row. """ self._annotationType = annotationSetRecord.annotationtype self._analysis = protocol.fromJson( annotationSetRecord.analysis, protocol.Analysis) ...
def populateFromRow(self, annotationSetRecord): """ Populates this VariantAnnotationSet from the specified DB row. """ self._annotationType = annotationSetRecord.annotationtype self._analysis = protocol.fromJson( annotationSetRecord.analysis, protocol.Analysis) ...
[ "Populates", "this", "VariantAnnotationSet", "from", "the", "specified", "DB", "row", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1109-L1118
[ "def", "populateFromRow", "(", "self", ",", "annotationSetRecord", ")", ":", "self", ".", "_annotationType", "=", "annotationSetRecord", ".", "annotationtype", "self", ".", "_analysis", "=", "protocol", ".", "fromJson", "(", "annotationSetRecord", ".", "analysis", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet._getAnnotationAnalysis
Assembles metadata within the VCF header into a GA4GH Analysis object. :return: protocol.Analysis
ga4gh/server/datamodel/variants.py
def _getAnnotationAnalysis(self, varFile): """ Assembles metadata within the VCF header into a GA4GH Analysis object. :return: protocol.Analysis """ header = varFile.header analysis = protocol.Analysis() formats = header.formats.items() infos = header.inf...
def _getAnnotationAnalysis(self, varFile): """ Assembles metadata within the VCF header into a GA4GH Analysis object. :return: protocol.Analysis """ header = varFile.header analysis = protocol.Analysis() formats = header.formats.items() infos = header.inf...
[ "Assembles", "metadata", "within", "the", "VCF", "header", "into", "a", "GA4GH", "Analysis", "object", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1127-L1177
[ "def", "_getAnnotationAnalysis", "(", "self", ",", "varFile", ")", ":", "header", "=", "varFile", ".", "header", "analysis", "=", "protocol", ".", "Analysis", "(", ")", "formats", "=", "header", ".", "formats", ".", "items", "(", ")", "infos", "=", "head...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.getVariantAnnotations
Generator for iterating through variant annotations in this variant annotation set. :param referenceName: :param startPosition: :param endPosition: :return: generator of protocol.VariantAnnotation
ga4gh/server/datamodel/variants.py
def getVariantAnnotations(self, referenceName, startPosition, endPosition): """ Generator for iterating through variant annotations in this variant annotation set. :param referenceName: :param startPosition: :param endPosition: :return: generator of protocol.Varia...
def getVariantAnnotations(self, referenceName, startPosition, endPosition): """ Generator for iterating through variant annotations in this variant annotation set. :param referenceName: :param startPosition: :param endPosition: :return: generator of protocol.Varia...
[ "Generator", "for", "iterating", "through", "variant", "annotations", "in", "this", "variant", "annotation", "set", ".", ":", "param", "referenceName", ":", ":", "param", "startPosition", ":", ":", "param", "endPosition", ":", ":", "return", ":", "generator", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1179-L1191
[ "def", "getVariantAnnotations", "(", "self", ",", "referenceName", ",", "startPosition", ",", "endPosition", ")", ":", "variantIter", "=", "self", ".", "_variantSet", ".", "getPysamVariants", "(", "referenceName", ",", "startPosition", ",", "endPosition", ")", "fo...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertLocation
Accepts a position string (start/length) and returns a GA4GH AlleleLocation with populated fields. :param pos: :return: protocol.AlleleLocation
ga4gh/server/datamodel/variants.py
def convertLocation(self, pos): """ Accepts a position string (start/length) and returns a GA4GH AlleleLocation with populated fields. :param pos: :return: protocol.AlleleLocation """ if isUnspecified(pos): return None coordLen = pos.split('/')...
def convertLocation(self, pos): """ Accepts a position string (start/length) and returns a GA4GH AlleleLocation with populated fields. :param pos: :return: protocol.AlleleLocation """ if isUnspecified(pos): return None coordLen = pos.split('/')...
[ "Accepts", "a", "position", "string", "(", "start", "/", "length", ")", "and", "returns", "a", "GA4GH", "AlleleLocation", "with", "populated", "fields", ".", ":", "param", "pos", ":", ":", "return", ":", "protocol", ".", "AlleleLocation" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1193-L1207
[ "def", "convertLocation", "(", "self", ",", "pos", ")", ":", "if", "isUnspecified", "(", "pos", ")", ":", "return", "None", "coordLen", "=", "pos", ".", "split", "(", "'/'", ")", "if", "len", "(", "coordLen", ")", ">", "1", ":", "allLoc", "=", "sel...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertLocationHgvsC
Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsc: :return:
ga4gh/server/datamodel/variants.py
def convertLocationHgvsC(self, hgvsc): """ Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsc: :return: """ if isUnspecified(hgvsc): return None match = re.match(".*c.(\d+)(\D+)>(\D+)", hgvs...
def convertLocationHgvsC(self, hgvsc): """ Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsc: :return: """ if isUnspecified(hgvsc): return None match = re.match(".*c.(\d+)(\D+)>(\D+)", hgvs...
[ "Accepts", "an", "annotation", "in", "HGVS", "notation", "and", "returns", "an", "AlleleLocation", "with", "populated", "fields", ".", ":", "param", "hgvsc", ":", ":", "return", ":" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1209-L1227
[ "def", "convertLocationHgvsC", "(", "self", ",", "hgvsc", ")", ":", "if", "isUnspecified", "(", "hgvsc", ")", ":", "return", "None", "match", "=", "re", ".", "match", "(", "\".*c.(\\d+)(\\D+)>(\\D+)\"", ",", "hgvsc", ")", "if", "match", ":", "pos", "=", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertLocationHgvsP
Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsp: :return: protocol.AlleleLocation
ga4gh/server/datamodel/variants.py
def convertLocationHgvsP(self, hgvsp): """ Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsp: :return: protocol.AlleleLocation """ if isUnspecified(hgvsp): return None match = re.match(".*p...
def convertLocationHgvsP(self, hgvsp): """ Accepts an annotation in HGVS notation and returns an AlleleLocation with populated fields. :param hgvsp: :return: protocol.AlleleLocation """ if isUnspecified(hgvsp): return None match = re.match(".*p...
[ "Accepts", "an", "annotation", "in", "HGVS", "notation", "and", "returns", "an", "AlleleLocation", "with", "populated", "fields", ".", ":", "param", "hgvsp", ":", ":", "return", ":", "protocol", ".", "AlleleLocation" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1229-L1245
[ "def", "convertLocationHgvsP", "(", "self", ",", "hgvsp", ")", ":", "if", "isUnspecified", "(", "hgvsp", ")", ":", "return", "None", "match", "=", "re", ".", "match", "(", "\".*p.(\\D+)(\\d+)(\\D+)\"", ",", "hgvsp", ",", "flags", "=", "re", ".", "UNICODE",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.addLocations
Adds locations to a GA4GH transcript effect object by parsing HGVS annotation fields in concert with and supplied position values. :param effect: protocol.TranscriptEffect :param protPos: String representing protein position from VCF :param cdnaPos: String representing coding DNA...
ga4gh/server/datamodel/variants.py
def addLocations(self, effect, protPos, cdnaPos): """ Adds locations to a GA4GH transcript effect object by parsing HGVS annotation fields in concert with and supplied position values. :param effect: protocol.TranscriptEffect :param protPos: String representing protein po...
def addLocations(self, effect, protPos, cdnaPos): """ Adds locations to a GA4GH transcript effect object by parsing HGVS annotation fields in concert with and supplied position values. :param effect: protocol.TranscriptEffect :param protPos: String representing protein po...
[ "Adds", "locations", "to", "a", "GA4GH", "transcript", "effect", "object", "by", "parsing", "HGVS", "annotation", "fields", "in", "concert", "with", "and", "supplied", "position", "values", ".", ":", "param", "effect", ":", "protocol", ".", "TranscriptEffect", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1282-L1295
[ "def", "addLocations", "(", "self", ",", "effect", ",", "protPos", ",", "cdnaPos", ")", ":", "self", ".", "addCDSLocation", "(", "effect", ",", "cdnaPos", ")", "self", ".", "addCDNALocation", "(", "effect", ",", "cdnaPos", ")", "self", ".", "addProteinLoca...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertTranscriptEffect
Takes the ANN string of a SnpEff generated VCF, splits it and returns a populated GA4GH transcript effect object. :param annStr: String :param hgvsG: String :return: effect protocol.TranscriptEffect()
ga4gh/server/datamodel/variants.py
def convertTranscriptEffect(self, annStr, hgvsG): """ Takes the ANN string of a SnpEff generated VCF, splits it and returns a populated GA4GH transcript effect object. :param annStr: String :param hgvsG: String :return: effect protocol.TranscriptEffect() """ ...
def convertTranscriptEffect(self, annStr, hgvsG): """ Takes the ANN string of a SnpEff generated VCF, splits it and returns a populated GA4GH transcript effect object. :param annStr: String :param hgvsG: String :return: effect protocol.TranscriptEffect() """ ...
[ "Takes", "the", "ANN", "string", "of", "a", "SnpEff", "generated", "VCF", "splits", "it", "and", "returns", "a", "populated", "GA4GH", "transcript", "effect", "object", ".", ":", "param", "annStr", ":", "String", ":", "param", "hgvsG", ":", "String", ":", ...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1297-L1326
[ "def", "convertTranscriptEffect", "(", "self", ",", "annStr", ",", "hgvsG", ")", ":", "effect", "=", "self", ".", "_createGaTranscriptEffect", "(", ")", "effect", ".", "hgvs_annotation", ".", "CopyFrom", "(", "protocol", ".", "HGVSAnnotation", "(", ")", ")", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertSeqOntology
Splits a string of sequence ontology effects and creates an ontology term record for each, which are built into an array of return soTerms. :param seqOntStr: :return: [protocol.OntologyTerm]
ga4gh/server/datamodel/variants.py
def convertSeqOntology(self, seqOntStr): """ Splits a string of sequence ontology effects and creates an ontology term record for each, which are built into an array of return soTerms. :param seqOntStr: :return: [protocol.OntologyTerm] """ return [ ...
def convertSeqOntology(self, seqOntStr): """ Splits a string of sequence ontology effects and creates an ontology term record for each, which are built into an array of return soTerms. :param seqOntStr: :return: [protocol.OntologyTerm] """ return [ ...
[ "Splits", "a", "string", "of", "sequence", "ontology", "effects", "and", "creates", "an", "ontology", "term", "record", "for", "each", "which", "are", "built", "into", "an", "array", "of", "return", "soTerms", ".", ":", "param", "seqOntStr", ":", ":", "ret...
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1328-L1338
[ "def", "convertSeqOntology", "(", "self", ",", "seqOntStr", ")", ":", "return", "[", "self", ".", "_ontology", ".", "getGaTermByName", "(", "soName", ")", "for", "soName", "in", "seqOntStr", ".", "split", "(", "'&'", ")", "]" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
HtslibVariantAnnotationSet.convertVariantAnnotation
Converts the specfied pysam variant record into a GA4GH variant annotation object using the specified function to convert the transcripts.
ga4gh/server/datamodel/variants.py
def convertVariantAnnotation(self, record): """ Converts the specfied pysam variant record into a GA4GH variant annotation object using the specified function to convert the transcripts. """ variant = self._variantSet.convertVariant(record, []) annotation = self._...
def convertVariantAnnotation(self, record): """ Converts the specfied pysam variant record into a GA4GH variant annotation object using the specified function to convert the transcripts. """ variant = self._variantSet.convertVariant(record, []) annotation = self._...
[ "Converts", "the", "specfied", "pysam", "variant", "record", "into", "a", "GA4GH", "variant", "annotation", "object", "using", "the", "specified", "function", "to", "convert", "the", "transcripts", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/variants.py#L1340-L1358
[ "def", "convertVariantAnnotation", "(", "self", ",", "record", ")", ":", "variant", "=", "self", ".", "_variantSet", ".", "convertVariant", "(", "record", ",", "[", "]", ")", "annotation", "=", "self", ".", "_createGaVariantAnnotation", "(", ")", "annotation",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Feature._attributeStr
Return name=value for a single attribute
ga4gh/server/gff3.py
def _attributeStr(self, name): """ Return name=value for a single attribute """ return "{}={}".format( _encodeAttr(name), ",".join([_encodeAttr(v) for v in self.attributes[name]]))
def _attributeStr(self, name): """ Return name=value for a single attribute """ return "{}={}".format( _encodeAttr(name), ",".join([_encodeAttr(v) for v in self.attributes[name]]))
[ "Return", "name", "=", "value", "for", "a", "single", "attribute" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L98-L104
[ "def", "_attributeStr", "(", "self", ",", "name", ")", ":", "return", "\"{}={}\"", ".", "format", "(", "_encodeAttr", "(", "name", ")", ",", "\",\"", ".", "join", "(", "[", "_encodeAttr", "(", "v", ")", "for", "v", "in", "self", ".", "attributes", "[...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Feature._attributeStrs
Return name=value, semi-colon-separated string for attributes, including url-style quoting
ga4gh/server/gff3.py
def _attributeStrs(self): """ Return name=value, semi-colon-separated string for attributes, including url-style quoting """ return ";".join([self._attributeStr(name) for name in self.attributes.iterkeys()])
def _attributeStrs(self): """ Return name=value, semi-colon-separated string for attributes, including url-style quoting """ return ";".join([self._attributeStr(name) for name in self.attributes.iterkeys()])
[ "Return", "name", "=", "value", "semi", "-", "colon", "-", "separated", "string", "for", "attributes", "including", "url", "-", "style", "quoting" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L106-L112
[ "def", "_attributeStrs", "(", "self", ")", ":", "return", "\";\"", ".", "join", "(", "[", "self", ".", "_attributeStr", "(", "name", ")", "for", "name", "in", "self", ".", "attributes", ".", "iterkeys", "(", ")", "]", ")" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Feature.featureName
ID attribute from GFF3 or None if record doesn't have it. Called "Name" rather than "Id" within GA4GH, as there is no guarantee of either uniqueness or existence.
ga4gh/server/gff3.py
def featureName(self): """ ID attribute from GFF3 or None if record doesn't have it. Called "Name" rather than "Id" within GA4GH, as there is no guarantee of either uniqueness or existence. """ featId = self.attributes.get("ID") if featId is not None: ...
def featureName(self): """ ID attribute from GFF3 or None if record doesn't have it. Called "Name" rather than "Id" within GA4GH, as there is no guarantee of either uniqueness or existence. """ featId = self.attributes.get("ID") if featId is not None: ...
[ "ID", "attribute", "from", "GFF3", "or", "None", "if", "record", "doesn", "t", "have", "it", ".", "Called", "Name", "rather", "than", "Id", "within", "GA4GH", "as", "there", "is", "no", "guarantee", "of", "either", "uniqueness", "or", "existence", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L126-L135
[ "def", "featureName", "(", "self", ")", ":", "featId", "=", "self", ".", "attributes", ".", "get", "(", "\"ID\"", ")", "if", "featId", "is", "not", "None", ":", "featId", "=", "featId", "[", "0", "]", "return", "featId" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set._linkFeature
Link a feature with its parents.
ga4gh/server/gff3.py
def _linkFeature(self, feature): """ Link a feature with its parents. """ parentNames = feature.attributes.get("Parent") if parentNames is None: self.roots.add(feature) else: for parentName in parentNames: self._linkToParent(feature...
def _linkFeature(self, feature): """ Link a feature with its parents. """ parentNames = feature.attributes.get("Parent") if parentNames is None: self.roots.add(feature) else: for parentName in parentNames: self._linkToParent(feature...
[ "Link", "a", "feature", "with", "its", "parents", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L165-L174
[ "def", "_linkFeature", "(", "self", ",", "feature", ")", ":", "parentNames", "=", "feature", ".", "attributes", ".", "get", "(", "\"Parent\"", ")", "if", "parentNames", "is", "None", ":", "self", ".", "roots", ".", "add", "(", "feature", ")", "else", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set._linkToParent
Link a feature with its children
ga4gh/server/gff3.py
def _linkToParent(self, feature, parentName): """ Link a feature with its children """ parentParts = self.byFeatureName.get(parentName) if parentParts is None: raise GFF3Exception( "Parent feature does not exist: {}".format(parentName), ...
def _linkToParent(self, feature, parentName): """ Link a feature with its children """ parentParts = self.byFeatureName.get(parentName) if parentParts is None: raise GFF3Exception( "Parent feature does not exist: {}".format(parentName), ...
[ "Link", "a", "feature", "with", "its", "children" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L176-L188
[ "def", "_linkToParent", "(", "self", ",", "feature", ",", "parentName", ")", ":", "parentParts", "=", "self", ".", "byFeatureName", ".", "get", "(", "parentName", ")", "if", "parentParts", "is", "None", ":", "raise", "GFF3Exception", "(", "\"Parent feature doe...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set.linkChildFeaturesToParents
finish loading the set, constructing the tree
ga4gh/server/gff3.py
def linkChildFeaturesToParents(self): """ finish loading the set, constructing the tree """ # features maybe disjoint for featureParts in self.byFeatureName.itervalues(): for feature in featureParts: self._linkFeature(feature)
def linkChildFeaturesToParents(self): """ finish loading the set, constructing the tree """ # features maybe disjoint for featureParts in self.byFeatureName.itervalues(): for feature in featureParts: self._linkFeature(feature)
[ "finish", "loading", "the", "set", "constructing", "the", "tree" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L190-L197
[ "def", "linkChildFeaturesToParents", "(", "self", ")", ":", "# features maybe disjoint", "for", "featureParts", "in", "self", ".", "byFeatureName", ".", "itervalues", "(", ")", ":", "for", "feature", "in", "featureParts", ":", "self", ".", "_linkFeature", "(", "...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set._recSortKey
Sort order for Features, by genomic coordinate, disambiguated by feature type (alphabetically).
ga4gh/server/gff3.py
def _recSortKey(r): """ Sort order for Features, by genomic coordinate, disambiguated by feature type (alphabetically). """ return r.seqname, r.start, -r.end, r.type
def _recSortKey(r): """ Sort order for Features, by genomic coordinate, disambiguated by feature type (alphabetically). """ return r.seqname, r.start, -r.end, r.type
[ "Sort", "order", "for", "Features", "by", "genomic", "coordinate", "disambiguated", "by", "feature", "type", "(", "alphabetically", ")", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L200-L205
[ "def", "_recSortKey", "(", "r", ")", ":", "return", "r", ".", "seqname", ",", "r", ".", "start", ",", "-", "r", ".", "end", ",", "r", ".", "type" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set._writeRec
Writes a single record to a file provided by the filehandle fh.
ga4gh/server/gff3.py
def _writeRec(self, fh, rec): """ Writes a single record to a file provided by the filehandle fh. """ fh.write(str(rec) + "\n") for child in sorted(rec.children, key=self._recSortKey): self._writeRec(fh, child)
def _writeRec(self, fh, rec): """ Writes a single record to a file provided by the filehandle fh. """ fh.write(str(rec) + "\n") for child in sorted(rec.children, key=self._recSortKey): self._writeRec(fh, child)
[ "Writes", "a", "single", "record", "to", "a", "file", "provided", "by", "the", "filehandle", "fh", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L207-L213
[ "def", "_writeRec", "(", "self", ",", "fh", ",", "rec", ")", ":", "fh", ".", "write", "(", "str", "(", "rec", ")", "+", "\"\\n\"", ")", "for", "child", "in", "sorted", "(", "rec", ".", "children", ",", "key", "=", "self", ".", "_recSortKey", ")",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Set.write
Write set to a GFF3 format file. :param file fh: file handle for file to write to
ga4gh/server/gff3.py
def write(self, fh): """ Write set to a GFF3 format file. :param file fh: file handle for file to write to """ fh.write(GFF3_HEADER+"\n") for root in sorted(self.roots, key=self._recSortKey): self._writeRec(fh, root)
def write(self, fh): """ Write set to a GFF3 format file. :param file fh: file handle for file to write to """ fh.write(GFF3_HEADER+"\n") for root in sorted(self.roots, key=self._recSortKey): self._writeRec(fh, root)
[ "Write", "set", "to", "a", "GFF3", "format", "file", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L215-L223
[ "def", "write", "(", "self", ",", "fh", ")", ":", "fh", ".", "write", "(", "GFF3_HEADER", "+", "\"\\n\"", ")", "for", "root", "in", "sorted", "(", "self", ".", "roots", ",", "key", "=", "self", ".", "_recSortKey", ")", ":", "self", ".", "_writeRec"...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Parser._open
open input file, optionally with decompression
ga4gh/server/gff3.py
def _open(self): """ open input file, optionally with decompression """ if self.fileName.endswith(".gz"): return gzip.open(self.fileName) elif self.fileName.endswith(".bz2"): return bz2.BZ2File(self.fileName) else: return open(self.file...
def _open(self): """ open input file, optionally with decompression """ if self.fileName.endswith(".gz"): return gzip.open(self.fileName) elif self.fileName.endswith(".bz2"): return bz2.BZ2File(self.fileName) else: return open(self.file...
[ "open", "input", "file", "optionally", "with", "decompression" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L240-L249
[ "def", "_open", "(", "self", ")", ":", "if", "self", ".", "fileName", ".", "endswith", "(", "\".gz\"", ")", ":", "return", "gzip", ".", "open", "(", "self", ".", "fileName", ")", "elif", "self", ".", "fileName", ".", "endswith", "(", "\".bz2\"", ")",...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Parser._parseAttrVal
Returns tuple of tuple of (attr, value), multiple are returned to handle multi-value attributes.
ga4gh/server/gff3.py
def _parseAttrVal(self, attrStr): """ Returns tuple of tuple of (attr, value), multiple are returned to handle multi-value attributes. """ m = self.SPLIT_ATTR_RE.match(attrStr) if m is None: raise GFF3Exception( "can't parse attribute/value: '"...
def _parseAttrVal(self, attrStr): """ Returns tuple of tuple of (attr, value), multiple are returned to handle multi-value attributes. """ m = self.SPLIT_ATTR_RE.match(attrStr) if m is None: raise GFF3Exception( "can't parse attribute/value: '"...
[ "Returns", "tuple", "of", "tuple", "of", "(", "attr", "value", ")", "multiple", "are", "returned", "to", "handle", "multi", "-", "value", "attributes", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L254-L268
[ "def", "_parseAttrVal", "(", "self", ",", "attrStr", ")", ":", "m", "=", "self", ".", "SPLIT_ATTR_RE", ".", "match", "(", "attrStr", ")", "if", "m", "is", "None", ":", "raise", "GFF3Exception", "(", "\"can't parse attribute/value: '\"", "+", "attrStr", "+", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Parser._parseAttrs
Parse the attributes and values
ga4gh/server/gff3.py
def _parseAttrs(self, attrsStr): """ Parse the attributes and values """ attributes = dict() for attrStr in self.SPLIT_ATTR_COL_RE.split(attrsStr): name, vals = self._parseAttrVal(attrStr) if name in attributes: raise GFF3Exception( ...
def _parseAttrs(self, attrsStr): """ Parse the attributes and values """ attributes = dict() for attrStr in self.SPLIT_ATTR_COL_RE.split(attrsStr): name, vals = self._parseAttrVal(attrStr) if name in attributes: raise GFF3Exception( ...
[ "Parse", "the", "attributes", "and", "values" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L272-L284
[ "def", "_parseAttrs", "(", "self", ",", "attrsStr", ")", ":", "attributes", "=", "dict", "(", ")", "for", "attrStr", "in", "self", ".", "SPLIT_ATTR_COL_RE", ".", "split", "(", "attrsStr", ")", ":", "name", ",", "vals", "=", "self", ".", "_parseAttrVal", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Parser._parseRecord
Parse one record.
ga4gh/server/gff3.py
def _parseRecord(self, gff3Set, line): """ Parse one record. """ row = line.split("\t") if len(row) != self.GFF3_NUM_COLS: raise GFF3Exception( "Wrong number of columns, expected {}, got {}".format( self.GFF3_NUM_COLS, len(row)), ...
def _parseRecord(self, gff3Set, line): """ Parse one record. """ row = line.split("\t") if len(row) != self.GFF3_NUM_COLS: raise GFF3Exception( "Wrong number of columns, expected {}, got {}".format( self.GFF3_NUM_COLS, len(row)), ...
[ "Parse", "one", "record", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L288-L305
[ "def", "_parseRecord", "(", "self", ",", "gff3Set", ",", "line", ")", ":", "row", "=", "line", ".", "split", "(", "\"\\t\"", ")", "if", "len", "(", "row", ")", "!=", "self", ".", "GFF3_NUM_COLS", ":", "raise", "GFF3Exception", "(", "\"Wrong number of col...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
Gff3Parser.parse
Run the parse and return the resulting Gff3Set object.
ga4gh/server/gff3.py
def parse(self): """ Run the parse and return the resulting Gff3Set object. """ fh = self._open() try: gff3Set = Gff3Set(self.fileName) for line in fh: self.lineNumber += 1 self._parseLine(gff3Set, line[0:-1]) finall...
def parse(self): """ Run the parse and return the resulting Gff3Set object. """ fh = self._open() try: gff3Set = Gff3Set(self.fileName) for line in fh: self.lineNumber += 1 self._parseLine(gff3Set, line[0:-1]) finall...
[ "Run", "the", "parse", "and", "return", "the", "resulting", "Gff3Set", "object", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/gff3.py#L327-L340
[ "def", "parse", "(", "self", ")", ":", "fh", "=", "self", ".", "_open", "(", ")", "try", ":", "gff3Set", "=", "Gff3Set", "(", "self", ".", "fileName", ")", "for", "line", "in", "fh", ":", "self", ".", "lineNumber", "+=", "1", "self", ".", "_parse...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.addDataset
Adds the specified dataset to this data repository.
ga4gh/server/datarepo.py
def addDataset(self, dataset): """ Adds the specified dataset to this data repository. """ id_ = dataset.getId() self._datasetIdMap[id_] = dataset self._datasetNameMap[dataset.getLocalId()] = dataset self._datasetIds.append(id_)
def addDataset(self, dataset): """ Adds the specified dataset to this data repository. """ id_ = dataset.getId() self._datasetIdMap[id_] = dataset self._datasetNameMap[dataset.getLocalId()] = dataset self._datasetIds.append(id_)
[ "Adds", "the", "specified", "dataset", "to", "this", "data", "repository", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L50-L57
[ "def", "addDataset", "(", "self", ",", "dataset", ")", ":", "id_", "=", "dataset", ".", "getId", "(", ")", "self", ".", "_datasetIdMap", "[", "id_", "]", "=", "dataset", "self", ".", "_datasetNameMap", "[", "dataset", ".", "getLocalId", "(", ")", "]", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.addReferenceSet
Adds the specified reference set to this data repository.
ga4gh/server/datarepo.py
def addReferenceSet(self, referenceSet): """ Adds the specified reference set to this data repository. """ id_ = referenceSet.getId() self._referenceSetIdMap[id_] = referenceSet self._referenceSetNameMap[referenceSet.getLocalId()] = referenceSet self._referenceSet...
def addReferenceSet(self, referenceSet): """ Adds the specified reference set to this data repository. """ id_ = referenceSet.getId() self._referenceSetIdMap[id_] = referenceSet self._referenceSetNameMap[referenceSet.getLocalId()] = referenceSet self._referenceSet...
[ "Adds", "the", "specified", "reference", "set", "to", "this", "data", "repository", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L59-L66
[ "def", "addReferenceSet", "(", "self", ",", "referenceSet", ")", ":", "id_", "=", "referenceSet", ".", "getId", "(", ")", "self", ".", "_referenceSetIdMap", "[", "id_", "]", "=", "referenceSet", "self", ".", "_referenceSetNameMap", "[", "referenceSet", ".", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.addOntology
Add an ontology map to this data repository.
ga4gh/server/datarepo.py
def addOntology(self, ontology): """ Add an ontology map to this data repository. """ self._ontologyNameMap[ontology.getName()] = ontology self._ontologyIdMap[ontology.getId()] = ontology self._ontologyIds.append(ontology.getId())
def addOntology(self, ontology): """ Add an ontology map to this data repository. """ self._ontologyNameMap[ontology.getName()] = ontology self._ontologyIdMap[ontology.getId()] = ontology self._ontologyIds.append(ontology.getId())
[ "Add", "an", "ontology", "map", "to", "this", "data", "repository", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L68-L74
[ "def", "addOntology", "(", "self", ",", "ontology", ")", ":", "self", ".", "_ontologyNameMap", "[", "ontology", ".", "getName", "(", ")", "]", "=", "ontology", "self", ".", "_ontologyIdMap", "[", "ontology", ".", "getId", "(", ")", "]", "=", "ontology", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getPeer
Select the first peer in the datarepo with the given url simulating the behavior of selecting by URL. This is only used during testing.
ga4gh/server/datarepo.py
def getPeer(self, url): """ Select the first peer in the datarepo with the given url simulating the behavior of selecting by URL. This is only used during testing. """ peers = filter(lambda x: x.getUrl() == url, self.getPeers()) if len(peers) == 0: raise excep...
def getPeer(self, url): """ Select the first peer in the datarepo with the given url simulating the behavior of selecting by URL. This is only used during testing. """ peers = filter(lambda x: x.getUrl() == url, self.getPeers()) if len(peers) == 0: raise excep...
[ "Select", "the", "first", "peer", "in", "the", "datarepo", "with", "the", "given", "url", "simulating", "the", "behavior", "of", "selecting", "by", "URL", ".", "This", "is", "only", "used", "during", "testing", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L89-L97
[ "def", "getPeer", "(", "self", ",", "url", ")", ":", "peers", "=", "filter", "(", "lambda", "x", ":", "x", ".", "getUrl", "(", ")", "==", "url", ",", "self", ".", "getPeers", "(", ")", ")", "if", "len", "(", "peers", ")", "==", "0", ":", "rai...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getDataset
Returns a dataset with the specified ID, or raises a DatasetNotFoundException if it does not exist.
ga4gh/server/datarepo.py
def getDataset(self, id_): """ Returns a dataset with the specified ID, or raises a DatasetNotFoundException if it does not exist. """ if id_ not in self._datasetIdMap: raise exceptions.DatasetNotFoundException(id_) return self._datasetIdMap[id_]
def getDataset(self, id_): """ Returns a dataset with the specified ID, or raises a DatasetNotFoundException if it does not exist. """ if id_ not in self._datasetIdMap: raise exceptions.DatasetNotFoundException(id_) return self._datasetIdMap[id_]
[ "Returns", "a", "dataset", "with", "the", "specified", "ID", "or", "raises", "a", "DatasetNotFoundException", "if", "it", "does", "not", "exist", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L119-L126
[ "def", "getDataset", "(", "self", ",", "id_", ")", ":", "if", "id_", "not", "in", "self", ".", "_datasetIdMap", ":", "raise", "exceptions", ".", "DatasetNotFoundException", "(", "id_", ")", "return", "self", ".", "_datasetIdMap", "[", "id_", "]" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getDatasetByName
Returns the dataset with the specified name.
ga4gh/server/datarepo.py
def getDatasetByName(self, name): """ Returns the dataset with the specified name. """ if name not in self._datasetNameMap: raise exceptions.DatasetNameNotFoundException(name) return self._datasetNameMap[name]
def getDatasetByName(self, name): """ Returns the dataset with the specified name. """ if name not in self._datasetNameMap: raise exceptions.DatasetNameNotFoundException(name) return self._datasetNameMap[name]
[ "Returns", "the", "dataset", "with", "the", "specified", "name", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L134-L140
[ "def", "getDatasetByName", "(", "self", ",", "name", ")", ":", "if", "name", "not", "in", "self", ".", "_datasetNameMap", ":", "raise", "exceptions", ".", "DatasetNameNotFoundException", "(", "name", ")", "return", "self", ".", "_datasetNameMap", "[", "name", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getOntology
Returns the ontology with the specified ID.
ga4gh/server/datarepo.py
def getOntology(self, id_): """ Returns the ontology with the specified ID. """ if id_ not in self._ontologyIdMap: raise exceptions.OntologyNotFoundException(id_) return self._ontologyIdMap[id_]
def getOntology(self, id_): """ Returns the ontology with the specified ID. """ if id_ not in self._ontologyIdMap: raise exceptions.OntologyNotFoundException(id_) return self._ontologyIdMap[id_]
[ "Returns", "the", "ontology", "with", "the", "specified", "ID", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L154-L160
[ "def", "getOntology", "(", "self", ",", "id_", ")", ":", "if", "id_", "not", "in", "self", ".", "_ontologyIdMap", ":", "raise", "exceptions", ".", "OntologyNotFoundException", "(", "id_", ")", "return", "self", ".", "_ontologyIdMap", "[", "id_", "]" ]
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getOntologyByName
Returns an ontology by name
ga4gh/server/datarepo.py
def getOntologyByName(self, name): """ Returns an ontology by name """ if name not in self._ontologyNameMap: raise exceptions.OntologyNameNotFoundException(name) return self._ontologyNameMap[name]
def getOntologyByName(self, name): """ Returns an ontology by name """ if name not in self._ontologyNameMap: raise exceptions.OntologyNameNotFoundException(name) return self._ontologyNameMap[name]
[ "Returns", "an", "ontology", "by", "name" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L162-L168
[ "def", "getOntologyByName", "(", "self", ",", "name", ")", ":", "if", "name", "not", "in", "self", ".", "_ontologyNameMap", ":", "raise", "exceptions", ".", "OntologyNameNotFoundException", "(", "name", ")", "return", "self", ".", "_ontologyNameMap", "[", "nam...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getReferenceSet
Retuns the ReferenceSet with the specified ID, or raises a ReferenceSetNotFoundException if it does not exist.
ga4gh/server/datarepo.py
def getReferenceSet(self, id_): """ Retuns the ReferenceSet with the specified ID, or raises a ReferenceSetNotFoundException if it does not exist. """ if id_ not in self._referenceSetIdMap: raise exceptions.ReferenceSetNotFoundException(id_) return self._refer...
def getReferenceSet(self, id_): """ Retuns the ReferenceSet with the specified ID, or raises a ReferenceSetNotFoundException if it does not exist. """ if id_ not in self._referenceSetIdMap: raise exceptions.ReferenceSetNotFoundException(id_) return self._refer...
[ "Retuns", "the", "ReferenceSet", "with", "the", "specified", "ID", "or", "raises", "a", "ReferenceSetNotFoundException", "if", "it", "does", "not", "exist", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L176-L183
[ "def", "getReferenceSet", "(", "self", ",", "id_", ")", ":", "if", "id_", "not", "in", "self", ".", "_referenceSetIdMap", ":", "raise", "exceptions", ".", "ReferenceSetNotFoundException", "(", "id_", ")", "return", "self", ".", "_referenceSetIdMap", "[", "id_"...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getReferenceSetByName
Returns the reference set with the specified name.
ga4gh/server/datarepo.py
def getReferenceSetByName(self, name): """ Returns the reference set with the specified name. """ if name not in self._referenceSetNameMap: raise exceptions.ReferenceSetNameNotFoundException(name) return self._referenceSetNameMap[name]
def getReferenceSetByName(self, name): """ Returns the reference set with the specified name. """ if name not in self._referenceSetNameMap: raise exceptions.ReferenceSetNameNotFoundException(name) return self._referenceSetNameMap[name]
[ "Returns", "the", "reference", "set", "with", "the", "specified", "name", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L191-L197
[ "def", "getReferenceSetByName", "(", "self", ",", "name", ")", ":", "if", "name", "not", "in", "self", ".", "_referenceSetNameMap", ":", "raise", "exceptions", ".", "ReferenceSetNameNotFoundException", "(", "name", ")", "return", "self", ".", "_referenceSetNameMap...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getReadGroupSet
Returns the readgroup set with the specified ID.
ga4gh/server/datarepo.py
def getReadGroupSet(self, id_): """ Returns the readgroup set with the specified ID. """ compoundId = datamodel.ReadGroupSetCompoundId.parse(id_) dataset = self.getDataset(compoundId.dataset_id) return dataset.getReadGroupSet(id_)
def getReadGroupSet(self, id_): """ Returns the readgroup set with the specified ID. """ compoundId = datamodel.ReadGroupSetCompoundId.parse(id_) dataset = self.getDataset(compoundId.dataset_id) return dataset.getReadGroupSet(id_)
[ "Returns", "the", "readgroup", "set", "with", "the", "specified", "ID", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L199-L205
[ "def", "getReadGroupSet", "(", "self", ",", "id_", ")", ":", "compoundId", "=", "datamodel", ".", "ReadGroupSetCompoundId", ".", "parse", "(", "id_", ")", "dataset", "=", "self", ".", "getDataset", "(", "compoundId", ".", "dataset_id", ")", "return", "datase...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.getVariantSet
Returns the readgroup set with the specified ID.
ga4gh/server/datarepo.py
def getVariantSet(self, id_): """ Returns the readgroup set with the specified ID. """ compoundId = datamodel.VariantSetCompoundId.parse(id_) dataset = self.getDataset(compoundId.dataset_id) return dataset.getVariantSet(id_)
def getVariantSet(self, id_): """ Returns the readgroup set with the specified ID. """ compoundId = datamodel.VariantSetCompoundId.parse(id_) dataset = self.getDataset(compoundId.dataset_id) return dataset.getVariantSet(id_)
[ "Returns", "the", "readgroup", "set", "with", "the", "specified", "ID", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L207-L213
[ "def", "getVariantSet", "(", "self", ",", "id_", ")", ":", "compoundId", "=", "datamodel", ".", "VariantSetCompoundId", ".", "parse", "(", "id_", ")", "dataset", "=", "self", ".", "getDataset", "(", "compoundId", ".", "dataset_id", ")", "return", "dataset", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.printSummary
Prints a summary of this data repository to stdout.
ga4gh/server/datarepo.py
def printSummary(self): """ Prints a summary of this data repository to stdout. """ print("Ontologies:") for ontology in self.getOntologys(): print( "", ontology.getOntologyPrefix(), ontology.getName(), o...
def printSummary(self): """ Prints a summary of this data repository to stdout. """ print("Ontologies:") for ontology in self.getOntologys(): print( "", ontology.getOntologyPrefix(), ontology.getName(), o...
[ "Prints", "a", "summary", "of", "this", "data", "repository", "to", "stdout", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L215-L300
[ "def", "printSummary", "(", "self", ")", ":", "print", "(", "\"Ontologies:\"", ")", "for", "ontology", "in", "self", ".", "getOntologys", "(", ")", ":", "print", "(", "\"\"", ",", "ontology", ".", "getOntologyPrefix", "(", ")", ",", "ontology", ".", "get...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allReadGroups
Return an iterator over all read groups in the data repo
ga4gh/server/datarepo.py
def allReadGroups(self): """ Return an iterator over all read groups in the data repo """ for dataset in self.getDatasets(): for readGroupSet in dataset.getReadGroupSets(): for readGroup in readGroupSet.getReadGroups(): yield readGroup
def allReadGroups(self): """ Return an iterator over all read groups in the data repo """ for dataset in self.getDatasets(): for readGroupSet in dataset.getReadGroupSets(): for readGroup in readGroupSet.getReadGroups(): yield readGroup
[ "Return", "an", "iterator", "over", "all", "read", "groups", "in", "the", "data", "repo" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L334-L341
[ "def", "allReadGroups", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "readGroupSet", "in", "dataset", ".", "getReadGroupSets", "(", ")", ":", "for", "readGroup", "in", "readGroupSet", ".", "getReadGroups", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allFeatures
Return an iterator over all features in the data repo
ga4gh/server/datarepo.py
def allFeatures(self): """ Return an iterator over all features in the data repo """ for dataset in self.getDatasets(): for featureSet in dataset.getFeatureSets(): for feature in featureSet.getFeatures(): yield feature
def allFeatures(self): """ Return an iterator over all features in the data repo """ for dataset in self.getDatasets(): for featureSet in dataset.getFeatureSets(): for feature in featureSet.getFeatures(): yield feature
[ "Return", "an", "iterator", "over", "all", "features", "in", "the", "data", "repo" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L359-L366
[ "def", "allFeatures", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "featureSet", "in", "dataset", ".", "getFeatureSets", "(", ")", ":", "for", "feature", "in", "featureSet", ".", "getFeatures", "(", ")"...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allCallSets
Return an iterator over all call sets in the data repo
ga4gh/server/datarepo.py
def allCallSets(self): """ Return an iterator over all call sets in the data repo """ for dataset in self.getDatasets(): for variantSet in dataset.getVariantSets(): for callSet in variantSet.getCallSets(): yield callSet
def allCallSets(self): """ Return an iterator over all call sets in the data repo """ for dataset in self.getDatasets(): for variantSet in dataset.getVariantSets(): for callSet in variantSet.getCallSets(): yield callSet
[ "Return", "an", "iterator", "over", "all", "call", "sets", "in", "the", "data", "repo" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L376-L383
[ "def", "allCallSets", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "variantSet", "in", "dataset", ".", "getVariantSets", "(", ")", ":", "for", "callSet", "in", "variantSet", ".", "getCallSets", "(", ")"...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allVariantAnnotationSets
Return an iterator over all variant annotation sets in the data repo
ga4gh/server/datarepo.py
def allVariantAnnotationSets(self): """ Return an iterator over all variant annotation sets in the data repo """ for dataset in self.getDatasets(): for variantSet in dataset.getVariantSets(): for vaSet in variantSet.getVariantAnnotationSets(): ...
def allVariantAnnotationSets(self): """ Return an iterator over all variant annotation sets in the data repo """ for dataset in self.getDatasets(): for variantSet in dataset.getVariantSets(): for vaSet in variantSet.getVariantAnnotationSets(): ...
[ "Return", "an", "iterator", "over", "all", "variant", "annotation", "sets", "in", "the", "data", "repo" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L385-L393
[ "def", "allVariantAnnotationSets", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "variantSet", "in", "dataset", ".", "getVariantSets", "(", ")", ":", "for", "vaSet", "in", "variantSet", ".", "getVariantAnnot...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allRnaQuantifications
Return an iterator over all rna quantifications
ga4gh/server/datarepo.py
def allRnaQuantifications(self): """ Return an iterator over all rna quantifications """ for dataset in self.getDatasets(): for rnaQuantificationSet in dataset.getRnaQuantificationSets(): for rnaQuantification in \ rnaQuantificationSet....
def allRnaQuantifications(self): """ Return an iterator over all rna quantifications """ for dataset in self.getDatasets(): for rnaQuantificationSet in dataset.getRnaQuantificationSets(): for rnaQuantification in \ rnaQuantificationSet....
[ "Return", "an", "iterator", "over", "all", "rna", "quantifications" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L412-L420
[ "def", "allRnaQuantifications", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "rnaQuantificationSet", "in", "dataset", ".", "getRnaQuantificationSets", "(", ")", ":", "for", "rnaQuantification", "in", "rnaQuanti...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
AbstractDataRepository.allExpressionLevels
Return an iterator over all expression levels
ga4gh/server/datarepo.py
def allExpressionLevels(self): """ Return an iterator over all expression levels """ for dataset in self.getDatasets(): for rnaQuantificationSet in dataset.getRnaQuantificationSets(): for rnaQuantification in \ rnaQuantificationSet.getR...
def allExpressionLevels(self): """ Return an iterator over all expression levels """ for dataset in self.getDatasets(): for rnaQuantificationSet in dataset.getRnaQuantificationSets(): for rnaQuantification in \ rnaQuantificationSet.getR...
[ "Return", "an", "iterator", "over", "all", "expression", "levels" ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L422-L432
[ "def", "allExpressionLevels", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "getDatasets", "(", ")", ":", "for", "rnaQuantificationSet", "in", "dataset", ".", "getRnaQuantificationSets", "(", ")", ":", "for", "rnaQuantification", "in", "rnaQuantifi...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqlDataRepository.getPeer
Finds a peer by URL and return the first peer record with that URL.
ga4gh/server/datarepo.py
def getPeer(self, url): """ Finds a peer by URL and return the first peer record with that URL. """ peers = list(models.Peer.select().where(models.Peer.url == url)) if len(peers) == 0: raise exceptions.PeerNotFoundException(url) return peers[0]
def getPeer(self, url): """ Finds a peer by URL and return the first peer record with that URL. """ peers = list(models.Peer.select().where(models.Peer.url == url)) if len(peers) == 0: raise exceptions.PeerNotFoundException(url) return peers[0]
[ "Finds", "a", "peer", "by", "URL", "and", "return", "the", "first", "peer", "record", "with", "that", "URL", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L528-L535
[ "def", "getPeer", "(", "self", ",", "url", ")", ":", "peers", "=", "list", "(", "models", ".", "Peer", ".", "select", "(", ")", ".", "where", "(", "models", ".", "Peer", ".", "url", "==", "url", ")", ")", "if", "len", "(", "peers", ")", "==", ...
1aa18922ef136db8604f6f098cb1732cba6f2a76
train
SqlDataRepository.getPeers
Get the list of peers using an SQL offset and limit. Returns a list of peer datamodel objects in a list.
ga4gh/server/datarepo.py
def getPeers(self, offset=0, limit=1000): """ Get the list of peers using an SQL offset and limit. Returns a list of peer datamodel objects in a list. """ select = models.Peer.select().order_by( models.Peer.url).limit(limit).offset(offset) return [peers.Peer(p...
def getPeers(self, offset=0, limit=1000): """ Get the list of peers using an SQL offset and limit. Returns a list of peer datamodel objects in a list. """ select = models.Peer.select().order_by( models.Peer.url).limit(limit).offset(offset) return [peers.Peer(p...
[ "Get", "the", "list", "of", "peers", "using", "an", "SQL", "offset", "and", "limit", ".", "Returns", "a", "list", "of", "peer", "datamodel", "objects", "in", "a", "list", "." ]
ga4gh/ga4gh-server
python
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L537-L544
[ "def", "getPeers", "(", "self", ",", "offset", "=", "0", ",", "limit", "=", "1000", ")", ":", "select", "=", "models", ".", "Peer", ".", "select", "(", ")", ".", "order_by", "(", "models", ".", "Peer", ".", "url", ")", ".", "limit", "(", "limit",...
1aa18922ef136db8604f6f098cb1732cba6f2a76