本文整理汇总了Python中doekbase.data_api.annotation.genome_annotation.api.GenomeAnnotationAPI.get_mrna_by_utrs方法的典型用法代码示例。如果您正苦于以下问题:Python GenomeAnnotationAPI.get_mrna_by_utrs方法的具体用法?Python GenomeAnnotationAPI.get_mrna_by_utrs怎么用?Python GenomeAnnotationAPI.get_mrna_by_utrs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类doekbase.data_api.annotation.genome_annotation.api.GenomeAnnotationAPI
的用法示例。
在下文中一共展示了GenomeAnnotationAPI.get_mrna_by_utrs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_mrna_utrs
# 需要导入模块: from doekbase.data_api.annotation.genome_annotation.api import GenomeAnnotationAPI [as 别名]
# 或者: from doekbase.data_api.annotation.genome_annotation.api.GenomeAnnotationAPI import get_mrna_by_utrs [as 别名]
def get_mrna_utrs(self, ctx, ref, mrna_id_list):
"""
Retrieve UTR information for each mRNA Feature ID.
UTRs are calculated between mRNA features and corresponding CDS features.
The return value for each mRNA can contain either:
- no UTRs found (empty dict)
- 5' UTR only
- 3' UTR only
- 5' and 3' UTRs
Note: The Genome data type does not contain interfeature
relationship information. Calling this method for Genome objects
will raise a :js:throws:`exc.TypeException`.
@param feature_id_list List of mRNA Feature IDS for which to retrieve UTRs.
If empty, returns data for all UTRs.
@return Mapping of mRNA Feature IDs to a mapping that contains
both 5' and 3' UTRs::
{ "5'UTR": :js:data:`UTR_data`, "3'UTR": :js:data:`UTR_data` }
:param ref: instance of type "ObjectReference"
:param mrna_id_list: instance of list of String
:returns: instance of mapping from String to mapping from String to
type "UTR_data" -> structure: parameter "utr_locations" of list of
type "Region" -> structure: parameter "contig_id" of String,
parameter "strand" of String, parameter "start" of Long, parameter
"length" of Long, parameter "utr_dna_sequence" of String
"""
# ctx is the context object
# return variables are: returnVal
#BEGIN get_mrna_utrs
ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
returnVal = ga.get_mrna_by_utrs(mrna_id_list)
#END get_mrna_utrs
# At some point might do deeper type checking...
if not isinstance(returnVal, dict):
raise ValueError('Method get_mrna_utrs return value ' +
'returnVal is not type dict as required.')
# return the results
return [returnVal]