Tanggal :August 5, 2020

bpy4. SeqRecord in Biopython

Spread the love

A SeqRecord object contains annotations describing the sequence.

An example, based on one from their docs, is presented.

You can get the help docs using SeqRecord? in IPython or help(SeqRecord).

The docs pertaining to creating a SeqRecord is printed. This is only partial, and a complete printout will occur the subscripts are omitted.

# bpy4.py

from __future__ import print_function
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.Alphabet.IUPAC import protein
record = SeqRecord(Seq(seqStr,protein),
id="YP_025292.1", name="HokC",
description="toxic membrane protein")
record.annotations['where']="from docs, 'SecRecord?'"
createSeqRec = SeqRecord.__init__.__doc__[:317]
for i in createSeqRec.split("n"): print(i.strip())
#record.annotations: {}
#record.annotations: {'where': "from docs, 'SecRecord?'"}
#record.annotations['where']: from docs, 'SecRecord?'
#Create a SeqRecord.
#- seq - Sequence, required (Seq, MutableSeq or UnknownSeq)
#- id - Sequence identifier, recommended (string)
#- name - Sequence name, optional (string)
#- description - Sequence description, optional (string)

Leave a Reply

Your email address will not be published. Required fields are marked *