本文整理汇总了Python中Bio.Seq.back_transcribe方法的典型用法代码示例。如果您正苦于以下问题:Python Seq.back_transcribe方法的具体用法?Python Seq.back_transcribe怎么用?Python Seq.back_transcribe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bio.Seq
的用法示例。
在下文中一共展示了Seq.back_transcribe方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_back_transcription_of_proteins
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
def test_back_transcription_of_proteins(self):
"""Test back-transcription shouldn't work on a protein!"""
for s in protein_seqs:
with self.assertRaises(ValueError):
Seq.back_transcribe(s)
if isinstance(s, Seq.Seq):
with self.assertRaises(ValueError):
s.back_transcribe()
示例2: dna_aa
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
def dna_aa():
if session.username == None:
redirect(URL(r=request, c='account', f='log_in'))
form = FORM(TABLE(TR('Sequence (raw format): ',
TEXTAREA(_type='text', _name='sequence',
requires=IS_NOT_EMPTY())),
#TR("Sequence Type: ",
# SELECT("Raw Format", "FASTA",
# _name="seq_type")),
TR('Action: ',
SELECT('Complementation', 'Transcribe', 'Translate',
'Back Transcribe', 'Back Translate',
_name='action'),
INPUT(_type='submit', _value='SUBMIT'))))
if form.accepts(request.vars,session):
#if form.vars.seq_type == "FASTA":
# session['sequence'] = \
# seqClean(fasta_to_raw(form.vars.sequence.upper()))
#else:
session['sequence'] = seqClean(form.vars.sequence.upper())
if form.vars.action == "Complementation":
session['action'] = "Complementation"
session['Complement'] = Seq.reverse_complement(session['sequence'])
if form.vars.action == "Transcribe":
session['action'] = 'Transcribe'
session['Transcribed RNA'] = Seq.transcribe(session['sequence'])
if form.vars.action == "Back Transcribe":
session['action'] = 'Back Transcribe'
session['DNA'] = Seq.back_transcribe(session['sequence'])
if form.vars.action == "Translate":
session['action'] = 'Translate'
session.update(translate(session['sequence']))
if form.vars.action == "Back Translate":
session['action'] = 'Back Translate'
session.update(back_translate(session['sequence']))
redirect(URL(r=request, f='dna_aa_output'))
return dict(form=form)
示例3: isinstance
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
assert False, "Transcription shouldn't work on a protein!"
except ValueError :
pass
if not isinstance(s, Seq.Seq) : continue #Only Seq has this method
try :
print s.transcribe()
assert False, "Transcription shouldn't work on a protein!"
except ValueError :
pass
print
print "Back-transcribe RNA into DNA"
print "============================"
for nucleotide_seq in test_seqs:
try :
expected = Seq.back_transcribe(nucleotide_seq)
assert str(nucleotide_seq).replace("u","t").replace("U","T") == str(expected)
print "%s -> %s" \
% (repr(nucleotide_seq) , repr(expected))
except ValueError, e :
expected = None
print "%s -> %s" \
% (repr(nucleotide_seq) , str(e))
#Now test the Seq object's method
if isinstance(nucleotide_seq, Seq.Seq) :
try :
assert repr(expected) == repr(nucleotide_seq.back_transcribe())
except ValueError :
assert expected is None
for s in protein_seqs :
示例4: test_seq_object_back_transcription_method
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
def test_seq_object_back_transcription_method(self):
for nucleotide_seq in test_seqs:
if isinstance(nucleotide_seq.alphabet, Alphabet.RNAAlphabet) and \
isinstance(nucleotide_seq, Seq.Seq):
expected = Seq.back_transcribe(nucleotide_seq)
self.assertEqual(repr(nucleotide_seq.back_transcribe()), repr(expected))
示例5: test_back_transcribe_rna_string_into_dna
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
def test_back_transcribe_rna_string_into_dna(self):
seq = "AUGAAACUG"
self.assertEqual("ATGAAACTG", Seq.back_transcribe(seq))
示例6: test_back_transcribe_rna_into_dna
# 需要导入模块: from Bio import Seq [as 别名]
# 或者: from Bio.Seq import back_transcribe [as 别名]
def test_back_transcribe_rna_into_dna(self):
for nucleotide_seq in test_seqs:
if isinstance(nucleotide_seq.alphabet, Alphabet.RNAAlphabet):
expected = Seq.back_transcribe(nucleotide_seq)
self.assertEqual(str(nucleotide_seq).replace("u", "t").replace("U", "T"),
str(expected))