BiopythonTranslator.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:DnaFeaturesViewer 作者: Edinburgh-Genome-Foundry 项目源码 文件源码
def translate_record(self, record, grecord_class=None):
        """Create a new GraphicRecord from a BioPython Record object.

        Parameters
        ----------

        record
          A BioPython Record object or the path to a Genbank file.

        grecord_class
          The graphic record class to use, e.g. GraphicRecord (default) or
          CircularGraphicRecord.
        """

        if isinstance(record, str):
            record = SeqIO.read(record, "genbank")
        if grecord_class is None:
            grecord_class = GraphicRecord
        return grecord_class(sequence_length=len(record.seq), features=[
            self.translate_feature(feature)
            for feature in self.compute_filtered_features(record.features)
            if feature.location is not None
        ], **self.graphic_record_parameters)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号