Esempio n. 1
0
def search(ppr, target, reverse=True, gaps=1, show_stats=False):
    itarget = get_iseq(target)
    bg = get_background(itarget)

    if isinstance(ppr, SeqRecord):
        pssm = binding_rules.build_PSSM(ppr, coding='yagi')  #, background=bg)
    else:
        #assume we were passed a pssm
        pssm = ppr

    alignments = PSSM_gapped_search(pssm, itarget, gaps)
    ralignments = PSSM_gapped_search(pssm, ireverse_complement(itarget), gaps)

    sf = [x.toSeqFeature(pssm) for x in alignments]
    sf += [x.toSeqFeature(pssm, reflect=len(itarget)) for x in ralignments]
    sf.sort(key=lambda f: -f.qualifiers['odds'])

    if show_stats:
        display_results(pssm, sf, len(itarget))

    return sf
Esempio n. 2
0
def search(ppr, target, reverse=True, gaps=1, show_stats=False):
	itarget = get_iseq(target)
	bg = get_background(itarget)

	if isinstance(ppr, SeqRecord):
		pssm = binding_rules.build_PSSM(ppr, coding='yagi')#, background=bg)
	else:
		#assume we were passed a pssm
		pssm = ppr

	alignments = PSSM_gapped_search(pssm, itarget, gaps)
	ralignments = PSSM_gapped_search(pssm, ireverse_complement(itarget), gaps)

	sf  = [x.toSeqFeature(pssm) for x in alignments]
	sf += [x.toSeqFeature(pssm,reflect=len(itarget)) for x in ralignments]
	sf.sort(key=lambda f: -f.qualifiers['odds'])

	if show_stats:
		display_results(pssm, sf, len(itarget))

	return sf
Esempio n. 3
0
def build(sr, coding='barkan'):
    return binding_rules.build_PSSM(sr, coding)
Esempio n. 4
0
def build(sr, coding='barkan'):
	return binding_rules.build_PSSM(sr, coding)