def from_SeqRecord(cls, record: _SeqRecord, *args, linear=True, circular=False, n=5e-14, **kwargs): obj = cls.__new__(cls) # Does not call __init__ obj._seq = _Dseq.quick( str(record.seq), _rc(str(record.seq)), ovhg=0, linear=linear, circular=circular, ) obj.id = record.id obj.name = record.name obj.description = record.description obj.dbxrefs = record.dbxrefs obj.annotations = {"molecule_type": "DNA"} obj.annotations.update(record.annotations) obj._per_letter_annotations = record._per_letter_annotations obj.features = record.features obj.map_target = None obj.n = n return obj
def from_string(cls, record: str = "", *args, linear=True, circular=False, n=5e-14, **kwargs): # def from_string(cls, record:str="", *args, linear=True, circular=False, n = 5E-14, **kwargs): obj = cls.__new__(cls) # Does not call __init__ obj._seq = _Dseq.quick(record, _rc(record), ovhg=0, linear=linear, circular=circular) obj.id = _pretty_str("id") obj.name = _pretty_str("name") obj.description = _pretty_str("description") obj.dbxrefs = [] obj.annotations = {"molecule_type": "DNA"} obj._per_letter_annotations = {} obj.features = [] obj.map_target = None obj.n = n obj.__dict__.update(kwargs) return obj