repository_name stringlengths 7 55 | func_path_in_repository stringlengths 4 223 | func_name stringlengths 1 134 | whole_func_string stringlengths 75 104k | language stringclasses 1
value | func_code_string stringlengths 75 104k | func_code_tokens listlengths 19 28.4k | func_documentation_string stringlengths 1 46.9k | func_documentation_tokens listlengths 1 1.97k | split_name stringclasses 1
value | func_code_url stringlengths 87 315 |
|---|---|---|---|---|---|---|---|---|---|---|
ga4gh/ga4gh-server | ga4gh/server/backend.py | Backend.runSearchContinuousSets | def runSearchContinuousSets(self, request):
"""
Returns a SearchContinuousSetsResponse for the specified
SearchContinuousSetsRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchContinuousSetsRequest,
protocol.SearchContinuousSetsRespo... | python | def runSearchContinuousSets(self, request):
"""
Returns a SearchContinuousSetsResponse for the specified
SearchContinuousSetsRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchContinuousSetsRequest,
protocol.SearchContinuousSetsRespo... | [
"def",
"runSearchContinuousSets",
"(",
"self",
",",
"request",
")",
":",
"return",
"self",
".",
"runSearchRequest",
"(",
"request",
",",
"protocol",
".",
"SearchContinuousSetsRequest",
",",
"protocol",
".",
"SearchContinuousSetsResponse",
",",
"self",
".",
"continuo... | Returns a SearchContinuousSetsResponse for the specified
SearchContinuousSetsRequest object. | [
"Returns",
"a",
"SearchContinuousSetsResponse",
"for",
"the",
"specified",
"SearchContinuousSetsRequest",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/backend.py#L1014-L1022 |
ga4gh/ga4gh-server | ga4gh/server/backend.py | Backend.runSearchContinuous | def runSearchContinuous(self, request):
"""
Returns a SearchContinuousResponse for the specified
SearchContinuousRequest object.
:param request: JSON string representing searchContinuousRequest
:return: JSON string representing searchContinuousResponse
"""
return... | python | def runSearchContinuous(self, request):
"""
Returns a SearchContinuousResponse for the specified
SearchContinuousRequest object.
:param request: JSON string representing searchContinuousRequest
:return: JSON string representing searchContinuousResponse
"""
return... | [
"def",
"runSearchContinuous",
"(",
"self",
",",
"request",
")",
":",
"return",
"self",
".",
"runSearchRequest",
"(",
"request",
",",
"protocol",
".",
"SearchContinuousRequest",
",",
"protocol",
".",
"SearchContinuousResponse",
",",
"self",
".",
"continuousGenerator"... | Returns a SearchContinuousResponse for the specified
SearchContinuousRequest object.
:param request: JSON string representing searchContinuousRequest
:return: JSON string representing searchContinuousResponse | [
"Returns",
"a",
"SearchContinuousResponse",
"for",
"the",
"specified",
"SearchContinuousRequest",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/backend.py#L1024-L1035 |
ga4gh/ga4gh-server | ga4gh/server/backend.py | Backend.runSearchRnaQuantificationSets | def runSearchRnaQuantificationSets(self, request):
"""
Returns a SearchRnaQuantificationSetsResponse for the specified
SearchRnaQuantificationSetsRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchRnaQuantificationSetsRequest,
protoc... | python | def runSearchRnaQuantificationSets(self, request):
"""
Returns a SearchRnaQuantificationSetsResponse for the specified
SearchRnaQuantificationSetsRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchRnaQuantificationSetsRequest,
protoc... | [
"def",
"runSearchRnaQuantificationSets",
"(",
"self",
",",
"request",
")",
":",
"return",
"self",
".",
"runSearchRequest",
"(",
"request",
",",
"protocol",
".",
"SearchRnaQuantificationSetsRequest",
",",
"protocol",
".",
"SearchRnaQuantificationSetsResponse",
",",
"self... | Returns a SearchRnaQuantificationSetsResponse for the specified
SearchRnaQuantificationSetsRequest object. | [
"Returns",
"a",
"SearchRnaQuantificationSetsResponse",
"for",
"the",
"specified",
"SearchRnaQuantificationSetsRequest",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/backend.py#L1055-L1063 |
ga4gh/ga4gh-server | ga4gh/server/backend.py | Backend.runSearchRnaQuantifications | def runSearchRnaQuantifications(self, request):
"""
Returns a SearchRnaQuantificationResponse for the specified
SearchRnaQuantificationRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchRnaQuantificationsRequest,
protocol.SearchRnaQu... | python | def runSearchRnaQuantifications(self, request):
"""
Returns a SearchRnaQuantificationResponse for the specified
SearchRnaQuantificationRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchRnaQuantificationsRequest,
protocol.SearchRnaQu... | [
"def",
"runSearchRnaQuantifications",
"(",
"self",
",",
"request",
")",
":",
"return",
"self",
".",
"runSearchRequest",
"(",
"request",
",",
"protocol",
".",
"SearchRnaQuantificationsRequest",
",",
"protocol",
".",
"SearchRnaQuantificationsResponse",
",",
"self",
".",... | Returns a SearchRnaQuantificationResponse for the specified
SearchRnaQuantificationRequest object. | [
"Returns",
"a",
"SearchRnaQuantificationResponse",
"for",
"the",
"specified",
"SearchRnaQuantificationRequest",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/backend.py#L1065-L1073 |
ga4gh/ga4gh-server | ga4gh/server/backend.py | Backend.runSearchExpressionLevels | def runSearchExpressionLevels(self, request):
"""
Returns a SearchExpressionLevelResponse for the specified
SearchExpressionLevelRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchExpressionLevelsRequest,
protocol.SearchExpressionLev... | python | def runSearchExpressionLevels(self, request):
"""
Returns a SearchExpressionLevelResponse for the specified
SearchExpressionLevelRequest object.
"""
return self.runSearchRequest(
request, protocol.SearchExpressionLevelsRequest,
protocol.SearchExpressionLev... | [
"def",
"runSearchExpressionLevels",
"(",
"self",
",",
"request",
")",
":",
"return",
"self",
".",
"runSearchRequest",
"(",
"request",
",",
"protocol",
".",
"SearchExpressionLevelsRequest",
",",
"protocol",
".",
"SearchExpressionLevelsResponse",
",",
"self",
".",
"ex... | Returns a SearchExpressionLevelResponse for the specified
SearchExpressionLevelRequest object. | [
"Returns",
"a",
"SearchExpressionLevelResponse",
"for",
"the",
"specified",
"SearchExpressionLevelRequest",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/backend.py#L1075-L1083 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.populateFromRow | def populateFromRow(self, dataset):
"""
Populates the instance variables of this Dataset from the
specified database row.
"""
self._description = dataset.description
self.setAttributesJson(dataset.attributes) | python | def populateFromRow(self, dataset):
"""
Populates the instance variables of this Dataset from the
specified database row.
"""
self._description = dataset.description
self.setAttributesJson(dataset.attributes) | [
"def",
"populateFromRow",
"(",
"self",
",",
"dataset",
")",
":",
"self",
".",
"_description",
"=",
"dataset",
".",
"description",
"self",
".",
"setAttributesJson",
"(",
"dataset",
".",
"attributes",
")"
] | Populates the instance variables of this Dataset from the
specified database row. | [
"Populates",
"the",
"instance",
"variables",
"of",
"this",
"Dataset",
"from",
"the",
"specified",
"database",
"row",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L56-L62 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addVariantSet | def addVariantSet(self, variantSet):
"""
Adds the specified variantSet to this dataset.
"""
id_ = variantSet.getId()
self._variantSetIdMap[id_] = variantSet
self._variantSetNameMap[variantSet.getLocalId()] = variantSet
self._variantSetIds.append(id_) | python | def addVariantSet(self, variantSet):
"""
Adds the specified variantSet to this dataset.
"""
id_ = variantSet.getId()
self._variantSetIdMap[id_] = variantSet
self._variantSetNameMap[variantSet.getLocalId()] = variantSet
self._variantSetIds.append(id_) | [
"def",
"addVariantSet",
"(",
"self",
",",
"variantSet",
")",
":",
"id_",
"=",
"variantSet",
".",
"getId",
"(",
")",
"self",
".",
"_variantSetIdMap",
"[",
"id_",
"]",
"=",
"variantSet",
"self",
".",
"_variantSetNameMap",
"[",
"variantSet",
".",
"getLocalId",
... | Adds the specified variantSet to this dataset. | [
"Adds",
"the",
"specified",
"variantSet",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L70-L77 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addBiosample | def addBiosample(self, biosample):
"""
Adds the specified biosample to this dataset.
"""
id_ = biosample.getId()
self._biosampleIdMap[id_] = biosample
self._biosampleIds.append(id_)
self._biosampleNameMap[biosample.getName()] = biosample | python | def addBiosample(self, biosample):
"""
Adds the specified biosample to this dataset.
"""
id_ = biosample.getId()
self._biosampleIdMap[id_] = biosample
self._biosampleIds.append(id_)
self._biosampleNameMap[biosample.getName()] = biosample | [
"def",
"addBiosample",
"(",
"self",
",",
"biosample",
")",
":",
"id_",
"=",
"biosample",
".",
"getId",
"(",
")",
"self",
".",
"_biosampleIdMap",
"[",
"id_",
"]",
"=",
"biosample",
"self",
".",
"_biosampleIds",
".",
"append",
"(",
"id_",
")",
"self",
".... | Adds the specified biosample to this dataset. | [
"Adds",
"the",
"specified",
"biosample",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L79-L86 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addIndividual | def addIndividual(self, individual):
"""
Adds the specified individual to this dataset.
"""
id_ = individual.getId()
self._individualIdMap[id_] = individual
self._individualIds.append(id_)
self._individualNameMap[individual.getName()] = individual | python | def addIndividual(self, individual):
"""
Adds the specified individual to this dataset.
"""
id_ = individual.getId()
self._individualIdMap[id_] = individual
self._individualIds.append(id_)
self._individualNameMap[individual.getName()] = individual | [
"def",
"addIndividual",
"(",
"self",
",",
"individual",
")",
":",
"id_",
"=",
"individual",
".",
"getId",
"(",
")",
"self",
".",
"_individualIdMap",
"[",
"id_",
"]",
"=",
"individual",
"self",
".",
"_individualIds",
".",
"append",
"(",
"id_",
")",
"self"... | Adds the specified individual to this dataset. | [
"Adds",
"the",
"specified",
"individual",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L88-L95 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addFeatureSet | def addFeatureSet(self, featureSet):
"""
Adds the specified featureSet to this dataset.
"""
id_ = featureSet.getId()
self._featureSetIdMap[id_] = featureSet
self._featureSetIds.append(id_)
name = featureSet.getLocalId()
self._featureSetNameMap[name] = feat... | python | def addFeatureSet(self, featureSet):
"""
Adds the specified featureSet to this dataset.
"""
id_ = featureSet.getId()
self._featureSetIdMap[id_] = featureSet
self._featureSetIds.append(id_)
name = featureSet.getLocalId()
self._featureSetNameMap[name] = feat... | [
"def",
"addFeatureSet",
"(",
"self",
",",
"featureSet",
")",
":",
"id_",
"=",
"featureSet",
".",
"getId",
"(",
")",
"self",
".",
"_featureSetIdMap",
"[",
"id_",
"]",
"=",
"featureSet",
"self",
".",
"_featureSetIds",
".",
"append",
"(",
"id_",
")",
"name"... | Adds the specified featureSet to this dataset. | [
"Adds",
"the",
"specified",
"featureSet",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L97-L105 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addContinuousSet | def addContinuousSet(self, continuousSet):
"""
Adds the specified continuousSet to this dataset.
"""
id_ = continuousSet.getId()
self._continuousSetIdMap[id_] = continuousSet
self._continuousSetIds.append(id_)
name = continuousSet.getLocalId()
self._contin... | python | def addContinuousSet(self, continuousSet):
"""
Adds the specified continuousSet to this dataset.
"""
id_ = continuousSet.getId()
self._continuousSetIdMap[id_] = continuousSet
self._continuousSetIds.append(id_)
name = continuousSet.getLocalId()
self._contin... | [
"def",
"addContinuousSet",
"(",
"self",
",",
"continuousSet",
")",
":",
"id_",
"=",
"continuousSet",
".",
"getId",
"(",
")",
"self",
".",
"_continuousSetIdMap",
"[",
"id_",
"]",
"=",
"continuousSet",
"self",
".",
"_continuousSetIds",
".",
"append",
"(",
"id_... | Adds the specified continuousSet to this dataset. | [
"Adds",
"the",
"specified",
"continuousSet",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L107-L115 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addReadGroupSet | def addReadGroupSet(self, readGroupSet):
"""
Adds the specified readGroupSet to this dataset.
"""
id_ = readGroupSet.getId()
self._readGroupSetIdMap[id_] = readGroupSet
self._readGroupSetNameMap[readGroupSet.getLocalId()] = readGroupSet
self._readGroupSetIds.appen... | python | def addReadGroupSet(self, readGroupSet):
"""
Adds the specified readGroupSet to this dataset.
"""
id_ = readGroupSet.getId()
self._readGroupSetIdMap[id_] = readGroupSet
self._readGroupSetNameMap[readGroupSet.getLocalId()] = readGroupSet
self._readGroupSetIds.appen... | [
"def",
"addReadGroupSet",
"(",
"self",
",",
"readGroupSet",
")",
":",
"id_",
"=",
"readGroupSet",
".",
"getId",
"(",
")",
"self",
".",
"_readGroupSetIdMap",
"[",
"id_",
"]",
"=",
"readGroupSet",
"self",
".",
"_readGroupSetNameMap",
"[",
"readGroupSet",
".",
... | Adds the specified readGroupSet to this dataset. | [
"Adds",
"the",
"specified",
"readGroupSet",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L117-L124 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addRnaQuantificationSet | def addRnaQuantificationSet(self, rnaQuantSet):
"""
Adds the specified rnaQuantification set to this dataset.
"""
id_ = rnaQuantSet.getId()
self._rnaQuantificationSetIdMap[id_] = rnaQuantSet
self._rnaQuantificationSetIds.append(id_)
name = rnaQuantSet.getLocalId()... | python | def addRnaQuantificationSet(self, rnaQuantSet):
"""
Adds the specified rnaQuantification set to this dataset.
"""
id_ = rnaQuantSet.getId()
self._rnaQuantificationSetIdMap[id_] = rnaQuantSet
self._rnaQuantificationSetIds.append(id_)
name = rnaQuantSet.getLocalId()... | [
"def",
"addRnaQuantificationSet",
"(",
"self",
",",
"rnaQuantSet",
")",
":",
"id_",
"=",
"rnaQuantSet",
".",
"getId",
"(",
")",
"self",
".",
"_rnaQuantificationSetIdMap",
"[",
"id_",
"]",
"=",
"rnaQuantSet",
"self",
".",
"_rnaQuantificationSetIds",
".",
"append"... | Adds the specified rnaQuantification set to this dataset. | [
"Adds",
"the",
"specified",
"rnaQuantification",
"set",
"to",
"this",
"dataset",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L126-L134 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getVariantSet | def getVariantSet(self, id_):
"""
Returns the VariantSet with the specified name, or raises a
VariantSetNotFoundException otherwise.
"""
if id_ not in self._variantSetIdMap:
raise exceptions.VariantSetNotFoundException(id_)
return self._variantSetIdMap[id_] | python | def getVariantSet(self, id_):
"""
Returns the VariantSet with the specified name, or raises a
VariantSetNotFoundException otherwise.
"""
if id_ not in self._variantSetIdMap:
raise exceptions.VariantSetNotFoundException(id_)
return self._variantSetIdMap[id_] | [
"def",
"getVariantSet",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_variantSetIdMap",
":",
"raise",
"exceptions",
".",
"VariantSetNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_variantSetIdMap",
"[",
"id_",
"]"
... | Returns the VariantSet with the specified name, or raises a
VariantSetNotFoundException otherwise. | [
"Returns",
"the",
"VariantSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"VariantSetNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L156-L163 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getVariantSetByName | def getVariantSetByName(self, name):
"""
Returns a VariantSet with the specified name, or raises a
VariantSetNameNotFoundException if it does not exist.
"""
if name not in self._variantSetNameMap:
raise exceptions.VariantSetNameNotFoundException(name)
return s... | python | def getVariantSetByName(self, name):
"""
Returns a VariantSet with the specified name, or raises a
VariantSetNameNotFoundException if it does not exist.
"""
if name not in self._variantSetNameMap:
raise exceptions.VariantSetNameNotFoundException(name)
return s... | [
"def",
"getVariantSetByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_variantSetNameMap",
":",
"raise",
"exceptions",
".",
"VariantSetNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_variantSetNameMap",
"["... | Returns a VariantSet with the specified name, or raises a
VariantSetNameNotFoundException if it does not exist. | [
"Returns",
"a",
"VariantSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"VariantSetNameNotFoundException",
"if",
"it",
"does",
"not",
"exist",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L171-L178 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.addPhenotypeAssociationSet | def addPhenotypeAssociationSet(self, phenotypeAssociationSet):
"""
Adds the specified g2p association set to this backend.
"""
id_ = phenotypeAssociationSet.getId()
self._phenotypeAssociationSetIdMap[id_] = phenotypeAssociationSet
self._phenotypeAssociationSetNameMap[
... | python | def addPhenotypeAssociationSet(self, phenotypeAssociationSet):
"""
Adds the specified g2p association set to this backend.
"""
id_ = phenotypeAssociationSet.getId()
self._phenotypeAssociationSetIdMap[id_] = phenotypeAssociationSet
self._phenotypeAssociationSetNameMap[
... | [
"def",
"addPhenotypeAssociationSet",
"(",
"self",
",",
"phenotypeAssociationSet",
")",
":",
"id_",
"=",
"phenotypeAssociationSet",
".",
"getId",
"(",
")",
"self",
".",
"_phenotypeAssociationSetIdMap",
"[",
"id_",
"]",
"=",
"phenotypeAssociationSet",
"self",
".",
"_p... | Adds the specified g2p association set to this backend. | [
"Adds",
"the",
"specified",
"g2p",
"association",
"set",
"to",
"this",
"backend",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L180-L188 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getFeatureSet | def getFeatureSet(self, id_):
"""
Returns the FeatureSet with the specified id, or raises a
FeatureSetNotFoundException otherwise.
"""
if id_ not in self._featureSetIdMap:
raise exceptions.FeatureSetNotFoundException(id_)
return self._featureSetIdMap[id_] | python | def getFeatureSet(self, id_):
"""
Returns the FeatureSet with the specified id, or raises a
FeatureSetNotFoundException otherwise.
"""
if id_ not in self._featureSetIdMap:
raise exceptions.FeatureSetNotFoundException(id_)
return self._featureSetIdMap[id_] | [
"def",
"getFeatureSet",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_featureSetIdMap",
":",
"raise",
"exceptions",
".",
"FeatureSetNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_featureSetIdMap",
"[",
"id_",
"]"
... | Returns the FeatureSet with the specified id, or raises a
FeatureSetNotFoundException otherwise. | [
"Returns",
"the",
"FeatureSet",
"with",
"the",
"specified",
"id",
"or",
"raises",
"a",
"FeatureSetNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L224-L231 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getFeatureSetByName | def getFeatureSetByName(self, name):
"""
Returns the FeatureSet with the specified name, or raises
an exception otherwise.
"""
if name not in self._featureSetNameMap:
raise exceptions.FeatureSetNameNotFoundException(name)
return self._featureSetNameMap[name] | python | def getFeatureSetByName(self, name):
"""
Returns the FeatureSet with the specified name, or raises
an exception otherwise.
"""
if name not in self._featureSetNameMap:
raise exceptions.FeatureSetNameNotFoundException(name)
return self._featureSetNameMap[name] | [
"def",
"getFeatureSetByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_featureSetNameMap",
":",
"raise",
"exceptions",
".",
"FeatureSetNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_featureSetNameMap",
"["... | Returns the FeatureSet with the specified name, or raises
an exception otherwise. | [
"Returns",
"the",
"FeatureSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"an",
"exception",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L233-L240 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getContinuousSet | def getContinuousSet(self, id_):
"""
Returns the ContinuousSet with the specified id, or raises a
ContinuousSetNotFoundException otherwise.
"""
if id_ not in self._continuousSetIdMap:
raise exceptions.ContinuousSetNotFoundException(id_)
return self._continuous... | python | def getContinuousSet(self, id_):
"""
Returns the ContinuousSet with the specified id, or raises a
ContinuousSetNotFoundException otherwise.
"""
if id_ not in self._continuousSetIdMap:
raise exceptions.ContinuousSetNotFoundException(id_)
return self._continuous... | [
"def",
"getContinuousSet",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_continuousSetIdMap",
":",
"raise",
"exceptions",
".",
"ContinuousSetNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_continuousSetIdMap",
"[",
"... | Returns the ContinuousSet with the specified id, or raises a
ContinuousSetNotFoundException otherwise. | [
"Returns",
"the",
"ContinuousSet",
"with",
"the",
"specified",
"id",
"or",
"raises",
"a",
"ContinuousSetNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L261-L268 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getContinuousSetByName | def getContinuousSetByName(self, name):
"""
Returns the ContinuousSet with the specified name, or raises
an exception otherwise.
"""
if name not in self._continuousSetNameMap:
raise exceptions.ContinuousSetNameNotFoundException(name)
return self._continuousSet... | python | def getContinuousSetByName(self, name):
"""
Returns the ContinuousSet with the specified name, or raises
an exception otherwise.
"""
if name not in self._continuousSetNameMap:
raise exceptions.ContinuousSetNameNotFoundException(name)
return self._continuousSet... | [
"def",
"getContinuousSetByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_continuousSetNameMap",
":",
"raise",
"exceptions",
".",
"ContinuousSetNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_continuousSetNam... | Returns the ContinuousSet with the specified name, or raises
an exception otherwise. | [
"Returns",
"the",
"ContinuousSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"an",
"exception",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L270-L277 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getBiosampleByName | def getBiosampleByName(self, name):
"""
Returns a Biosample with the specified name, or raises a
BiosampleNameNotFoundException if it does not exist.
"""
if name not in self._biosampleNameMap:
raise exceptions.BiosampleNameNotFoundException(name)
return self._... | python | def getBiosampleByName(self, name):
"""
Returns a Biosample with the specified name, or raises a
BiosampleNameNotFoundException if it does not exist.
"""
if name not in self._biosampleNameMap:
raise exceptions.BiosampleNameNotFoundException(name)
return self._... | [
"def",
"getBiosampleByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_biosampleNameMap",
":",
"raise",
"exceptions",
".",
"BiosampleNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_biosampleNameMap",
"[",
... | Returns a Biosample with the specified name, or raises a
BiosampleNameNotFoundException if it does not exist. | [
"Returns",
"a",
"Biosample",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"BiosampleNameNotFoundException",
"if",
"it",
"does",
"not",
"exist",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L291-L298 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getBiosample | def getBiosample(self, id_):
"""
Returns the Biosample with the specified id, or raises
a BiosampleNotFoundException otherwise.
"""
if id_ not in self._biosampleIdMap:
raise exceptions.BiosampleNotFoundException(id_)
return self._biosampleIdMap[id_] | python | def getBiosample(self, id_):
"""
Returns the Biosample with the specified id, or raises
a BiosampleNotFoundException otherwise.
"""
if id_ not in self._biosampleIdMap:
raise exceptions.BiosampleNotFoundException(id_)
return self._biosampleIdMap[id_] | [
"def",
"getBiosample",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_biosampleIdMap",
":",
"raise",
"exceptions",
".",
"BiosampleNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_biosampleIdMap",
"[",
"id_",
"]"
] | Returns the Biosample with the specified id, or raises
a BiosampleNotFoundException otherwise. | [
"Returns",
"the",
"Biosample",
"with",
"the",
"specified",
"id",
"or",
"raises",
"a",
"BiosampleNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L300-L307 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getIndividualByName | def getIndividualByName(self, name):
"""
Returns an individual with the specified name, or raises a
IndividualNameNotFoundException if it does not exist.
"""
if name not in self._individualNameMap:
raise exceptions.IndividualNameNotFoundException(name)
return ... | python | def getIndividualByName(self, name):
"""
Returns an individual with the specified name, or raises a
IndividualNameNotFoundException if it does not exist.
"""
if name not in self._individualNameMap:
raise exceptions.IndividualNameNotFoundException(name)
return ... | [
"def",
"getIndividualByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_individualNameMap",
":",
"raise",
"exceptions",
".",
"IndividualNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_individualNameMap",
"["... | Returns an individual with the specified name, or raises a
IndividualNameNotFoundException if it does not exist. | [
"Returns",
"an",
"individual",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"IndividualNameNotFoundException",
"if",
"it",
"does",
"not",
"exist",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L315-L322 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getIndividual | def getIndividual(self, id_):
"""
Returns the Individual with the specified id, or raises
a IndividualNotFoundException otherwise.
"""
if id_ not in self._individualIdMap:
raise exceptions.IndividualNotFoundException(id_)
return self._individualIdMap[id_] | python | def getIndividual(self, id_):
"""
Returns the Individual with the specified id, or raises
a IndividualNotFoundException otherwise.
"""
if id_ not in self._individualIdMap:
raise exceptions.IndividualNotFoundException(id_)
return self._individualIdMap[id_] | [
"def",
"getIndividual",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_individualIdMap",
":",
"raise",
"exceptions",
".",
"IndividualNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_individualIdMap",
"[",
"id_",
"]"
... | Returns the Individual with the specified id, or raises
a IndividualNotFoundException otherwise. | [
"Returns",
"the",
"Individual",
"with",
"the",
"specified",
"id",
"or",
"raises",
"a",
"IndividualNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L324-L331 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getReadGroupSetByName | def getReadGroupSetByName(self, name):
"""
Returns a ReadGroupSet with the specified name, or raises a
ReadGroupSetNameNotFoundException if it does not exist.
"""
if name not in self._readGroupSetNameMap:
raise exceptions.ReadGroupSetNameNotFoundException(name)
... | python | def getReadGroupSetByName(self, name):
"""
Returns a ReadGroupSet with the specified name, or raises a
ReadGroupSetNameNotFoundException if it does not exist.
"""
if name not in self._readGroupSetNameMap:
raise exceptions.ReadGroupSetNameNotFoundException(name)
... | [
"def",
"getReadGroupSetByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_readGroupSetNameMap",
":",
"raise",
"exceptions",
".",
"ReadGroupSetNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",
"_readGroupSetNameMap... | Returns a ReadGroupSet with the specified name, or raises a
ReadGroupSetNameNotFoundException if it does not exist. | [
"Returns",
"a",
"ReadGroupSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"ReadGroupSetNameNotFoundException",
"if",
"it",
"does",
"not",
"exist",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L345-L352 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getReadGroupSet | def getReadGroupSet(self, id_):
"""
Returns the ReadGroupSet with the specified name, or raises
a ReadGroupSetNotFoundException otherwise.
"""
if id_ not in self._readGroupSetIdMap:
raise exceptions.ReadGroupNotFoundException(id_)
return self._readGroupSetIdMa... | python | def getReadGroupSet(self, id_):
"""
Returns the ReadGroupSet with the specified name, or raises
a ReadGroupSetNotFoundException otherwise.
"""
if id_ not in self._readGroupSetIdMap:
raise exceptions.ReadGroupNotFoundException(id_)
return self._readGroupSetIdMa... | [
"def",
"getReadGroupSet",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_readGroupSetIdMap",
":",
"raise",
"exceptions",
".",
"ReadGroupNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_readGroupSetIdMap",
"[",
"id_",
... | Returns the ReadGroupSet with the specified name, or raises
a ReadGroupSetNotFoundException otherwise. | [
"Returns",
"the",
"ReadGroupSet",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"ReadGroupSetNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L360-L367 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getRnaQuantificationSetByName | def getRnaQuantificationSetByName(self, name):
"""
Returns the RnaQuantification set with the specified name, or raises
an exception otherwise.
"""
if name not in self._rnaQuantificationSetNameMap:
raise exceptions.RnaQuantificationSetNameNotFoundException(name)
... | python | def getRnaQuantificationSetByName(self, name):
"""
Returns the RnaQuantification set with the specified name, or raises
an exception otherwise.
"""
if name not in self._rnaQuantificationSetNameMap:
raise exceptions.RnaQuantificationSetNameNotFoundException(name)
... | [
"def",
"getRnaQuantificationSetByName",
"(",
"self",
",",
"name",
")",
":",
"if",
"name",
"not",
"in",
"self",
".",
"_rnaQuantificationSetNameMap",
":",
"raise",
"exceptions",
".",
"RnaQuantificationSetNameNotFoundException",
"(",
"name",
")",
"return",
"self",
".",... | Returns the RnaQuantification set with the specified name, or raises
an exception otherwise. | [
"Returns",
"the",
"RnaQuantification",
"set",
"with",
"the",
"specified",
"name",
"or",
"raises",
"an",
"exception",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L402-L409 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/datasets.py | Dataset.getRnaQuantificationSet | def getRnaQuantificationSet(self, id_):
"""
Returns the RnaQuantification set with the specified name, or raises
a RnaQuantificationSetNotFoundException otherwise.
"""
if id_ not in self._rnaQuantificationSetIdMap:
raise exceptions.RnaQuantificationSetNotFoundExceptio... | python | def getRnaQuantificationSet(self, id_):
"""
Returns the RnaQuantification set with the specified name, or raises
a RnaQuantificationSetNotFoundException otherwise.
"""
if id_ not in self._rnaQuantificationSetIdMap:
raise exceptions.RnaQuantificationSetNotFoundExceptio... | [
"def",
"getRnaQuantificationSet",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_rnaQuantificationSetIdMap",
":",
"raise",
"exceptions",
".",
"RnaQuantificationSetNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_rnaQuantif... | Returns the RnaQuantification set with the specified name, or raises
a RnaQuantificationSetNotFoundException otherwise. | [
"Returns",
"the",
"RnaQuantification",
"set",
"with",
"the",
"specified",
"name",
"or",
"raises",
"a",
"RnaQuantificationSetNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/datasets.py#L411-L418 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | parseMalformedBamHeader | def parseMalformedBamHeader(headerDict):
"""
Parses the (probably) intended values out of the specified
BAM header dictionary, which is incompletely parsed by pysam.
This is caused by some tools incorrectly using spaces instead
of tabs as a seperator.
"""
headerString = " ".join(
"{}... | python | def parseMalformedBamHeader(headerDict):
"""
Parses the (probably) intended values out of the specified
BAM header dictionary, which is incompletely parsed by pysam.
This is caused by some tools incorrectly using spaces instead
of tabs as a seperator.
"""
headerString = " ".join(
"{}... | [
"def",
"parseMalformedBamHeader",
"(",
"headerDict",
")",
":",
"headerString",
"=",
"\" \"",
".",
"join",
"(",
"\"{}:{}\"",
".",
"format",
"(",
"k",
",",
"v",
")",
"for",
"k",
",",
"v",
"in",
"headerDict",
".",
"items",
"(",
")",
"if",
"k",
"!=",
"'C... | Parses the (probably) intended values out of the specified
BAM header dictionary, which is incompletely parsed by pysam.
This is caused by some tools incorrectly using spaces instead
of tabs as a seperator. | [
"Parses",
"the",
"(",
"probably",
")",
"intended",
"values",
"out",
"of",
"the",
"specified",
"BAM",
"header",
"dictionary",
"which",
"is",
"incompletely",
"parsed",
"by",
"pysam",
".",
"This",
"is",
"caused",
"by",
"some",
"tools",
"incorrectly",
"using",
"... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L24-L40 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AlignmentDataMixin._getReadAlignments | def _getReadAlignments(
self, reference, start, end, readGroupSet, readGroup):
"""
Returns an iterator over the specified reads
"""
# TODO If reference is None, return against all references,
# including unmapped reads.
samFile = self.getFileHandle(self._dataU... | python | def _getReadAlignments(
self, reference, start, end, readGroupSet, readGroup):
"""
Returns an iterator over the specified reads
"""
# TODO If reference is None, return against all references,
# including unmapped reads.
samFile = self.getFileHandle(self._dataU... | [
"def",
"_getReadAlignments",
"(",
"self",
",",
"reference",
",",
"start",
",",
"end",
",",
"readGroupSet",
",",
"readGroup",
")",
":",
"# TODO If reference is None, return against all references,",
"# including unmapped reads.",
"samFile",
"=",
"self",
".",
"getFileHandle... | Returns an iterator over the specified reads | [
"Returns",
"an",
"iterator",
"over",
"the",
"specified",
"reads"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L103-L134 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AlignmentDataMixin.convertReadAlignment | def convertReadAlignment(self, read, readGroupSet, readGroupId):
"""
Convert a pysam ReadAlignment to a GA4GH ReadAlignment
"""
samFile = self.getFileHandle(self._dataUrl)
# TODO fill out remaining fields
# TODO refine in tandem with code in converters module
ret ... | python | def convertReadAlignment(self, read, readGroupSet, readGroupId):
"""
Convert a pysam ReadAlignment to a GA4GH ReadAlignment
"""
samFile = self.getFileHandle(self._dataUrl)
# TODO fill out remaining fields
# TODO refine in tandem with code in converters module
ret ... | [
"def",
"convertReadAlignment",
"(",
"self",
",",
"read",
",",
"readGroupSet",
",",
"readGroupId",
")",
":",
"samFile",
"=",
"self",
".",
"getFileHandle",
"(",
"self",
".",
"_dataUrl",
")",
"# TODO fill out remaining fields",
"# TODO refine in tandem with code in convert... | Convert a pysam ReadAlignment to a GA4GH ReadAlignment | [
"Convert",
"a",
"pysam",
"ReadAlignment",
"to",
"a",
"GA4GH",
"ReadAlignment"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L136-L209 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroupSet.addReadGroup | def addReadGroup(self, readGroup):
"""
Adds the specified ReadGroup to this ReadGroupSet.
"""
id_ = readGroup.getId()
self._readGroupIdMap[id_] = readGroup
self._readGroupIds.append(id_) | python | def addReadGroup(self, readGroup):
"""
Adds the specified ReadGroup to this ReadGroupSet.
"""
id_ = readGroup.getId()
self._readGroupIdMap[id_] = readGroup
self._readGroupIds.append(id_) | [
"def",
"addReadGroup",
"(",
"self",
",",
"readGroup",
")",
":",
"id_",
"=",
"readGroup",
".",
"getId",
"(",
")",
"self",
".",
"_readGroupIdMap",
"[",
"id_",
"]",
"=",
"readGroup",
"self",
".",
"_readGroupIds",
".",
"append",
"(",
"id_",
")"
] | Adds the specified ReadGroup to this ReadGroupSet. | [
"Adds",
"the",
"specified",
"ReadGroup",
"to",
"this",
"ReadGroupSet",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L245-L251 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroupSet.getReadGroup | def getReadGroup(self, id_):
"""
Returns the ReadGroup with the specified id if it exists in this
ReadGroupSet, or raises a ReadGroupNotFoundException otherwise.
"""
if id_ not in self._readGroupIdMap:
raise exceptions.ReadGroupNotFoundException(id_)
return se... | python | def getReadGroup(self, id_):
"""
Returns the ReadGroup with the specified id if it exists in this
ReadGroupSet, or raises a ReadGroupNotFoundException otherwise.
"""
if id_ not in self._readGroupIdMap:
raise exceptions.ReadGroupNotFoundException(id_)
return se... | [
"def",
"getReadGroup",
"(",
"self",
",",
"id_",
")",
":",
"if",
"id_",
"not",
"in",
"self",
".",
"_readGroupIdMap",
":",
"raise",
"exceptions",
".",
"ReadGroupNotFoundException",
"(",
"id_",
")",
"return",
"self",
".",
"_readGroupIdMap",
"[",
"id_",
"]"
] | Returns the ReadGroup with the specified id if it exists in this
ReadGroupSet, or raises a ReadGroupNotFoundException otherwise. | [
"Returns",
"the",
"ReadGroup",
"with",
"the",
"specified",
"id",
"if",
"it",
"exists",
"in",
"this",
"ReadGroupSet",
"or",
"raises",
"a",
"ReadGroupNotFoundException",
"otherwise",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L265-L272 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroupSet.toProtocolElement | def toProtocolElement(self):
"""
Returns the GA4GH protocol representation of this ReadGroupSet.
"""
readGroupSet = protocol.ReadGroupSet()
readGroupSet.id = self.getId()
readGroupSet.read_groups.extend(
[readGroup.toProtocolElement()
for readGrou... | python | def toProtocolElement(self):
"""
Returns the GA4GH protocol representation of this ReadGroupSet.
"""
readGroupSet = protocol.ReadGroupSet()
readGroupSet.id = self.getId()
readGroupSet.read_groups.extend(
[readGroup.toProtocolElement()
for readGrou... | [
"def",
"toProtocolElement",
"(",
"self",
")",
":",
"readGroupSet",
"=",
"protocol",
".",
"ReadGroupSet",
"(",
")",
"readGroupSet",
".",
"id",
"=",
"self",
".",
"getId",
"(",
")",
"readGroupSet",
".",
"read_groups",
".",
"extend",
"(",
"[",
"readGroup",
"."... | Returns the GA4GH protocol representation of this ReadGroupSet. | [
"Returns",
"the",
"GA4GH",
"protocol",
"representation",
"of",
"this",
"ReadGroupSet",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L280-L294 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroupSet.getReadAlignmentId | def getReadAlignmentId(self, gaAlignment):
"""
Returns a string ID suitable for use in the specified GA
ReadAlignment object in this ReadGroupSet.
"""
compoundId = datamodel.ReadAlignmentCompoundId(
self.getCompoundId(), gaAlignment.fragment_name)
return str(c... | python | def getReadAlignmentId(self, gaAlignment):
"""
Returns a string ID suitable for use in the specified GA
ReadAlignment object in this ReadGroupSet.
"""
compoundId = datamodel.ReadAlignmentCompoundId(
self.getCompoundId(), gaAlignment.fragment_name)
return str(c... | [
"def",
"getReadAlignmentId",
"(",
"self",
",",
"gaAlignment",
")",
":",
"compoundId",
"=",
"datamodel",
".",
"ReadAlignmentCompoundId",
"(",
"self",
".",
"getCompoundId",
"(",
")",
",",
"gaAlignment",
".",
"fragment_name",
")",
"return",
"str",
"(",
"compoundId"... | Returns a string ID suitable for use in the specified GA
ReadAlignment object in this ReadGroupSet. | [
"Returns",
"a",
"string",
"ID",
"suitable",
"for",
"use",
"in",
"the",
"specified",
"GA",
"ReadAlignment",
"object",
"in",
"this",
"ReadGroupSet",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L314-L321 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroupSet.getStats | def getStats(self):
"""
Returns the GA4GH protocol representation of this read group set's
ReadStats.
"""
stats = protocol.ReadStats()
stats.aligned_read_count = self._numAlignedReads
stats.unaligned_read_count = self._numUnalignedReads
return stats | python | def getStats(self):
"""
Returns the GA4GH protocol representation of this read group set's
ReadStats.
"""
stats = protocol.ReadStats()
stats.aligned_read_count = self._numAlignedReads
stats.unaligned_read_count = self._numUnalignedReads
return stats | [
"def",
"getStats",
"(",
"self",
")",
":",
"stats",
"=",
"protocol",
".",
"ReadStats",
"(",
")",
"stats",
".",
"aligned_read_count",
"=",
"self",
".",
"_numAlignedReads",
"stats",
".",
"unaligned_read_count",
"=",
"self",
".",
"_numUnalignedReads",
"return",
"s... | Returns the GA4GH protocol representation of this read group set's
ReadStats. | [
"Returns",
"the",
"GA4GH",
"protocol",
"representation",
"of",
"this",
"read",
"group",
"set",
"s",
"ReadStats",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L323-L331 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | HtslibReadGroupSet.getReadAlignments | def getReadAlignments(self, reference, start=None, end=None):
"""
Returns an iterator over the specified reads
"""
return self._getReadAlignments(reference, start, end, self, None) | python | def getReadAlignments(self, reference, start=None, end=None):
"""
Returns an iterator over the specified reads
"""
return self._getReadAlignments(reference, start, end, self, None) | [
"def",
"getReadAlignments",
"(",
"self",
",",
"reference",
",",
"start",
"=",
"None",
",",
"end",
"=",
"None",
")",
":",
"return",
"self",
".",
"_getReadAlignments",
"(",
"reference",
",",
"start",
",",
"end",
",",
"self",
",",
"None",
")"
] | Returns an iterator over the specified reads | [
"Returns",
"an",
"iterator",
"over",
"the",
"specified",
"reads"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L378-L382 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | HtslibReadGroupSet.populateFromRow | def populateFromRow(self, readGroupSetRecord):
"""
Populates the instance variables of this ReadGroupSet from the
specified database row.
"""
self._dataUrl = readGroupSetRecord.dataurl
self._indexFile = readGroupSetRecord.indexfile
self._programs = []
for ... | python | def populateFromRow(self, readGroupSetRecord):
"""
Populates the instance variables of this ReadGroupSet from the
specified database row.
"""
self._dataUrl = readGroupSetRecord.dataurl
self._indexFile = readGroupSetRecord.indexfile
self._programs = []
for ... | [
"def",
"populateFromRow",
"(",
"self",
",",
"readGroupSetRecord",
")",
":",
"self",
".",
"_dataUrl",
"=",
"readGroupSetRecord",
".",
"dataurl",
"self",
".",
"_indexFile",
"=",
"readGroupSetRecord",
".",
"indexfile",
"self",
".",
"_programs",
"=",
"[",
"]",
"fo... | Populates the instance variables of this ReadGroupSet from the
specified database row. | [
"Populates",
"the",
"instance",
"variables",
"of",
"this",
"ReadGroupSet",
"from",
"the",
"specified",
"database",
"row",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L390-L404 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | HtslibReadGroupSet.populateFromFile | def populateFromFile(self, dataUrl, indexFile=None):
"""
Populates the instance variables of this ReadGroupSet from the
specified dataUrl and indexFile. If indexFile is not specified
guess usual form.
"""
self._dataUrl = dataUrl
self._indexFile = indexFile
... | python | def populateFromFile(self, dataUrl, indexFile=None):
"""
Populates the instance variables of this ReadGroupSet from the
specified dataUrl and indexFile. If indexFile is not specified
guess usual form.
"""
self._dataUrl = dataUrl
self._indexFile = indexFile
... | [
"def",
"populateFromFile",
"(",
"self",
",",
"dataUrl",
",",
"indexFile",
"=",
"None",
")",
":",
"self",
".",
"_dataUrl",
"=",
"dataUrl",
"self",
".",
"_indexFile",
"=",
"indexFile",
"if",
"indexFile",
"is",
"None",
":",
"self",
".",
"_indexFile",
"=",
"... | Populates the instance variables of this ReadGroupSet from the
specified dataUrl and indexFile. If indexFile is not specified
guess usual form. | [
"Populates",
"the",
"instance",
"variables",
"of",
"this",
"ReadGroupSet",
"from",
"the",
"specified",
"dataUrl",
"and",
"indexFile",
".",
"If",
"indexFile",
"is",
"not",
"specified",
"guess",
"usual",
"form",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L406-L439 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroup.toProtocolElement | def toProtocolElement(self):
"""
Returns the GA4GH protocol representation of this ReadGroup.
"""
# TODO this is very incomplete, but we don't have the
# implementation to fill out the rest of the fields currently
readGroup = protocol.ReadGroup()
readGroup.id = se... | python | def toProtocolElement(self):
"""
Returns the GA4GH protocol representation of this ReadGroup.
"""
# TODO this is very incomplete, but we don't have the
# implementation to fill out the rest of the fields currently
readGroup = protocol.ReadGroup()
readGroup.id = se... | [
"def",
"toProtocolElement",
"(",
"self",
")",
":",
"# TODO this is very incomplete, but we don't have the",
"# implementation to fill out the rest of the fields currently",
"readGroup",
"=",
"protocol",
".",
"ReadGroup",
"(",
")",
"readGroup",
".",
"id",
"=",
"self",
".",
"... | Returns the GA4GH protocol representation of this ReadGroup. | [
"Returns",
"the",
"GA4GH",
"protocol",
"representation",
"of",
"this",
"ReadGroup",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L496-L520 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroup.getStats | def getStats(self):
"""
Returns the GA4GH protocol representation of this read group's
ReadStats.
"""
stats = protocol.ReadStats()
stats.aligned_read_count = self.getNumAlignedReads()
stats.unaligned_read_count = self.getNumUnalignedReads()
# TODO base_cou... | python | def getStats(self):
"""
Returns the GA4GH protocol representation of this read group's
ReadStats.
"""
stats = protocol.ReadStats()
stats.aligned_read_count = self.getNumAlignedReads()
stats.unaligned_read_count = self.getNumUnalignedReads()
# TODO base_cou... | [
"def",
"getStats",
"(",
"self",
")",
":",
"stats",
"=",
"protocol",
".",
"ReadStats",
"(",
")",
"stats",
".",
"aligned_read_count",
"=",
"self",
".",
"getNumAlignedReads",
"(",
")",
"stats",
".",
"unaligned_read_count",
"=",
"self",
".",
"getNumUnalignedReads"... | Returns the GA4GH protocol representation of this read group's
ReadStats. | [
"Returns",
"the",
"GA4GH",
"protocol",
"representation",
"of",
"this",
"read",
"group",
"s",
"ReadStats",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L522-L531 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | AbstractReadGroup.getExperiment | def getExperiment(self):
"""
Returns the GA4GH protocol representation of this read group's
Experiment.
"""
experiment = protocol.Experiment()
experiment.id = self.getExperimentId()
experiment.instrument_model = pb.string(self.getInstrumentModel())
experim... | python | def getExperiment(self):
"""
Returns the GA4GH protocol representation of this read group's
Experiment.
"""
experiment = protocol.Experiment()
experiment.id = self.getExperimentId()
experiment.instrument_model = pb.string(self.getInstrumentModel())
experim... | [
"def",
"getExperiment",
"(",
"self",
")",
":",
"experiment",
"=",
"protocol",
".",
"Experiment",
"(",
")",
"experiment",
".",
"id",
"=",
"self",
".",
"getExperimentId",
"(",
")",
"experiment",
".",
"instrument_model",
"=",
"pb",
".",
"string",
"(",
"self",... | Returns the GA4GH protocol representation of this read group's
Experiment. | [
"Returns",
"the",
"GA4GH",
"protocol",
"representation",
"of",
"this",
"read",
"group",
"s",
"Experiment",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L533-L548 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | HtslibReadGroup.populateFromHeader | def populateFromHeader(self, readGroupHeader):
"""
Populate the instance variables using the specified SAM header.
"""
self._sampleName = readGroupHeader.get('SM', None)
self._description = readGroupHeader.get('DS', None)
if 'PI' in readGroupHeader:
self._pred... | python | def populateFromHeader(self, readGroupHeader):
"""
Populate the instance variables using the specified SAM header.
"""
self._sampleName = readGroupHeader.get('SM', None)
self._description = readGroupHeader.get('DS', None)
if 'PI' in readGroupHeader:
self._pred... | [
"def",
"populateFromHeader",
"(",
"self",
",",
"readGroupHeader",
")",
":",
"self",
".",
"_sampleName",
"=",
"readGroupHeader",
".",
"get",
"(",
"'SM'",
",",
"None",
")",
"self",
".",
"_description",
"=",
"readGroupHeader",
".",
"get",
"(",
"'DS'",
",",
"N... | Populate the instance variables using the specified SAM header. | [
"Populate",
"the",
"instance",
"variables",
"using",
"the",
"specified",
"SAM",
"header",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L741-L754 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/reads.py | HtslibReadGroup.populateFromRow | def populateFromRow(self, readGroupRecord):
"""
Populate the instance variables using the specified DB row.
"""
self._sampleName = readGroupRecord.samplename
self._biosampleId = readGroupRecord.biosampleid
self._description = readGroupRecord.description
self._pred... | python | def populateFromRow(self, readGroupRecord):
"""
Populate the instance variables using the specified DB row.
"""
self._sampleName = readGroupRecord.samplename
self._biosampleId = readGroupRecord.biosampleid
self._description = readGroupRecord.description
self._pred... | [
"def",
"populateFromRow",
"(",
"self",
",",
"readGroupRecord",
")",
":",
"self",
".",
"_sampleName",
"=",
"readGroupRecord",
".",
"samplename",
"self",
".",
"_biosampleId",
"=",
"readGroupRecord",
".",
"biosampleid",
"self",
".",
"_description",
"=",
"readGroupRec... | Populate the instance variables using the specified DB row. | [
"Populate",
"the",
"instance",
"variables",
"using",
"the",
"specified",
"DB",
"row",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/reads.py#L756-L774 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | getNameFromPath | def getNameFromPath(filePath):
"""
Returns the filename of the specified path without its extensions.
This is usually how we derive the default name for a given object.
"""
if len(filePath) == 0:
raise ValueError("Cannot have empty path for name")
fileName = os.path.split(os.path.normpat... | python | def getNameFromPath(filePath):
"""
Returns the filename of the specified path without its extensions.
This is usually how we derive the default name for a given object.
"""
if len(filePath) == 0:
raise ValueError("Cannot have empty path for name")
fileName = os.path.split(os.path.normpat... | [
"def",
"getNameFromPath",
"(",
"filePath",
")",
":",
"if",
"len",
"(",
"filePath",
")",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"\"Cannot have empty path for name\"",
")",
"fileName",
"=",
"os",
".",
"path",
".",
"split",
"(",
"os",
".",
"path",
".",
... | Returns the filename of the specified path without its extensions.
This is usually how we derive the default name for a given object. | [
"Returns",
"the",
"filename",
"of",
"the",
"specified",
"path",
"without",
"its",
"extensions",
".",
"This",
"is",
"usually",
"how",
"we",
"derive",
"the",
"default",
"name",
"for",
"a",
"given",
"object",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L35-L47 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | repoExitError | def repoExitError(message):
"""
Exits the repo manager with error status.
"""
wrapper = textwrap.TextWrapper(
break_on_hyphens=False, break_long_words=False)
formatted = wrapper.fill("{}: error: {}".format(sys.argv[0], message))
sys.exit(formatted) | python | def repoExitError(message):
"""
Exits the repo manager with error status.
"""
wrapper = textwrap.TextWrapper(
break_on_hyphens=False, break_long_words=False)
formatted = wrapper.fill("{}: error: {}".format(sys.argv[0], message))
sys.exit(formatted) | [
"def",
"repoExitError",
"(",
"message",
")",
":",
"wrapper",
"=",
"textwrap",
".",
"TextWrapper",
"(",
"break_on_hyphens",
"=",
"False",
",",
"break_long_words",
"=",
"False",
")",
"formatted",
"=",
"wrapper",
".",
"fill",
"(",
"\"{}: error: {}\"",
".",
"forma... | Exits the repo manager with error status. | [
"Exits",
"the",
"repo",
"manager",
"with",
"error",
"status",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L1206-L1213 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager._updateRepo | def _updateRepo(self, func, *args, **kwargs):
"""
Runs the specified function that updates the repo with the specified
arguments. This method ensures that all updates are transactional,
so that if any part of the update fails no changes are made to the
repo.
"""
#... | python | def _updateRepo(self, func, *args, **kwargs):
"""
Runs the specified function that updates the repo with the specified
arguments. This method ensures that all updates are transactional,
so that if any part of the update fails no changes are made to the
repo.
"""
#... | [
"def",
"_updateRepo",
"(",
"self",
",",
"func",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# TODO how do we make this properly transactional?",
"self",
".",
"_repo",
".",
"open",
"(",
"datarepo",
".",
"MODE_WRITE",
")",
"try",
":",
"func",
"(",
... | Runs the specified function that updates the repo with the specified
arguments. This method ensures that all updates are transactional,
so that if any part of the update fails no changes are made to the
repo. | [
"Runs",
"the",
"specified",
"function",
"that",
"updates",
"the",
"repo",
"with",
"the",
"specified",
"arguments",
".",
"This",
"method",
"ensures",
"that",
"all",
"updates",
"are",
"transactional",
"so",
"that",
"if",
"any",
"part",
"of",
"the",
"update",
"... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L81-L94 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addOntology | def addOntology(self):
"""
Adds a new Ontology to this repo.
"""
self._openRepo()
name = self._args.name
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
if name is None:
name = getNameFrom... | python | def addOntology(self):
"""
Adds a new Ontology to this repo.
"""
self._openRepo()
name = self._args.name
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
if name is None:
name = getNameFrom... | [
"def",
"addOntology",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"name",
"=",
"self",
".",
"_args",
".",
"name",
"filePath",
"=",
"self",
".",
"_getFilePath",
"(",
"self",
".",
"_args",
".",
"filePath",
",",
"self",
".",
"_args",
".",... | Adds a new Ontology to this repo. | [
"Adds",
"a",
"new",
"Ontology",
"to",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L154-L166 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addDataset | def addDataset(self):
"""
Adds a new dataset into this repo.
"""
self._openRepo()
dataset = datasets.Dataset(self._args.datasetName)
dataset.setDescription(self._args.description)
dataset.setAttributes(json.loads(self._args.attributes))
self._updateRepo(se... | python | def addDataset(self):
"""
Adds a new dataset into this repo.
"""
self._openRepo()
dataset = datasets.Dataset(self._args.datasetName)
dataset.setDescription(self._args.description)
dataset.setAttributes(json.loads(self._args.attributes))
self._updateRepo(se... | [
"def",
"addDataset",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"datasets",
".",
"Dataset",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"dataset",
".",
"setDescription",
"(",
"self",
".",
"_args",
".",
"description... | Adds a new dataset into this repo. | [
"Adds",
"a",
"new",
"dataset",
"into",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L168-L176 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addReferenceSet | def addReferenceSet(self):
"""
Adds a new reference set into this repo.
"""
self._openRepo()
name = self._args.name
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
if name is None:
name = ... | python | def addReferenceSet(self):
"""
Adds a new reference set into this repo.
"""
self._openRepo()
name = self._args.name
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
if name is None:
name = ... | [
"def",
"addReferenceSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"name",
"=",
"self",
".",
"_args",
".",
"name",
"filePath",
"=",
"self",
".",
"_getFilePath",
"(",
"self",
".",
"_args",
".",
"filePath",
",",
"self",
".",
"_args",
... | Adds a new reference set into this repo. | [
"Adds",
"a",
"new",
"reference",
"set",
"into",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L178-L201 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addReadGroupSet | def addReadGroupSet(self):
"""
Adds a new ReadGroupSet into this repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
dataUrl = self._args.dataFile
indexFile = self._args.indexFile
parsed = urlparse.urlparse(dataUrl)
... | python | def addReadGroupSet(self):
"""
Adds a new ReadGroupSet into this repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
dataUrl = self._args.dataFile
indexFile = self._args.indexFile
parsed = urlparse.urlparse(dataUrl)
... | [
"def",
"addReadGroupSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"dataUrl",
"=",
"self",
".",
"_args",
".",
"dataFile",... | Adds a new ReadGroupSet into this repo. | [
"Adds",
"a",
"new",
"ReadGroupSet",
"into",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L203-L235 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addVariantSet | def addVariantSet(self):
"""
Adds a new VariantSet into this repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
dataUrls = self._args.dataFiles
name = self._args.name
if len(dataUrls) == 1:
if self._args.na... | python | def addVariantSet(self):
"""
Adds a new VariantSet into this repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
dataUrls = self._args.dataFiles
name = self._args.name
if len(dataUrls) == 1:
if self._args.na... | [
"def",
"addVariantSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"dataUrls",
"=",
"self",
".",
"_args",
".",
"dataFiles",... | Adds a new VariantSet into this repo. | [
"Adds",
"a",
"new",
"VariantSet",
"into",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L237-L322 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addPhenotypeAssociationSet | def addPhenotypeAssociationSet(self):
"""
Adds a new phenotype association set to this repo.
"""
self._openRepo()
name = self._args.name
if name is None:
name = getNameFromPath(self._args.dirPath)
dataset = self._repo.getDatasetByName(self._args.datase... | python | def addPhenotypeAssociationSet(self):
"""
Adds a new phenotype association set to this repo.
"""
self._openRepo()
name = self._args.name
if name is None:
name = getNameFromPath(self._args.dirPath)
dataset = self._repo.getDatasetByName(self._args.datase... | [
"def",
"addPhenotypeAssociationSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"name",
"=",
"self",
".",
"_args",
".",
"name",
"if",
"name",
"is",
"None",
":",
"name",
"=",
"getNameFromPath",
"(",
"self",
".",
"_args",
".",
"dirPath",
... | Adds a new phenotype association set to this repo. | [
"Adds",
"a",
"new",
"phenotype",
"association",
"set",
"to",
"this",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L324-L340 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removePhenotypeAssociationSet | def removePhenotypeAssociationSet(self):
"""
Removes a phenotype association set from the repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
phenotypeAssociationSet = dataset.getPhenotypeAssociationSetByName(
self._args.nam... | python | def removePhenotypeAssociationSet(self):
"""
Removes a phenotype association set from the repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
phenotypeAssociationSet = dataset.getPhenotypeAssociationSetByName(
self._args.nam... | [
"def",
"removePhenotypeAssociationSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"phenotypeAssociationSet",
"=",
"dataset",
"."... | Removes a phenotype association set from the repo | [
"Removes",
"a",
"phenotype",
"association",
"set",
"from",
"the",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L342-L358 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeReferenceSet | def removeReferenceSet(self):
"""
Removes a referenceSet from the repo.
"""
self._openRepo()
referenceSet = self._repo.getReferenceSetByName(
self._args.referenceSetName)
def func():
self._updateRepo(self._repo.removeReferenceSet, referenceSet)
... | python | def removeReferenceSet(self):
"""
Removes a referenceSet from the repo.
"""
self._openRepo()
referenceSet = self._repo.getReferenceSetByName(
self._args.referenceSetName)
def func():
self._updateRepo(self._repo.removeReferenceSet, referenceSet)
... | [
"def",
"removeReferenceSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"referenceSet",
"=",
"self",
".",
"_repo",
".",
"getReferenceSetByName",
"(",
"self",
".",
"_args",
".",
"referenceSetName",
")",
"def",
"func",
"(",
")",
":",
"self",
... | Removes a referenceSet from the repo. | [
"Removes",
"a",
"referenceSet",
"from",
"the",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L360-L370 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeReadGroupSet | def removeReadGroupSet(self):
"""
Removes a readGroupSet from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
readGroupSet = dataset.getReadGroupSetByName(
self._args.readGroupSetName)
def func():
... | python | def removeReadGroupSet(self):
"""
Removes a readGroupSet from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
readGroupSet = dataset.getReadGroupSetByName(
self._args.readGroupSetName)
def func():
... | [
"def",
"removeReadGroupSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"readGroupSet",
"=",
"dataset",
".",
"getReadGroupSetBy... | Removes a readGroupSet from the repo. | [
"Removes",
"a",
"readGroupSet",
"from",
"the",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L372-L383 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeVariantSet | def removeVariantSet(self):
"""
Removes a variantSet from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
variantSet = dataset.getVariantSetByName(self._args.variantSetName)
def func():
self._updateRepo(sel... | python | def removeVariantSet(self):
"""
Removes a variantSet from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
variantSet = dataset.getVariantSetByName(self._args.variantSetName)
def func():
self._updateRepo(sel... | [
"def",
"removeVariantSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"variantSet",
"=",
"dataset",
".",
"getVariantSetByName",... | Removes a variantSet from the repo. | [
"Removes",
"a",
"variantSet",
"from",
"the",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L385-L395 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeDataset | def removeDataset(self):
"""
Removes a dataset from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
def func():
self._updateRepo(self._repo.removeDataset, dataset)
self._confirmDelete("Dataset", dataset.get... | python | def removeDataset(self):
"""
Removes a dataset from the repo.
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
def func():
self._updateRepo(self._repo.removeDataset, dataset)
self._confirmDelete("Dataset", dataset.get... | [
"def",
"removeDataset",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"def",
"func",
"(",
")",
":",
"self",
".",
"_updateRep... | Removes a dataset from the repo. | [
"Removes",
"a",
"dataset",
"from",
"the",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L397-L406 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addFeatureSet | def addFeatureSet(self):
"""
Adds a new feature set into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
na... | python | def addFeatureSet(self):
"""
Adds a new feature set into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
na... | [
"def",
"addFeatureSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"filePath",
"=",
"self",
".",
"_getFilePath",
"(",
"self... | Adds a new feature set into this repo | [
"Adds",
"a",
"new",
"feature",
"set",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L408-L434 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeFeatureSet | def removeFeatureSet(self):
"""
Removes a feature set from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
featureSet = dataset.getFeatureSetByName(self._args.featureSetName)
def func():
self._updateRepo(se... | python | def removeFeatureSet(self):
"""
Removes a feature set from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
featureSet = dataset.getFeatureSetByName(self._args.featureSetName)
def func():
self._updateRepo(se... | [
"def",
"removeFeatureSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"featureSet",
"=",
"dataset",
".",
"getFeatureSetByName",... | Removes a feature set from this repo | [
"Removes",
"a",
"feature",
"set",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L436-L446 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addContinuousSet | def addContinuousSet(self):
"""
Adds a new continuous set into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
... | python | def addContinuousSet(self):
"""
Adds a new continuous set into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
filePath = self._getFilePath(self._args.filePath,
self._args.relativePath)
... | [
"def",
"addContinuousSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"filePath",
"=",
"self",
".",
"_getFilePath",
"(",
"s... | Adds a new continuous set into this repo | [
"Adds",
"a",
"new",
"continuous",
"set",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L448-L465 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeContinuousSet | def removeContinuousSet(self):
"""
Removes a continuous set from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
continuousSet = dataset.getContinuousSetByName(
self._args.continuousSetName)
... | python | def removeContinuousSet(self):
"""
Removes a continuous set from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
continuousSet = dataset.getContinuousSetByName(
self._args.continuousSetName)
... | [
"def",
"removeContinuousSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"continuousSet",
"=",
"dataset",
".",
"getContinuousSe... | Removes a continuous set from this repo | [
"Removes",
"a",
"continuous",
"set",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L467-L478 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addBiosample | def addBiosample(self):
"""
Adds a new biosample into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosample = bio_metadata.Biosample(
dataset, self._args.biosampleName)
biosample.populateFromJson(self._a... | python | def addBiosample(self):
"""
Adds a new biosample into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosample = bio_metadata.Biosample(
dataset, self._args.biosampleName)
biosample.populateFromJson(self._a... | [
"def",
"addBiosample",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"biosample",
"=",
"bio_metadata",
".",
"Biosample",
"(",
... | Adds a new biosample into this repo | [
"Adds",
"a",
"new",
"biosample",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L480-L489 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeBiosample | def removeBiosample(self):
"""
Removes a biosample from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosample = dataset.getBiosampleByName(self._args.biosampleName)
def func():
self._updateRepo(self._re... | python | def removeBiosample(self):
"""
Removes a biosample from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosample = dataset.getBiosampleByName(self._args.biosampleName)
def func():
self._updateRepo(self._re... | [
"def",
"removeBiosample",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"biosample",
"=",
"dataset",
".",
"getBiosampleByName",
... | Removes a biosample from this repo | [
"Removes",
"a",
"biosample",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L491-L501 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addIndividual | def addIndividual(self):
"""
Adds a new individual into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
individual = bio_metadata.Individual(
dataset, self._args.individualName)
individual.populateFromJson(s... | python | def addIndividual(self):
"""
Adds a new individual into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
individual = bio_metadata.Individual(
dataset, self._args.individualName)
individual.populateFromJson(s... | [
"def",
"addIndividual",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"individual",
"=",
"bio_metadata",
".",
"Individual",
"(",... | Adds a new individual into this repo | [
"Adds",
"a",
"new",
"individual",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L503-L512 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeIndividual | def removeIndividual(self):
"""
Removes an individual from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
individual = dataset.getIndividualByName(self._args.individualName)
def func():
self._updateRepo(se... | python | def removeIndividual(self):
"""
Removes an individual from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
individual = dataset.getIndividualByName(self._args.individualName)
def func():
self._updateRepo(se... | [
"def",
"removeIndividual",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"individual",
"=",
"dataset",
".",
"getIndividualByName",... | Removes an individual from this repo | [
"Removes",
"an",
"individual",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L514-L524 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addPeer | def addPeer(self):
"""
Adds a new peer into this repo
"""
self._openRepo()
try:
peer = peers.Peer(
self._args.url, json.loads(self._args.attributes))
except exceptions.BadUrlException:
raise exceptions.RepoManagerException("The URL ... | python | def addPeer(self):
"""
Adds a new peer into this repo
"""
self._openRepo()
try:
peer = peers.Peer(
self._args.url, json.loads(self._args.attributes))
except exceptions.BadUrlException:
raise exceptions.RepoManagerException("The URL ... | [
"def",
"addPeer",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"try",
":",
"peer",
"=",
"peers",
".",
"Peer",
"(",
"self",
".",
"_args",
".",
"url",
",",
"json",
".",
"loads",
"(",
"self",
".",
"_args",
".",
"attributes",
")",
")",
... | Adds a new peer into this repo | [
"Adds",
"a",
"new",
"peer",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L526-L541 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removePeer | def removePeer(self):
"""
Removes a peer by URL from this repo
"""
self._openRepo()
def func():
self._updateRepo(self._repo.removePeer, self._args.url)
self._confirmDelete("Peer", self._args.url, func) | python | def removePeer(self):
"""
Removes a peer by URL from this repo
"""
self._openRepo()
def func():
self._updateRepo(self._repo.removePeer, self._args.url)
self._confirmDelete("Peer", self._args.url, func) | [
"def",
"removePeer",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"def",
"func",
"(",
")",
":",
"self",
".",
"_updateRepo",
"(",
"self",
".",
"_repo",
".",
"removePeer",
",",
"self",
".",
"_args",
".",
"url",
")",
"self",
".",
"_confi... | Removes a peer by URL from this repo | [
"Removes",
"a",
"peer",
"by",
"URL",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L543-L551 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeOntology | def removeOntology(self):
"""
Removes an ontology from the repo.
"""
self._openRepo()
ontology = self._repo.getOntologyByName(self._args.ontologyName)
def func():
self._updateRepo(self._repo.removeOntology, ontology)
self._confirmDelete("Ontology", on... | python | def removeOntology(self):
"""
Removes an ontology from the repo.
"""
self._openRepo()
ontology = self._repo.getOntologyByName(self._args.ontologyName)
def func():
self._updateRepo(self._repo.removeOntology, ontology)
self._confirmDelete("Ontology", on... | [
"def",
"removeOntology",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"ontology",
"=",
"self",
".",
"_repo",
".",
"getOntologyByName",
"(",
"self",
".",
"_args",
".",
"ontologyName",
")",
"def",
"func",
"(",
")",
":",
"self",
".",
"_updat... | Removes an ontology from the repo. | [
"Removes",
"an",
"ontology",
"from",
"the",
"repo",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L553-L562 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addRnaQuantification | def addRnaQuantification(self):
"""
Adds an rnaQuantification into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosampleId = ""
if self._args.biosampleName:
biosample = dataset.getBiosampleByName(self._a... | python | def addRnaQuantification(self):
"""
Adds an rnaQuantification into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
biosampleId = ""
if self._args.biosampleName:
biosample = dataset.getBiosampleByName(self._a... | [
"def",
"addRnaQuantification",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"biosampleId",
"=",
"\"\"",
"if",
"self",
".",
"_... | Adds an rnaQuantification into this repo | [
"Adds",
"an",
"rnaQuantification",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L564-L589 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.initRnaQuantificationSet | def initRnaQuantificationSet(self):
"""
Initialize an empty RNA quantification set
"""
store = rnaseq2ga.RnaSqliteStore(self._args.filePath)
store.createTables() | python | def initRnaQuantificationSet(self):
"""
Initialize an empty RNA quantification set
"""
store = rnaseq2ga.RnaSqliteStore(self._args.filePath)
store.createTables() | [
"def",
"initRnaQuantificationSet",
"(",
"self",
")",
":",
"store",
"=",
"rnaseq2ga",
".",
"RnaSqliteStore",
"(",
"self",
".",
"_args",
".",
"filePath",
")",
"store",
".",
"createTables",
"(",
")"
] | Initialize an empty RNA quantification set | [
"Initialize",
"an",
"empty",
"RNA",
"quantification",
"set"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L591-L596 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.addRnaQuantificationSet | def addRnaQuantificationSet(self):
"""
Adds an rnaQuantificationSet into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
if self._args.name is None:
name = getNameFromPath(self._args.filePath)
else:
... | python | def addRnaQuantificationSet(self):
"""
Adds an rnaQuantificationSet into this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
if self._args.name is None:
name = getNameFromPath(self._args.filePath)
else:
... | [
"def",
"addRnaQuantificationSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"if",
"self",
".",
"_args",
".",
"name",
"is",... | Adds an rnaQuantificationSet into this repo | [
"Adds",
"an",
"rnaQuantificationSet",
"into",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L598-L619 |
ga4gh/ga4gh-server | ga4gh/server/cli/repomanager.py | RepoManager.removeRnaQuantificationSet | def removeRnaQuantificationSet(self):
"""
Removes an rnaQuantificationSet from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
rnaQuantSet = dataset.getRnaQuantificationSetByName(
self._args.rnaQuantificationSetName... | python | def removeRnaQuantificationSet(self):
"""
Removes an rnaQuantificationSet from this repo
"""
self._openRepo()
dataset = self._repo.getDatasetByName(self._args.datasetName)
rnaQuantSet = dataset.getRnaQuantificationSetByName(
self._args.rnaQuantificationSetName... | [
"def",
"removeRnaQuantificationSet",
"(",
"self",
")",
":",
"self",
".",
"_openRepo",
"(",
")",
"dataset",
"=",
"self",
".",
"_repo",
".",
"getDatasetByName",
"(",
"self",
".",
"_args",
".",
"datasetName",
")",
"rnaQuantSet",
"=",
"dataset",
".",
"getRnaQuan... | Removes an rnaQuantificationSet from this repo | [
"Removes",
"an",
"rnaQuantificationSet",
"from",
"this",
"repo"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/cli/repomanager.py#L621-L634 |
ga4gh/ga4gh-server | ga4gh/server/repo/rnaseq2ga.py | rnaseq2ga | def rnaseq2ga(quantificationFilename, sqlFilename, localName, rnaType,
dataset=None, featureType="gene",
description="", programs="", featureSetNames="",
readGroupSetNames="", biosampleId=""):
"""
Reads RNA Quantification data in one of several formats and stores the da... | python | def rnaseq2ga(quantificationFilename, sqlFilename, localName, rnaType,
dataset=None, featureType="gene",
description="", programs="", featureSetNames="",
readGroupSetNames="", biosampleId=""):
"""
Reads RNA Quantification data in one of several formats and stores the da... | [
"def",
"rnaseq2ga",
"(",
"quantificationFilename",
",",
"sqlFilename",
",",
"localName",
",",
"rnaType",
",",
"dataset",
"=",
"None",
",",
"featureType",
"=",
"\"gene\"",
",",
"description",
"=",
"\"\"",
",",
"programs",
"=",
"\"\"",
",",
"featureSetNames",
"=... | Reads RNA Quantification data in one of several formats and stores the data
in a sqlite database for use by the GA4GH reference server.
Supports the following quantification output types:
Cufflinks, kallisto, RSEM. | [
"Reads",
"RNA",
"Quantification",
"data",
"in",
"one",
"of",
"several",
"formats",
"and",
"stores",
"the",
"data",
"in",
"a",
"sqlite",
"database",
"for",
"use",
"by",
"the",
"GA4GH",
"reference",
"server",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/repo/rnaseq2ga.py#L267-L307 |
ga4gh/ga4gh-server | ga4gh/server/repo/rnaseq2ga.py | RnaSqliteStore.addRNAQuantification | def addRNAQuantification(self, datafields):
"""
Adds an RNAQuantification to the db. Datafields is a tuple in the
order:
id, feature_set_ids, description, name,
read_group_ids, programs, biosample_id
"""
self._rnaValueList.append(datafields)
if len(self._... | python | def addRNAQuantification(self, datafields):
"""
Adds an RNAQuantification to the db. Datafields is a tuple in the
order:
id, feature_set_ids, description, name,
read_group_ids, programs, biosample_id
"""
self._rnaValueList.append(datafields)
if len(self._... | [
"def",
"addRNAQuantification",
"(",
"self",
",",
"datafields",
")",
":",
"self",
".",
"_rnaValueList",
".",
"append",
"(",
"datafields",
")",
"if",
"len",
"(",
"self",
".",
"_rnaValueList",
")",
">=",
"self",
".",
"_batchSize",
":",
"self",
".",
"batchaddR... | Adds an RNAQuantification to the db. Datafields is a tuple in the
order:
id, feature_set_ids, description, name,
read_group_ids, programs, biosample_id | [
"Adds",
"an",
"RNAQuantification",
"to",
"the",
"db",
".",
"Datafields",
"is",
"a",
"tuple",
"in",
"the",
"order",
":",
"id",
"feature_set_ids",
"description",
"name",
"read_group_ids",
"programs",
"biosample_id"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/repo/rnaseq2ga.py#L50-L59 |
ga4gh/ga4gh-server | ga4gh/server/repo/rnaseq2ga.py | RnaSqliteStore.addExpression | def addExpression(self, datafields):
"""
Adds an Expression to the db. Datafields is a tuple in the order:
id, rna_quantification_id, name, expression,
is_normalized, raw_read_count, score, units, conf_low, conf_hi
"""
self._expressionValueList.append(datafields)
... | python | def addExpression(self, datafields):
"""
Adds an Expression to the db. Datafields is a tuple in the order:
id, rna_quantification_id, name, expression,
is_normalized, raw_read_count, score, units, conf_low, conf_hi
"""
self._expressionValueList.append(datafields)
... | [
"def",
"addExpression",
"(",
"self",
",",
"datafields",
")",
":",
"self",
".",
"_expressionValueList",
".",
"append",
"(",
"datafields",
")",
"if",
"len",
"(",
"self",
".",
"_expressionValueList",
")",
">=",
"self",
".",
"_batchSize",
":",
"self",
".",
"ba... | Adds an Expression to the db. Datafields is a tuple in the order:
id, rna_quantification_id, name, expression,
is_normalized, raw_read_count, score, units, conf_low, conf_hi | [
"Adds",
"an",
"Expression",
"to",
"the",
"db",
".",
"Datafields",
"is",
"a",
"tuple",
"in",
"the",
"order",
":",
"id",
"rna_quantification_id",
"name",
"expression",
"is_normalized",
"raw_read_count",
"score",
"units",
"conf_low",
"conf_hi"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/repo/rnaseq2ga.py#L68-L76 |
ga4gh/ga4gh-server | ga4gh/server/repo/rnaseq2ga.py | RnaSqliteStore.createIndices | def createIndices(self):
"""
Index columns that are queried. The expression index can
take a long time.
"""
sql = '''CREATE INDEX name_index
ON Expression (name)'''
self._cursor.execute(sql)
self._dbConn.commit()
sql = '''CREATE INDEX ex... | python | def createIndices(self):
"""
Index columns that are queried. The expression index can
take a long time.
"""
sql = '''CREATE INDEX name_index
ON Expression (name)'''
self._cursor.execute(sql)
self._dbConn.commit()
sql = '''CREATE INDEX ex... | [
"def",
"createIndices",
"(",
"self",
")",
":",
"sql",
"=",
"'''CREATE INDEX name_index\n ON Expression (name)'''",
"self",
".",
"_cursor",
".",
"execute",
"(",
"sql",
")",
"self",
".",
"_dbConn",
".",
"commit",
"(",
")",
"sql",
"=",
"'''CREATE INDE... | Index columns that are queried. The expression index can
take a long time. | [
"Index",
"columns",
"that",
"are",
"queried",
".",
"The",
"expression",
"index",
"can",
"take",
"a",
"long",
"time",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/repo/rnaseq2ga.py#L85-L99 |
ga4gh/ga4gh-server | ga4gh/server/repo/rnaseq2ga.py | AbstractWriter.writeExpression | def writeExpression(self, rnaQuantificationId, quantfilename):
"""
Reads the quantification results file and adds entries to the
specified database.
"""
isNormalized = self._isNormalized
units = self._units
with open(quantfilename, "r") as quantFile:
q... | python | def writeExpression(self, rnaQuantificationId, quantfilename):
"""
Reads the quantification results file and adds entries to the
specified database.
"""
isNormalized = self._isNormalized
units = self._units
with open(quantfilename, "r") as quantFile:
q... | [
"def",
"writeExpression",
"(",
"self",
",",
"rnaQuantificationId",
",",
"quantfilename",
")",
":",
"isNormalized",
"=",
"self",
".",
"_isNormalized",
"units",
"=",
"self",
".",
"_units",
"with",
"open",
"(",
"quantfilename",
",",
"\"r\"",
")",
"as",
"quantFile... | Reads the quantification results file and adds entries to the
specified database. | [
"Reads",
"the",
"quantification",
"results",
"file",
"and",
"adds",
"entries",
"to",
"the",
"specified",
"database",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/repo/rnaseq2ga.py#L136-L172 |
ga4gh/ga4gh-server | scripts/download_example_data.py | _fetchSequence | def _fetchSequence(ac, startIndex=None, endIndex=None):
"""Fetch sequences from NCBI using the eself interface.
An interbase interval may be optionally provided with startIndex and
endIndex. NCBI eself will return just the requested subsequence, which
might greatly reduce payload sizes (especially with... | python | def _fetchSequence(ac, startIndex=None, endIndex=None):
"""Fetch sequences from NCBI using the eself interface.
An interbase interval may be optionally provided with startIndex and
endIndex. NCBI eself will return just the requested subsequence, which
might greatly reduce payload sizes (especially with... | [
"def",
"_fetchSequence",
"(",
"ac",
",",
"startIndex",
"=",
"None",
",",
"endIndex",
"=",
"None",
")",
":",
"urlFmt",
"=",
"(",
"\"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?\"",
"\"db=nucleotide&id={ac}&rettype=fasta&retmode=text\"",
")",
"if",
"startIndex",
... | Fetch sequences from NCBI using the eself interface.
An interbase interval may be optionally provided with startIndex and
endIndex. NCBI eself will return just the requested subsequence, which
might greatly reduce payload sizes (especially with chromosome-scale
sequences). When wrapped is True, return ... | [
"Fetch",
"sequences",
"from",
"NCBI",
"using",
"the",
"eself",
"interface",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/scripts/download_example_data.py#L67-L103 |
ga4gh/ga4gh-server | scripts/download_example_data.py | AbstractFileDownloader.createBamHeader | def createBamHeader(self, baseHeader):
"""
Creates a new bam header based on the specified header from the
parent BAM file.
"""
header = dict(baseHeader)
newSequences = []
for index, referenceInfo in enumerate(header['SQ']):
if index < self.numChromoso... | python | def createBamHeader(self, baseHeader):
"""
Creates a new bam header based on the specified header from the
parent BAM file.
"""
header = dict(baseHeader)
newSequences = []
for index, referenceInfo in enumerate(header['SQ']):
if index < self.numChromoso... | [
"def",
"createBamHeader",
"(",
"self",
",",
"baseHeader",
")",
":",
"header",
"=",
"dict",
"(",
"baseHeader",
")",
"newSequences",
"=",
"[",
"]",
"for",
"index",
",",
"referenceInfo",
"in",
"enumerate",
"(",
"header",
"[",
"'SQ'",
"]",
")",
":",
"if",
... | Creates a new bam header based on the specified header from the
parent BAM file. | [
"Creates",
"a",
"new",
"bam",
"header",
"based",
"on",
"the",
"specified",
"header",
"from",
"the",
"parent",
"BAM",
"file",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/scripts/download_example_data.py#L235-L259 |
ga4gh/ga4gh-server | scripts/download_example_data.py | AbstractFileDownloader.createRepo | def createRepo(self):
"""
Creates the repository for all the data we've just downloaded.
"""
repo = datarepo.SqlDataRepository(self.repoPath)
repo.open("w")
repo.initialise()
referenceSet = references.HtslibReferenceSet("GRCh37-subset")
referenceSet.popul... | python | def createRepo(self):
"""
Creates the repository for all the data we've just downloaded.
"""
repo = datarepo.SqlDataRepository(self.repoPath)
repo.open("w")
repo.initialise()
referenceSet = references.HtslibReferenceSet("GRCh37-subset")
referenceSet.popul... | [
"def",
"createRepo",
"(",
"self",
")",
":",
"repo",
"=",
"datarepo",
".",
"SqlDataRepository",
"(",
"self",
".",
"repoPath",
")",
"repo",
".",
"open",
"(",
"\"w\"",
")",
"repo",
".",
"initialise",
"(",
")",
"referenceSet",
"=",
"references",
".",
"Htslib... | Creates the repository for all the data we've just downloaded. | [
"Creates",
"the",
"repository",
"for",
"all",
"the",
"data",
"we",
"ve",
"just",
"downloaded",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/scripts/download_example_data.py#L338-L383 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | _configure_backend | def _configure_backend(app):
"""A helper function used just to help modularize the code a bit."""
# Allocate the backend
# We use URLs to specify the backend. Currently we have file:// URLs (or
# URLs with no scheme) for the SqlDataRepository, and special empty:// and
# simulated:// URLs for empty o... | python | def _configure_backend(app):
"""A helper function used just to help modularize the code a bit."""
# Allocate the backend
# We use URLs to specify the backend. Currently we have file:// URLs (or
# URLs with no scheme) for the SqlDataRepository, and special empty:// and
# simulated:// URLs for empty o... | [
"def",
"_configure_backend",
"(",
"app",
")",
":",
"# Allocate the backend",
"# We use URLs to specify the backend. Currently we have file:// URLs (or",
"# URLs with no scheme) for the SqlDataRepository, and special empty:// and",
"# simulated:// URLs for empty or simulated data sources.",
"data... | A helper function used just to help modularize the code a bit. | [
"A",
"helper",
"function",
"used",
"just",
"to",
"help",
"modularize",
"the",
"code",
"a",
"bit",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L212-L267 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | configure | def configure(configFile=None, baseConfig="ProductionConfig",
port=8000, extraConfig={}):
"""
TODO Document this critical function! What does it do? What does
it assume?
"""
file_handler = StreamHandler()
file_handler.setLevel(logging.WARNING)
app.logger.addHandler(file_handler... | python | def configure(configFile=None, baseConfig="ProductionConfig",
port=8000, extraConfig={}):
"""
TODO Document this critical function! What does it do? What does
it assume?
"""
file_handler = StreamHandler()
file_handler.setLevel(logging.WARNING)
app.logger.addHandler(file_handler... | [
"def",
"configure",
"(",
"configFile",
"=",
"None",
",",
"baseConfig",
"=",
"\"ProductionConfig\"",
",",
"port",
"=",
"8000",
",",
"extraConfig",
"=",
"{",
"}",
")",
":",
"file_handler",
"=",
"StreamHandler",
"(",
")",
"file_handler",
".",
"setLevel",
"(",
... | TODO Document this critical function! What does it do? What does
it assume? | [
"TODO",
"Document",
"this",
"critical",
"function!",
"What",
"does",
"it",
"do?",
"What",
"does",
"it",
"assume?"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L270-L358 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | getFlaskResponse | def getFlaskResponse(responseString, httpStatus=200):
"""
Returns a Flask response object for the specified data and HTTP status.
"""
return flask.Response(responseString, status=httpStatus, mimetype=MIMETYPE) | python | def getFlaskResponse(responseString, httpStatus=200):
"""
Returns a Flask response object for the specified data and HTTP status.
"""
return flask.Response(responseString, status=httpStatus, mimetype=MIMETYPE) | [
"def",
"getFlaskResponse",
"(",
"responseString",
",",
"httpStatus",
"=",
"200",
")",
":",
"return",
"flask",
".",
"Response",
"(",
"responseString",
",",
"status",
"=",
"httpStatus",
",",
"mimetype",
"=",
"MIMETYPE",
")"
] | Returns a Flask response object for the specified data and HTTP status. | [
"Returns",
"a",
"Flask",
"response",
"object",
"for",
"the",
"specified",
"data",
"and",
"HTTP",
"status",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L361-L365 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | handleHttpPost | def handleHttpPost(request, endpoint):
"""
Handles the specified HTTP POST request, which maps to the specified
protocol handler endpoint and protocol request class.
"""
if request.mimetype and request.mimetype != MIMETYPE:
raise exceptions.UnsupportedMediaTypeException()
request = reque... | python | def handleHttpPost(request, endpoint):
"""
Handles the specified HTTP POST request, which maps to the specified
protocol handler endpoint and protocol request class.
"""
if request.mimetype and request.mimetype != MIMETYPE:
raise exceptions.UnsupportedMediaTypeException()
request = reque... | [
"def",
"handleHttpPost",
"(",
"request",
",",
"endpoint",
")",
":",
"if",
"request",
".",
"mimetype",
"and",
"request",
".",
"mimetype",
"!=",
"MIMETYPE",
":",
"raise",
"exceptions",
".",
"UnsupportedMediaTypeException",
"(",
")",
"request",
"=",
"request",
".... | Handles the specified HTTP POST request, which maps to the specified
protocol handler endpoint and protocol request class. | [
"Handles",
"the",
"specified",
"HTTP",
"POST",
"request",
"which",
"maps",
"to",
"the",
"specified",
"protocol",
"handler",
"endpoint",
"and",
"protocol",
"request",
"class",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L368-L379 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | handleException | def handleException(exception):
"""
Handles an exception that occurs somewhere in the process of handling
a request.
"""
serverException = exception
if not isinstance(exception, exceptions.BaseServerException):
with app.test_request_context():
app.log_exception(exception)
... | python | def handleException(exception):
"""
Handles an exception that occurs somewhere in the process of handling
a request.
"""
serverException = exception
if not isinstance(exception, exceptions.BaseServerException):
with app.test_request_context():
app.log_exception(exception)
... | [
"def",
"handleException",
"(",
"exception",
")",
":",
"serverException",
"=",
"exception",
"if",
"not",
"isinstance",
"(",
"exception",
",",
"exceptions",
".",
"BaseServerException",
")",
":",
"with",
"app",
".",
"test_request_context",
"(",
")",
":",
"app",
"... | Handles an exception that occurs somewhere in the process of handling
a request. | [
"Handles",
"an",
"exception",
"that",
"occurs",
"somewhere",
"in",
"the",
"process",
"of",
"handling",
"a",
"request",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L409-L433 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | startLogin | def startLogin():
"""
If we are not logged in, this generates the redirect URL to the OIDC
provider and returns the redirect response
:return: A redirect response to the OIDC provider
"""
flask.session["state"] = oic.oauth2.rndstr(SECRET_KEY_LENGTH)
flask.session["nonce"] = oic.oauth2.rndstr... | python | def startLogin():
"""
If we are not logged in, this generates the redirect URL to the OIDC
provider and returns the redirect response
:return: A redirect response to the OIDC provider
"""
flask.session["state"] = oic.oauth2.rndstr(SECRET_KEY_LENGTH)
flask.session["nonce"] = oic.oauth2.rndstr... | [
"def",
"startLogin",
"(",
")",
":",
"flask",
".",
"session",
"[",
"\"state\"",
"]",
"=",
"oic",
".",
"oauth2",
".",
"rndstr",
"(",
"SECRET_KEY_LENGTH",
")",
"flask",
".",
"session",
"[",
"\"nonce\"",
"]",
"=",
"oic",
".",
"oauth2",
".",
"rndstr",
"(",
... | If we are not logged in, this generates the redirect URL to the OIDC
provider and returns the redirect response
:return: A redirect response to the OIDC provider | [
"If",
"we",
"are",
"not",
"logged",
"in",
"this",
"generates",
"the",
"redirect",
"URL",
"to",
"the",
"OIDC",
"provider",
"and",
"returns",
"the",
"redirect",
"response",
":",
"return",
":",
"A",
"redirect",
"response",
"to",
"the",
"OIDC",
"provider"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L436-L455 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | checkAuthentication | def checkAuthentication():
"""
The request will have a parameter 'key' if it came from the command line
client, or have a session key of 'key' if it's the browser.
If the token is not found, start the login process.
If there is no oidcClient, we are running naked and we don't check.
If we're be... | python | def checkAuthentication():
"""
The request will have a parameter 'key' if it came from the command line
client, or have a session key of 'key' if it's the browser.
If the token is not found, start the login process.
If there is no oidcClient, we are running naked and we don't check.
If we're be... | [
"def",
"checkAuthentication",
"(",
")",
":",
"if",
"app",
".",
"oidcClient",
"is",
"None",
":",
"return",
"if",
"flask",
".",
"request",
".",
"endpoint",
"==",
"'oidcCallback'",
":",
"return",
"key",
"=",
"flask",
".",
"session",
".",
"get",
"(",
"'key'"... | The request will have a parameter 'key' if it came from the command line
client, or have a session key of 'key' if it's the browser.
If the token is not found, start the login process.
If there is no oidcClient, we are running naked and we don't check.
If we're being redirected to the oidcCallback we d... | [
"The",
"request",
"will",
"have",
"a",
"parameter",
"key",
"if",
"it",
"came",
"from",
"the",
"command",
"line",
"client",
"or",
"have",
"a",
"session",
"key",
"of",
"key",
"if",
"it",
"s",
"the",
"browser",
".",
"If",
"the",
"token",
"is",
"not",
"f... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L459-L483 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | handleFlaskGetRequest | def handleFlaskGetRequest(id_, flaskRequest, endpoint):
"""
Handles the specified flask request for one of the GET URLs
Invokes the specified endpoint to generate a response.
"""
if flaskRequest.method == "GET":
return handleHttpGet(id_, endpoint)
else:
raise exceptions.MethodNot... | python | def handleFlaskGetRequest(id_, flaskRequest, endpoint):
"""
Handles the specified flask request for one of the GET URLs
Invokes the specified endpoint to generate a response.
"""
if flaskRequest.method == "GET":
return handleHttpGet(id_, endpoint)
else:
raise exceptions.MethodNot... | [
"def",
"handleFlaskGetRequest",
"(",
"id_",
",",
"flaskRequest",
",",
"endpoint",
")",
":",
"if",
"flaskRequest",
".",
"method",
"==",
"\"GET\"",
":",
"return",
"handleHttpGet",
"(",
"id_",
",",
"endpoint",
")",
"else",
":",
"raise",
"exceptions",
".",
"Meth... | Handles the specified flask request for one of the GET URLs
Invokes the specified endpoint to generate a response. | [
"Handles",
"the",
"specified",
"flask",
"request",
"for",
"one",
"of",
"the",
"GET",
"URLs",
"Invokes",
"the",
"specified",
"endpoint",
"to",
"generate",
"a",
"response",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L486-L494 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | handleFlaskPostRequest | def handleFlaskPostRequest(flaskRequest, endpoint):
"""
Handles the specified flask request for one of the POST URLS
Invokes the specified endpoint to generate a response.
"""
if flaskRequest.method == "POST":
return handleHttpPost(flaskRequest, endpoint)
elif flaskRequest.method == "OPT... | python | def handleFlaskPostRequest(flaskRequest, endpoint):
"""
Handles the specified flask request for one of the POST URLS
Invokes the specified endpoint to generate a response.
"""
if flaskRequest.method == "POST":
return handleHttpPost(flaskRequest, endpoint)
elif flaskRequest.method == "OPT... | [
"def",
"handleFlaskPostRequest",
"(",
"flaskRequest",
",",
"endpoint",
")",
":",
"if",
"flaskRequest",
".",
"method",
"==",
"\"POST\"",
":",
"return",
"handleHttpPost",
"(",
"flaskRequest",
",",
"endpoint",
")",
"elif",
"flaskRequest",
".",
"method",
"==",
"\"OP... | Handles the specified flask request for one of the POST URLS
Invokes the specified endpoint to generate a response. | [
"Handles",
"the",
"specified",
"flask",
"request",
"for",
"one",
"of",
"the",
"POST",
"URLS",
"Invokes",
"the",
"specified",
"endpoint",
"to",
"generate",
"a",
"response",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L506-L516 |
ga4gh/ga4gh-server | ga4gh/server/frontend.py | ServerStatus.getVariantAnnotationSets | def getVariantAnnotationSets(self, datasetId):
"""
Returns the list of ReferenceSets for this server.
"""
# TODO this should be displayed per-variant set, not per dataset.
variantAnnotationSets = []
dataset = app.backend.getDataRepository().getDataset(datasetId)
f... | python | def getVariantAnnotationSets(self, datasetId):
"""
Returns the list of ReferenceSets for this server.
"""
# TODO this should be displayed per-variant set, not per dataset.
variantAnnotationSets = []
dataset = app.backend.getDataRepository().getDataset(datasetId)
f... | [
"def",
"getVariantAnnotationSets",
"(",
"self",
",",
"datasetId",
")",
":",
"# TODO this should be displayed per-variant set, not per dataset.",
"variantAnnotationSets",
"=",
"[",
"]",
"dataset",
"=",
"app",
".",
"backend",
".",
"getDataRepository",
"(",
")",
".",
"getD... | Returns the list of ReferenceSets for this server. | [
"Returns",
"the",
"list",
"of",
"ReferenceSets",
"for",
"this",
"server",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/frontend.py#L179-L189 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | auth_decorator | def auth_decorator(app=None):
"""
This decorator wraps a view function so that it is protected when Auth0
is enabled. This means that any request will be expected to have a signed
token in the authorization header if the `AUTH0_ENABLED` configuration
setting is True.
The authorization header wi... | python | def auth_decorator(app=None):
"""
This decorator wraps a view function so that it is protected when Auth0
is enabled. This means that any request will be expected to have a signed
token in the authorization header if the `AUTH0_ENABLED` configuration
setting is True.
The authorization header wi... | [
"def",
"auth_decorator",
"(",
"app",
"=",
"None",
")",
":",
"def",
"requires_auth",
"(",
"f",
")",
":",
"@",
"functools",
".",
"wraps",
"(",
"f",
")",
"def",
"decorated",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# This decorator will only ... | This decorator wraps a view function so that it is protected when Auth0
is enabled. This means that any request will be expected to have a signed
token in the authorization header if the `AUTH0_ENABLED` configuration
setting is True.
The authorization header will have the form:
"authorization: Bea... | [
"This",
"decorator",
"wraps",
"a",
"view",
"function",
"so",
"that",
"it",
"is",
"protected",
"when",
"Auth0",
"is",
"enabled",
".",
"This",
"means",
"that",
"any",
"request",
"will",
"be",
"expected",
"to",
"have",
"a",
"signed",
"token",
"in",
"the",
"... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L18-L62 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | decode_header | def decode_header(auth_header, client_id, client_secret):
"""
A function that threads the header through decoding and returns a tuple
of the token and payload if successful. This does not fully authenticate
a request.
:param auth_header:
:param client_id:
:param client_secret:
:return: (... | python | def decode_header(auth_header, client_id, client_secret):
"""
A function that threads the header through decoding and returns a tuple
of the token and payload if successful. This does not fully authenticate
a request.
:param auth_header:
:param client_id:
:param client_secret:
:return: (... | [
"def",
"decode_header",
"(",
"auth_header",
",",
"client_id",
",",
"client_secret",
")",
":",
"return",
"_decode_header",
"(",
"_well_formed",
"(",
"_has_token",
"(",
"_has_bearer",
"(",
"_has_header",
"(",
"auth_header",
")",
")",
")",
")",
",",
"client_id",
... | A function that threads the header through decoding and returns a tuple
of the token and payload if successful. This does not fully authenticate
a request.
:param auth_header:
:param client_id:
:param client_secret:
:return: (token, profile) | [
"A",
"function",
"that",
"threads",
"the",
"header",
"through",
"decoding",
"and",
"returns",
"a",
"tuple",
"of",
"the",
"token",
"and",
"payload",
"if",
"successful",
".",
"This",
"does",
"not",
"fully",
"authenticate",
"a",
"request",
".",
":",
"param",
... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L65-L78 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | logout | def logout(cache):
"""
Logs out the current session by removing it from the cache. This is
expected to only occur when a session has
"""
cache.set(flask.session['auth0_key'], None)
flask.session.clear()
return True | python | def logout(cache):
"""
Logs out the current session by removing it from the cache. This is
expected to only occur when a session has
"""
cache.set(flask.session['auth0_key'], None)
flask.session.clear()
return True | [
"def",
"logout",
"(",
"cache",
")",
":",
"cache",
".",
"set",
"(",
"flask",
".",
"session",
"[",
"'auth0_key'",
"]",
",",
"None",
")",
"flask",
".",
"session",
".",
"clear",
"(",
")",
"return",
"True"
] | Logs out the current session by removing it from the cache. This is
expected to only occur when a session has | [
"Logs",
"out",
"the",
"current",
"session",
"by",
"removing",
"it",
"from",
"the",
"cache",
".",
"This",
"is",
"expected",
"to",
"only",
"occur",
"when",
"a",
"session",
"has"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L81-L88 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | callback_maker | def callback_maker(
cache=None, domain='', client_id='',
client_secret='', redirect_uri=''):
"""
This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authentic... | python | def callback_maker(
cache=None, domain='', client_id='',
client_secret='', redirect_uri=''):
"""
This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authentic... | [
"def",
"callback_maker",
"(",
"cache",
"=",
"None",
",",
"domain",
"=",
"''",
",",
"client_id",
"=",
"''",
",",
"client_secret",
"=",
"''",
",",
"redirect_uri",
"=",
"''",
")",
":",
"def",
"callback_handling",
"(",
")",
":",
"code",
"=",
"flask",
".",
... | This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authenticate that session.
If the session is properly authenticated Auth0 will provide a code so our
application can iden... | [
"This",
"function",
"will",
"generate",
"a",
"view",
"function",
"that",
"can",
"be",
"used",
"to",
"handle",
"the",
"return",
"from",
"Auth0",
".",
"The",
"callback",
"is",
"a",
"redirected",
"session",
"from",
"auth0",
"that",
"includes",
"the",
"token",
... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L91-L159 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | render_login | def render_login(
app=None, scopes='', redirect_uri='', domain='', client_id=''):
"""
This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authenticate that session.
... | python | def render_login(
app=None, scopes='', redirect_uri='', domain='', client_id=''):
"""
This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authenticate that session.
... | [
"def",
"render_login",
"(",
"app",
"=",
"None",
",",
"scopes",
"=",
"''",
",",
"redirect_uri",
"=",
"''",
",",
"domain",
"=",
"''",
",",
"client_id",
"=",
"''",
")",
":",
"return",
"app",
".",
"jinja_env",
".",
"from_string",
"(",
"LOGIN_HTML",
")",
... | This function will generate a view function that can be used to handle
the return from Auth0. The "callback" is a redirected session from auth0
that includes the token we can use to authenticate that session.
If the session is properly authenticated Auth0 will provide a code so our
application can iden... | [
"This",
"function",
"will",
"generate",
"a",
"view",
"function",
"that",
"can",
"be",
"used",
"to",
"handle",
"the",
"return",
"from",
"Auth0",
".",
"The",
"callback",
"is",
"a",
"redirected",
"session",
"from",
"auth0",
"that",
"includes",
"the",
"token",
... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L162-L189 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | render_key | def render_key(app, key=""):
"""
Renders a view from the app and a key that lets the current session grab
its token.
:param app:
:param key:
:return: Rendered view
"""
return app.jinja_env.from_string(KEY_HTML).render(
key=key) | python | def render_key(app, key=""):
"""
Renders a view from the app and a key that lets the current session grab
its token.
:param app:
:param key:
:return: Rendered view
"""
return app.jinja_env.from_string(KEY_HTML).render(
key=key) | [
"def",
"render_key",
"(",
"app",
",",
"key",
"=",
"\"\"",
")",
":",
"return",
"app",
".",
"jinja_env",
".",
"from_string",
"(",
"KEY_HTML",
")",
".",
"render",
"(",
"key",
"=",
"key",
")"
] | Renders a view from the app and a key that lets the current session grab
its token.
:param app:
:param key:
:return: Rendered view | [
"Renders",
"a",
"view",
"from",
"the",
"app",
"and",
"a",
"key",
"that",
"lets",
"the",
"current",
"session",
"grab",
"its",
"token",
".",
":",
"param",
"app",
":",
":",
"param",
"key",
":",
":",
"return",
":",
"Rendered",
"view"
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L192-L201 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | _decode_header | def _decode_header(auth_header, client_id, client_secret):
"""
Takes the header and tries to return an active token and decoded
payload.
:param auth_header:
:param client_id:
:param client_secret:
:return: (token, profile)
"""
try:
token = auth_header.split()[1]
paylo... | python | def _decode_header(auth_header, client_id, client_secret):
"""
Takes the header and tries to return an active token and decoded
payload.
:param auth_header:
:param client_id:
:param client_secret:
:return: (token, profile)
"""
try:
token = auth_header.split()[1]
paylo... | [
"def",
"_decode_header",
"(",
"auth_header",
",",
"client_id",
",",
"client_secret",
")",
":",
"try",
":",
"token",
"=",
"auth_header",
".",
"split",
"(",
")",
"[",
"1",
"]",
"payload",
"=",
"jwt",
".",
"decode",
"(",
"token",
",",
"client_secret",
",",
... | Takes the header and tries to return an active token and decoded
payload.
:param auth_header:
:param client_id:
:param client_secret:
:return: (token, profile) | [
"Takes",
"the",
"header",
"and",
"tries",
"to",
"return",
"an",
"active",
"token",
"and",
"decoded",
"payload",
".",
":",
"param",
"auth_header",
":",
":",
"param",
"client_id",
":",
":",
"param",
"client_secret",
":",
":",
"return",
":",
"(",
"token",
"... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L245-L275 |
ga4gh/ga4gh-server | ga4gh/server/auth/__init__.py | is_active | def is_active(cache, token):
"""
Accepts the cache and ID token and checks to see if the profile is
currently logged in. If so, return the token, otherwise throw a
NotAuthenticatedException.
:param cache:
:param token:
:return:
"""
profile = cache.get(token)
if not profile:
... | python | def is_active(cache, token):
"""
Accepts the cache and ID token and checks to see if the profile is
currently logged in. If so, return the token, otherwise throw a
NotAuthenticatedException.
:param cache:
:param token:
:return:
"""
profile = cache.get(token)
if not profile:
... | [
"def",
"is_active",
"(",
"cache",
",",
"token",
")",
":",
"profile",
"=",
"cache",
".",
"get",
"(",
"token",
")",
"if",
"not",
"profile",
":",
"raise",
"exceptions",
".",
"NotAuthenticatedException",
"(",
"'The token is good, but you are not logged in. Please '",
... | Accepts the cache and ID token and checks to see if the profile is
currently logged in. If so, return the token, otherwise throw a
NotAuthenticatedException.
:param cache:
:param token:
:return: | [
"Accepts",
"the",
"cache",
"and",
"ID",
"token",
"and",
"checks",
"to",
"see",
"if",
"the",
"profile",
"is",
"currently",
"logged",
"in",
".",
"If",
"so",
"return",
"the",
"token",
"otherwise",
"throw",
"a",
"NotAuthenticatedException",
".",
":",
"param",
... | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/auth/__init__.py#L286-L300 |
ga4gh/ga4gh-server | ga4gh/server/datamodel/references.py | AbstractReferenceSet.addReference | def addReference(self, reference):
"""
Adds the specified reference to this ReferenceSet.
"""
id_ = reference.getId()
self._referenceIdMap[id_] = reference
self._referenceNameMap[reference.getLocalId()] = reference
self._referenceIds.append(id_) | python | def addReference(self, reference):
"""
Adds the specified reference to this ReferenceSet.
"""
id_ = reference.getId()
self._referenceIdMap[id_] = reference
self._referenceNameMap[reference.getLocalId()] = reference
self._referenceIds.append(id_) | [
"def",
"addReference",
"(",
"self",
",",
"reference",
")",
":",
"id_",
"=",
"reference",
".",
"getId",
"(",
")",
"self",
".",
"_referenceIdMap",
"[",
"id_",
"]",
"=",
"reference",
"self",
".",
"_referenceNameMap",
"[",
"reference",
".",
"getLocalId",
"(",
... | Adds the specified reference to this ReferenceSet. | [
"Adds",
"the",
"specified",
"reference",
"to",
"this",
"ReferenceSet",
"."
] | train | https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datamodel/references.py#L49-L56 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.