def counts2bedgraph(infile, outfile, track, probe): '''Generate windowed bedgraph around each probe for each track''' track = P.snip(track, ".tsv") PipelineCaptureC.interactions2BedGraph(track, probe, PARAMS["database_name"], outfile)
def getProbeFragments(infiles, outfile): '''Fetch the fragments that contain the probes. Entries will be named for the probe''' probes, digest = infiles lookup = P.snip(outfile, "bed.gz") + "lookup.tsv" PipelineCaptureC.fetchProbeFragments(probes, digest, outfile, lookup)
def countInteractions(infiles, outfile): '''Count the number of interactions. Read pairs must map to only two fragments, one each for each primary alignment in the pair''' reads, digest, probes = infiles metrics = P.snip(outfile, ".tsv.gz") + ".metrics.tsv" PipelineCaptureC.countInteractions(reads, digest, probes, outfile, metrics, submit=True, job_memory="4G")
def digest2fragments(infile, outfile): genome = PARAMS["annotations_interface_contigs_tsv"] outfile = P.snip(outfile, ".gz") PipelineCaptureC.sites2fragments(infile, genome, outfile) statement = '''uniq %(outfile)s > bgzip %(outfile)s.gz;
def qunatifyAnomileies(infiles, outfile): ''' Quantify level of undigested and self ligated fragments''' bam, probes = infiles PipelineCaptureC.quantifyAnomolies(bam, probes, outfile)