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

All Samples(187)  |  Call(152)  |  Derive(0)  |  Import(35)

src/c/o/cogent-1.5.3/cogent/parse/blast.py   cogent(Download)
#!/usr/bin/env python
"""Parsers for blast, psi-blast and blat.
"""
from cogent.parse.record_finder import LabeledRecordFinder, \
    DelimitedRecordFinder, never_ignore
    return key, value
 
BlatFinder = LabeledRecordFinder(query_finder, constructor=strip, \
    ignore=is_blat_junk)
 
BlastFinder = LabeledRecordFinder(query_finder, constructor=strip, \
    ignore=is_blast_junk)
 
PsiBlastFinder = LabeledRecordFinder(iter_finder, constructor=strip, \
    ignore=is_blast_junk)
 
PsiBlastQueryFinder = LabeledRecordFinder(iteration_set_finder, \
    constructor=strip, ignore=is_blast_junk)
 

src/p/y/pycogent-HEAD/cogent/parse/blast.py   pycogent(Download)
#!/usr/bin/env python
"""Parsers for blast, psi-blast and blat.
"""
from cogent.parse.record_finder import LabeledRecordFinder, \
    DelimitedRecordFinder, never_ignore
    return key, value
 
BlatFinder = LabeledRecordFinder(query_finder, constructor=strip, \
    ignore=is_blat_junk)
 
BlastFinder = LabeledRecordFinder(query_finder, constructor=strip, \
    ignore=is_blast_junk)
 
PsiBlastFinder = LabeledRecordFinder(iter_finder, constructor=strip, \
    ignore=is_blast_junk)
 
PsiBlastQueryFinder = LabeledRecordFinder(iteration_set_finder, \
    constructor=strip, ignore=is_blast_junk)
 

src/c/o/cogent-1.5.3/cogent/parse/meme.py   cogent(Download)
    Supports MEME version 3.0 - 4.8.1
"""
from cogent.parse.record_finder import LabeledRecordFinder
from cogent.parse.record import DelimitedSplitter
from cogent.motif.util import Location, ModuleInstance, Module, Motif,\
def getDataBlock(lines):
    """Returns main block of data as list.
    """
    #Get main data block: All lines following "COMMAND LINE SUMMARY"
    meme_command = LabeledRecordFinder(lambda x: x.startswith('COMMAND'))
    main_block = list(meme_command(lines))
def getCommandModuleBlocks(main_block):
    """Returns command line summary block and list of module blocks.
    """
    #Get Command line summary and all module information
    meme_module = LabeledRecordFinder(lambda x: x.startswith('MOTIF'))
    main_block = list(meme_module(main_block))

src/p/y/pycogent-HEAD/cogent/parse/meme.py   pycogent(Download)
    Supports MEME version 3.0 - 4.8.1
"""
from cogent.parse.record_finder import LabeledRecordFinder
from cogent.parse.record import DelimitedSplitter
from cogent.motif.util import Location, ModuleInstance, Module, Motif,\
def getDataBlock(lines):
    """Returns main block of data as list.
    """
    #Get main data block: All lines following "COMMAND LINE SUMMARY"
    meme_command = LabeledRecordFinder(lambda x: x.startswith('COMMAND'))
    main_block = list(meme_command(lines))
def getCommandModuleBlocks(main_block):
    """Returns command line summary block and list of module blocks.
    """
    #Get Command line summary and all module information
    meme_module = LabeledRecordFinder(lambda x: x.startswith('MOTIF'))
    main_block = list(meme_module(main_block))

src/c/o/cogent-1.5.3/cogent/parse/ebi.py   cogent(Download)
from string import maketrans, strip, rstrip
from pprint import pprint, pformat
from cogent.parse.record_finder import DelimitedRecordFinder,\
    LabeledRecordFinder, is_empty, TailedRecordFinder
from cogent.parse.record import RecordError, FieldError
 
no_indent = lambda s: not s.startswith(' ')
hanging_paragraph_finder = LabeledRecordFinder(no_indent, constructor=None) 
 
endswith_period = lambda x: x.endswith('.')
    secondary_structure_keynames = 'HELIX STRAND TURN'.split()
    result = {}
    for item in hanging_paragraph_finder(lines):
        keyname, start, end, description = ft_basic_itemparser(item)
 
 
    #the return line is all we need, if no license block
    return hanging_paragraph_finder(lines)
 
 
 
cc_alternative_products_event_finder = LabeledRecordFinder(
        lambda x: x.startswith('Event='))
cc_alternative_products_name_finder = LabeledRecordFinder(
        lambda x: x.startswith('Name='))

src/p/y/pycogent-HEAD/cogent/parse/ebi.py   pycogent(Download)
from string import maketrans, strip, rstrip
from pprint import pprint, pformat
from cogent.parse.record_finder import DelimitedRecordFinder,\
    LabeledRecordFinder, is_empty, TailedRecordFinder
from cogent.parse.record import RecordError, FieldError
 
no_indent = lambda s: not s.startswith(' ')
hanging_paragraph_finder = LabeledRecordFinder(no_indent, constructor=None) 
 
endswith_period = lambda x: x.endswith('.')
    secondary_structure_keynames = 'HELIX STRAND TURN'.split()
    result = {}
    for item in hanging_paragraph_finder(lines):
        keyname, start, end, description = ft_basic_itemparser(item)
 
 
    #the return line is all we need, if no license block
    return hanging_paragraph_finder(lines)
 
 
 
cc_alternative_products_event_finder = LabeledRecordFinder(
        lambda x: x.startswith('Event='))
cc_alternative_products_name_finder = LabeledRecordFinder(
        lambda x: x.startswith('Name='))

src/c/o/cogent-1.5.3/cogent/parse/flowgram_parser.py   cogent(Download)
 
from cogent.parse.flowgram import Flowgram
from cogent.parse.record_finder import LabeledRecordFinder, is_fasta_label,\
     DelimitedRecordFinder, is_empty
 
    One and only one of the parameters must be set
    """
    sff_info = LabeledRecordFinder(is_fasta_label,constructor=strip)
    sum_gen = sff_info(handle)
 
def get_all_summaries(lines):
    """Returns all the flowgrams and sequence summaries in list of lists"""
    sff_info = LabeledRecordFinder(is_fasta_label,constructor=strip)
 
    return list(sff_info(lines))[1::]

src/p/y/pycogent-HEAD/cogent/parse/flowgram_parser.py   pycogent(Download)
 
from cogent.parse.flowgram import Flowgram
from cogent.parse.record_finder import LabeledRecordFinder, is_fasta_label,\
     DelimitedRecordFinder, is_empty
 
    One and only one of the parameters must be set
    """
    sff_info = LabeledRecordFinder(is_fasta_label,constructor=strip)
    sum_gen = sff_info(handle)
 
def get_all_summaries(lines):
    """Returns all the flowgrams and sequence summaries in list of lists"""
    sff_info = LabeledRecordFinder(is_fasta_label,constructor=strip)
 
    return list(sff_info(lines))[1::]

src/c/o/cogent-1.5.3/cogent/parse/cutg.py   cogent(Download)
whether they are quoted is considerably more effort than the reward warrants.
"""
from cogent.parse.record_finder import LabeledRecordFinder
from cogent.parse.record import RecordError, DelimitedSplitter
from cogent.core.info import Info, DbRef
    return (not x) or x.isspace()
 
CutgSpeciesFinder = LabeledRecordFinder(is_cutg_species_label, ignore=is_blank)
 
CutgFinder = LabeledRecordFinder(is_cutg_label, ignore=is_blank)
    """
    if not strict:  #easier to see logic without detailed error handling
        for rec in CutgSpeciesFinder(infile):
            try:
                label, counts = rec
                continue
    else:
        for rec in CutgSpeciesFinder(infile):
            try:
                label, counts = rec

src/p/y/pycogent-HEAD/cogent/parse/cutg.py   pycogent(Download)
whether they are quoted is considerably more effort than the reward warrants.
"""
from cogent.parse.record_finder import LabeledRecordFinder
from cogent.parse.record import RecordError, DelimitedSplitter
from cogent.core.info import Info, DbRef
    return (not x) or x.isspace()
 
CutgSpeciesFinder = LabeledRecordFinder(is_cutg_species_label, ignore=is_blank)
 
CutgFinder = LabeledRecordFinder(is_cutg_label, ignore=is_blank)
    """
    if not strict:  #easier to see logic without detailed error handling
        for rec in CutgSpeciesFinder(infile):
            try:
                label, counts = rec
                continue
    else:
        for rec in CutgSpeciesFinder(infile):
            try:
                label, counts = rec

  1 | 2 | 3 | 4  Next