Record¶
- class moclo.record.CircularRecord(SeqRecord)[source]¶
A derived
SeqRecord
that contains a circular DNA sequence.It handles the
in
operator as expected, and removes the implementation of the+
operator since circular DNA sequence do not have an end to append more nucleotides to. In addition, it overloads the>>
and<<
operators to allow rotating the sequence and its annotations, effectively changing the 0 position.See also
Bio.SeqRecord.SeqRecord
documentation on the Biopython wiki.- __add__(other)[source]¶
Add another sequence or string to this sequence.
Since adding an arbitrary sequence to a plasmid is ambiguous (there is no sequence end), trying to add a sequence to a
CircularRecord
will raise aTypeError
.
- __getitem__(index)[source]¶
Return a sub-sequence or an individual letter.
The sub-sequence is always returned as a
SeqRecord
, since it is probably not circular anymore.
- __init__(seq, id='<unknown id>', name='<unknown name>', description='<unknown description>', dbxrefs=None, features=None, annotations=None, letter_annotations=None)[source]¶
Create a new
CircularRecord
instance.If given a
SeqRecord
as the first argument, it will simply copy all attributes of the record. This allows usingBio.SeqIO.read
to open records, then loading them into aCircularRecord
.