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)
BiopythonTranslator.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录