当前位置: 首页>>代码示例>>Python>>正文


Python api.GenomeAnnotationAPI类代码示例

本文整理汇总了Python中doekbase.data_api.annotation.genome_annotation.api.GenomeAnnotationAPI的典型用法代码示例。如果您正苦于以下问题:Python GenomeAnnotationAPI类的具体用法?Python GenomeAnnotationAPI怎么用?Python GenomeAnnotationAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GenomeAnnotationAPI类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_summary

    def get_summary(self, ctx, ref):
        """
        Retrieve a summary representation of this GenomeAnnotation.
        @return summary data
        :param ref: instance of type "ObjectReference"
        :returns: instance of type "Summary_data" -> structure: parameter
           "scientific_name" of String, parameter "taxonomy_id" of Long,
           parameter "kingdom" of String, parameter "scientific_lineage" of
           list of String, parameter "genetic_code" of Long, parameter
           "organism_aliases" of list of String, parameter "assembly_source"
           of String, parameter "assembly_source_id" of String, parameter
           "assembly_source_date" of String, parameter "gc_content" of
           Double, parameter "dna_size" of Long, parameter "num_contigs" of
           Long, parameter "contig_ids" of list of String, parameter
           "external_source" of String, parameter "external_source_date" of
           String, parameter "release" of String, parameter
           "original_source_filename" of String, parameter
           "feature_type_counts" of mapping from String to Long
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_summary
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_summary()
        #END get_summary

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_summary return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:32,代码来源:GenomeAnnotationAPIImpl.py

示例2: get_mrna_by_gene

    def get_mrna_by_gene(self, ctx, ref, gene_id_list):
        """
        Retrieve the mRNA IDs for given gene IDs.
        @param gene_id_list List of gene Feature IDS for which to retrieve mRNA IDs.
            If empty, returns all gene/mRNA mappings.
        @return Mapping of gene Feature IDs to a list of mRNA Feature IDs.
        :param ref: instance of type "ObjectReference"
        :param gene_id_list: instance of list of String
        :returns: instance of mapping from String to list of String
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_mrna_by_gene
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)

        if not gene_id_list:
            returnVal = ga.get_mrna_by_gene([])
        else:
            returnVal = ga.get_mrna_by_gene(gene_id_list)
        #END get_mrna_by_gene

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_mrna_by_gene return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:27,代码来源:GenomeAnnotationAPIImpl.py

示例3: get_mrna_exons

    def get_mrna_exons(self, ctx, ref, mrna_id_list):
        """
        Retrieve Exon information for each mRNA ID.
        @param mrna_id_list List of mRNA Feature IDS for which to retrieve exons.
            If empty, returns data for all exons.
        @return Mapping of mRNA Feature IDs to a list of exons (:js:data:`Exon_data`).
        :param ref: instance of type "ObjectReference"
        :param mrna_id_list: instance of list of String
        :returns: instance of mapping from String to list of type "Exon_data"
           -> structure: parameter "exon_location" of type "Region" ->
           structure: parameter "contig_id" of String, parameter "strand" of
           String, parameter "start" of Long, parameter "length" of Long,
           parameter "exon_dna_sequence" of String, parameter "exon_ordinal"
           of Long
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_mrna_exons
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_mrna_by_exons(mrna_id_list)
        #END get_mrna_exons

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_mrna_exons return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:28,代码来源:GenomeAnnotationAPIImpl.py

示例4: get_cds_by_mrna

    def get_cds_by_mrna(self, ctx, ref, mrna_id_list):
        """
        Retrieves coding sequence (cds) Feature IDs for given mRNA Feature IDs.
        @param mrna_id_list List of mRNA Feature IDS for which to retrieve CDS.
            If empty, returns data for all features.
        @return Mapping of mRNA Feature IDs to a list of CDS Feature IDs.
        :param ref: instance of type "ObjectReference"
        :param mrna_id_list: instance of list of String
        :returns: instance of mapping from String to String
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_cds_by_mrna
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)

        if not mrna_id_list:
            returnVal = ga.get_cds_by_mrna([])
        else:
            returnVal = ga.get_cds_by_mrna(mrna_id_list)
        #END get_cds_by_mrna

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_cds_by_mrna return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:27,代码来源:GenomeAnnotationAPIImpl.py

示例5: get_feature_locations

    def get_feature_locations(self, ctx, ref, feature_id_list):
        """
        Retrieve Feature locations.
        @param feature_id_list List of Feature IDs for which to retrieve locations.
            If empty, returns data for all features.
        @return Mapping from Feature IDs to location information for each.
        :param ref: instance of type "ObjectReference"
        :param feature_id_list: instance of list of String
        :returns: instance of mapping from String to list of type "Region" ->
           structure: parameter "contig_id" of String, parameter "strand" of
           String, parameter "start" of Long, parameter "length" of Long
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_feature_locations
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_feature_locations(feature_id_list)
        #END get_feature_locations

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_feature_locations return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:25,代码来源:GenomeAnnotationAPIImpl.py

示例6: get_proteins

    def get_proteins(self, ctx, ref):
        """
        Retrieve Protein data.
        @return Mapping from protein ID to data about the protein.
        :param ref: instance of type "ObjectReference"
        :returns: instance of mapping from String to type "Protein_data" ->
           structure: parameter "protein_id" of String, parameter
           "protein_amino_acid_sequence" of String, parameter
           "protein_function" of String, parameter "protein_aliases" of list
           of String, parameter "protein_md5" of String, parameter
           "protein_domain_locations" of list of String
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_proteins
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_proteins()
        #END get_proteins

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_proteins return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:25,代码来源:GenomeAnnotationAPIImpl.py

示例7: get_features

    def get_features(self, ctx, ref, feature_id_list):
        """
        Retrieve Feature data.
        @param feature_id_list List of Features to retrieve.
          If None, returns all Feature data.
        @return Mapping from Feature IDs to dicts of available data.
        :param ref: instance of type "ObjectReference"
        :param feature_id_list: instance of list of String
        :returns: instance of mapping from String to type "Feature_data" ->
           structure: parameter "feature_id" of String, parameter
           "feature_type" of String, parameter "feature_function" of String,
           parameter "feature_aliases" of mapping from String to list of
           String, parameter "feature_dna_sequence_length" of Long, parameter
           "feature_dna_sequence" of String, parameter "feature_md5" of
           String, parameter "feature_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 "feature_publications" of list of String, parameter
           "feature_quality_warnings" of list of String, parameter
           "feature_quality_score" of list of String, parameter
           "feature_notes" of String, parameter "feature_inference" of String
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_features
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_features(feature_id_list)
        #END get_features

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_features return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:35,代码来源:GenomeAnnotationAPIImpl.py

示例8: get_feature_type_descriptions

    def get_feature_type_descriptions(self, ctx, ref, feature_type_list):
        """
        Retrieve the descriptions for each Feature type in
        this GenomeAnnotation.
        @param feature_type_list List of Feature types. If this list
         is empty or None,
         the whole mapping will be returned.
        @return Name and description for each requested Feature Type
        :param ref: instance of type "ObjectReference"
        :param feature_type_list: instance of list of String
        :returns: instance of mapping from String to String
        """
        # ctx is the context object
        # return variables are: returnVal
        #BEGIN get_feature_type_descriptions
        ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref)
        returnVal = ga.get_feature_type_descriptions(feature_type_list)
        #END get_feature_type_descriptions

        # At some point might do deeper type checking...
        if not isinstance(returnVal, dict):
            raise ValueError('Method get_feature_type_descriptions return value ' +
                             'returnVal is not type dict as required.')
        # return the results
        return [returnVal]
开发者ID:msneddon,项目名称:genome_annotation_api,代码行数:25,代码来源:GenomeAnnotationAPIImpl.py


注:本文中的doekbase.data_api.annotation.genome_annotation.api.GenomeAnnotationAPI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。