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

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)
It annotates the given seqrecords with poly-A or poly-T regions

src/s/e/seq_crumbs-HEAD/crumbs/transcript_orientations.py   seq_crumbs(Download)
import os.path
 
from crumbs.annotation import (PolyaAnnotator, EstscanOrfAnnotator,
                               BlastAnnotator)
from crumbs.utils.seq_utils import append_to_description
    def _get_annotator(self, annotator_name, blastdb):
        'It prepares and returns the annotator'
        if annotator_name == 'polyA':
            annotator = PolyaAnnotator(**self._polya_params)
        elif annotator_name == 'estscan_orf':

src/s/e/seq_crumbs-HEAD/test/test_annotation.py   seq_crumbs(Download)
from Bio.SeqRecord import SeqRecord
 
from crumbs.annotation import (EstscanOrfAnnotator, _detect_polya_tail,
                               PolyaAnnotator, BlastAnnotator)
from crumbs.utils.test_utils import TEST_DATA_DIR
        seq3 = SeqRecord(seq=Seq('TTTTcTTatccgtcagcatcCAATAAAAA'), id='seq3')
        seqs = [_wrap_seq(seq1), _wrap_seq(seq2), _wrap_seq(seq3)]
        annotator = PolyaAnnotator(min_len=5, max_cont_mismatches=0)
        seqs = annotator(seqs)
        polya1 = seqs[0].object.features[0]
        seq3 = SeqRecord(seq=Seq('TTTTcTTatccgtcagcatcCAATAAAAA'), id='seq3')
        seqs = [_wrap_seq(seq1), _wrap_seq(seq2), _wrap_seq(seq3)]
        annotator = PolyaAnnotator(min_len=4, max_cont_mismatches=1)
        seqs = annotator(seqs)
        polya1 = seqs[0].object.features[0]