# # pipeline2: after running pipeline1, maps the ".1pct.xls" files matching each experiment type # - computes overlapping peaks # - finds gene counts # ####################################### ###### the types of files used ######## ####################################### type annotfile; # annotation file type listfile; # simple list, or at least constant-column numberings type file; # generic file ####################################### ##### list of apps and processes ###### ####################################### app (annotfile output) comppeaks( listfile list[], int max_dist ){ comppeaks @filename(list) max_dist @output; } app (listfile output) genecount( annotfile input, int gene_type, int divide ){ genecount @input gene_type divide @output; } (annotfile output) compare_peaks ( string expt_type ) { listfile list[]; output = comppeaks( list, 200 ); } ####################################### ############ pipeline ################# ####################################### # define all arrays to use; in all, should generate 3*(number of quest maps)+(number of expt maps) file expts[]; # input: list of unique experiment prefixes annotfile overlaps[]; # output/input: file names for overlaps listfile genes[]; # output: gene counts for overlaps # compute overlaps and gene counts for each experiment type foreach f, i in expts { overlaps[i] = compare_peaks( @filename(f) ); } foreach g, j in overlaps { genes[j] = genecount( g, 0, 1 ); }