Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(57)  |  Call(57)  |  Derive(0)  |  Import(0)
Turns a nucleotide sequence into a protein sequence. New Seq object.

This method will translate DNA or RNA sequences, and those with a
nucleotide or generic alphabet.  Trying to translate a protein
sequence raises an exception.

Arguments:
 - table - Which codon table to use?  This can be either a name
           (string), an NCBI identifier (integer), or a CodonTable
           object (useful for non-standard genetic codes).  This(more...)

src/s/e/seqmagick-0.5.0/seqmagick/transform.py   seqmagick(Download)
        sequence = str(record.seq)
        seq = Seq(sequence, alphabet)
        protein = seq.translate(table, to_stop=to_stop)
        yield SeqRecord(protein, id=record.id, description=record.description)
 

src/s/e/seqmagick-HEAD/seqmagick/transform.py   seqmagick(Download)
        sequence = str(record.seq)
        seq = Seq(sequence, alphabet)
        protein = seq.translate(table, to_stop=to_stop)
        yield SeqRecord(protein, id=record.id, description=record.description)
 

src/b/i/biopython-1.63/Tests/test_translate.py   biopython(Download)
s = ""
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
assert  str(protein)==""
 
s = "TAA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
s = "GAAAATTCATTTTCTTTGGACTTTCTCTGAAATCCGAGTCCTAGGAAAGATGCGTGAGATTCTTCA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
assert str(protein)=='ENSFSLDFL'
 
s = "GAA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(15, to_stop=True)
s = "ATA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate('Vertebrate Mitochondrial', to_stop=True)
assert str(protein)=="M"
 

src/b/i/biopython-HEAD/Tests/test_translate.py   biopython(Download)
s = ""
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
assert  str(protein)==""
 
s = "TAA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
s = "GAAAATTCATTTTCTTTGGACTTTCTCTGAAATCCGAGTCCTAGGAAAGATGCGTGAGATTCTTCA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(to_stop=True)
assert str(protein)=='ENSFSLDFL'
 
s = "GAA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate(15, to_stop=True)
s = "ATA"
dna = Seq.Seq(s, IUPAC.unambiguous_dna)
protein = dna.translate('Vertebrate Mitochondrial', to_stop=True)
assert str(protein)=="M"
 

src/j/c/jcvi-HEAD/formats/genbank.py   jcvi(Download)
 
                fwcds.write(">{0}\n{1}\n".format(accn, seq))
                fwpep.write(">{0}\n{1}\n".format(accn, seq.translate()))
 
    def write_genes(self, output="gbout", individual=False, pep=True):

src/e/p/epitopes-0.3/epitopes/mutate.py   epitopes(Download)
            (transcript_ref_base, position, dna_ref)
 
    original_protein = transcript_seq.translate()
    n_original_protein = len(original_protein)
 

src/e/p/epitopes-HEAD/epitopes/mutate.py   epitopes(Download)
            (transcript_ref_base, position, dna_ref)
 
    original_protein = transcript_seq.translate()
    n_original_protein = len(original_protein)
 

src/e/p/epitopes-HEAD/test/test_mutate.py   epitopes(Download)
def test_mutate_protein_from_transcript_snp():
    seq = Seq("ACTGCTATTCGTAGT")
    prot_seq = Seq("TAIRS")
    assert(str(seq.translate()) == str(prot_seq))
 
def test_mutate_protein_from_transcript_indel():
    seq = Seq("ACTGCTATTCGTAGT")
    prot_seq = Seq("TAIRS")
 
    assert(str(seq.translate()) == str(prot_seq))
def test_mutate_protein_prefix_stop_codon():
    seq = Seq("TAGGCTATTCGTAGT")
    prot_seq = Seq("*AIRS")
 
    assert(str(seq.translate()) == str(prot_seq))
def test_mutate_protein_from_transcript_snp_coordinates():
    seq = Seq("ACTGCTATTCGTAGT")
    prot_seq = Seq("TAIRS")
    assert(str(seq.translate()) == str(prot_seq))
 
def test_mutate_protein_from_transcript_indel_coordinates():
    seq = Seq("ACTGCTATTCGTAGT")
    prot_seq = Seq("TAIRS")
 
    assert(str(seq.translate()) == str(prot_seq))

src/b/i/biopython-HEAD/Tests/test_seq.py   biopython(Download)
        continue  # Only Seq has this method
    try:
        print(s.translate())
        assert False, "Translation shouldn't work on a protein!"
    except ValueError:

src/b/i/biopython-1.63/Tests/test_seq.py   biopython(Download)
        continue  # Only Seq has this method
    try:
        print(s.translate())
        assert False, "Translation shouldn't work on a protein!"
    except ValueError:

  1 | 2  Next