Functions |
def | meme |
def | parse_meme_xml |
def | parallel_meme |
def | motif_scan |
def | save_motif_profile |
def | FDR_threshold |
def | sqlite_to_false_discovery_rate |
Variables |
tuple | track_result |
list | fields = ['chr'] |
tuple | future = motif_scan.nonblocking( ex, fasta, motif, background, -100, stdout=output, via=via ) |
dictionary | shuf_futures = {} |
tuple | out = unique_filename_in() |
tuple | _ = future.wait() |
dictionary | TP_scores = {} |
int | ntp = 0 |
tuple | row = line.split("\t") |
tuple | score = int(round(float(row[2]))) |
tuple | scores = sorted(TP_scores.keys(),reverse=True) |
tuple | FP_scores = dict((k,0) for k in scores) |
int | nfp = 0 |
tuple | fscore = int(round(float(row[2]))) |
tuple | tscore = max([k for k in scores if k<=fscore]) |
float | cur_fdr = 1.0 |
list | threshold = scores[0] |
Detailed Description
=====================
Module: bbcflib.motif
=====================
No documentation
Function Documentation
def bbcflib::motif::FDR_threshold |
( |
|
ex, |
|
|
|
motif, |
|
|
|
background, |
|
|
|
assembly, |
|
|
|
regions, |
|
|
|
alpha = .1 , |
|
|
|
nb_samples = 1 , |
|
|
|
via = 'lsf' | |
|
) |
| | |
Computes a score threshold for 'motif' on 'regions' based on a false discovery rate < alpha and returns the
threshold or a dictionary with keys thresholds and values simulated FDRs when alpha < 0.
def bbcflib::motif::meme |
( |
|
fasta, |
|
|
|
outdir, |
|
|
|
maxsize = 10000000 , |
|
|
|
args = None | |
|
) |
| | |
Binding for the ``meme`` motif finder.
def bbcflib::motif::motif_scan |
( |
|
fasta, |
|
|
|
motif, |
|
|
|
background, |
|
|
|
threshold = 0 | |
|
) |
| | |
Binding for the ``S1K`` motif scanner.
def bbcflib::motif::parallel_meme |
( |
|
ex, |
|
|
|
assembly, |
|
|
|
regions, |
|
|
|
name = None , |
|
|
|
meme_args = None , |
|
|
|
via = 'lsf' | |
|
) |
| | |
Fetches sequences, then calls ``meme`` on them and finally saves the results in the repository.
def bbcflib::motif::parse_meme_xml |
( |
|
ex, |
|
|
|
meme_file, |
|
|
|
chrmeta | |
|
) |
| | |
Parse meme xml file and convert to track
def bbcflib::motif::save_motif_profile |
( |
|
ex, |
|
|
|
motifs, |
|
|
|
background, |
|
|
|
assembly, |
|
|
|
regions, |
|
|
|
keep_max_only = False , |
|
|
|
threshold = 0 , |
|
|
|
description = 'motif_scan.sql' , |
|
|
|
via = 'lsf' | |
|
) |
| | |
Scan a set of motifs on a set of regions and saves the results as an sql file.
The 'motifs' argument is a single PWM file or a dictionary with keys motif names and values PWM files
with 'n' rows like:
"1 p(A) p(C) p(G) p(T)"
where the sum of the 'p's is 1 and the first column allows to skip a position with a '0'.
def bbcflib::motif::sqlite_to_false_discovery_rate |
( |
|
ex, |
|
|
|
motif, |
|
|
|
background, |
|
|
|
assembly, |
|
|
|
regions, |
|
|
|
alpha = 0.05 , |
|
|
|
nb_samples = 1 , |
|
|
|
description = '' , |
|
|
|
via = 'lsf' | |
|
) |
| | |
Computes a score threshold for 'motif' on 'regions' based on a false discovery rate < alpha and returns the
thresholded profile.
Variable Documentation
tuple bbcflib::motif::track_result |
Initial value:00001 track.track( sqlout, chrmeta=assembly.chrmeta,
00002 info={'datatype':'qualitative'},
00003 fields=['start','end','name','score','strand'] )