本文整理汇总了Python中CGATPipelines.PipelineIDR类的典型用法代码示例。如果您正苦于以下问题:Python PipelineIDR类的具体用法?Python PipelineIDR怎么用?Python PipelineIDR使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PipelineIDR类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: reMergeBamfiles
def reMergeBamfiles(infiles, sentinal):
infiles = [P.snip(x, ".sentinal") + ".bam" for x in infiles]
outfile = P.snip(sentinal, ".sentinal") + ".bam"
bad_samples = PARAMS["options_to_remove"].split(",")
to_merge = IDR.filterBadLibraries(infiles, bad_samples)
IDR.mergeBams(to_merge, outfile)
P.touch(sentinal)
示例2: summarizePeaksForPooledPseudoreplicates
def summarizePeaksForPooledPseudoreplicates(infiles, outfile):
outf = IOTools.openFile(outfile, "w")
outf.write("Sample_id\t"
"Experiment\t"
"Tissue\t"
"Condition\t"
"Pseudoreplicate\t"
"n_peaks\n")
IDR.countPeaks(infiles, outf)
示例3: poolSampleBamfiles
def poolSampleBamfiles(infiles, sentinal):
"""
Merge filtered sample files for each tissue
"""
infiles = [P.snip(x, ".sentinal") + ".bam" for x in infiles]
outfile = P.snip(sentinal, ".sentinal") + ".bam"
IDR.mergeBams(infiles, outfile)
P.touch(sentinal)
示例4: callPeaksOnPseudoreplicates
def callPeaksOnPseudoreplicates(infile, outfile):
# fetch peak calling parameters
PARAMS_PEAKCALLER = get_peak_caller_parameters(
PARAMS["options_peak_caller"])
# call peaks on pseudoreplicates
IDR.callIDRPeaks(infile,
outfile,
PARAMS["options_peak_caller"],
PARAMS["options_control_type"],
PARAMS_PEAKCALLER,
pseudoreplicate=True)
示例5: poolInputBamfiles
def poolInputBamfiles(infiles, sentinal):
"""
Merge filtered input files for each tissue, with the option of excluding
undesirable libraries.
"""
infiles = [P.snip(x, ".sentinal") + ".bam" for x in infiles]
outfile = P.snip(sentinal, ".sentinal") + ".bam"
bad_samples = PARAMS["filter_remove_inputs"].split(",")
to_merge = IDR.filterBadLibraries(infiles, bad_samples)
IDR.mergeBams(to_merge, outfile)
P.touch(sentinal)
示例6: callPeaksOnIndividualReplicates
def callPeaksOnIndividualReplicates(infile, outfile):
infile = P.snip(infile, ".sentinal") + ".bam"
# fetch peak calling parameters
PARAMS_PEAKCALLER = get_peak_caller_parameters(
PARAMS["options_peak_caller"])
# call peaks
IDR.callIDRPeaks(infile,
outfile,
PARAMS["options_peak_caller"],
PARAMS["options_control_type"],
PARAMS_PEAKCALLER)
P.touch(outfile)
示例7: runIDROnIndividualReplicates
def runIDROnIndividualReplicates(infiles, outfile):
"""
Run IDR consecutively for each pairwise combination of a particular
EXPERIMENT
"""
# set IDR parameters (HACK!) WrapperIDR is in /ifs/devel/CGAT
chr_table = os.path.join(PARAMS["annotations_dir"],
PARAMS_ANNOTATIONS["interface_contigs"])
idr_script = os.path.join(os.path.dirname(P.__file__), "WrapperIDR.py")
# iterate through pairwise combinations of infiles
for infile1, infile2 in itertools.combinations(infiles, 2):
# get statement
statement = IDR.getIDRStatement(infile1,
infile2,
outfile,
PARAMS["idr_options_overlap_ratio"],
PARAMS["idr_options_ranking_measure"],
chr_table,
idr_script)
# run
E.info("applyIDR: processing %s and %s" % (infile1, infile2))
job_options = "-l mem_free=5G"
P.run()
示例8: poolInputBamfiles
def poolInputBamfiles(infiles, sentinel):
"""
Merge filtered input files for each tissue, with the option of excluding
undesirable libraries.
"""
infiles = [P.snip(x, ".sentinel") + ".bam" for x in infiles]
outfile = P.snip(sentinel, ".sentinel") + ".bam"
bad_samples = PARAMS["filter_remove_inputs"].split(",")
if len(infiles) > 1:
to_merge = IDR.filterBadLibraries(infiles, bad_samples)
IDR.mergeBams(to_merge, outfile)
else:
os.symlink(os.path.abspath(infiles[0]), outfile)
os.symlink(os.path.abspath(infiles[0]) + ".bai", outfile + ".bai")
P.touch(sentinel)
示例9: runIDROnPooledPseudoreplicates
def runIDROnPooledPseudoreplicates(infiles, outfile):
"""
Run IDR analysis on pooled pseudoreplicates for each EXPERIMENT
"""
# set IDR parameters
chr_table = os.path.join(PARAMS["annotations_dir"],
PARAMS["annotations_interface_contigs"])
# get statement
statement = IDR.getIDRStatement(infiles[0],
infiles[1],
outfile,
PARAMS["idr_options_overlap_ratio"],
PARAMS["idr_options_ranking_measure"],
chr_table)
# run
E.info("applyIDR: processing %s and %s" % (infiles[0], infiles[1]))
job_memory = "5G"
P.run()
示例10: runIDROnPooledPseudoreplicates
def runIDROnPooledPseudoreplicates(infiles, outfile):
"""
Run IDR analysis on pooled pseudoreplicates for each EXPERIMENT
"""
# set IDR parameters
chr_table = os.path.join(PARAMS["annotations_dir"],
PARAMS_ANNOTATIONS["interface_contigs"])
idr_script = os.path.join(os.path.dirname(P.__file__), "WrapperIDR.py")
# get statement
statement = IDR.getIDRStatement(infiles[0],
infiles[1],
outfile,
PARAMS["idr_options_overlap_ratio"],
PARAMS["idr_options_ranking_measure"],
chr_table,
idr_script)
# run
E.info("applyIDR: processing %s and %s" % (infiles[0], infiles[1]))
job_options = "-l mem_free=5G"
P.run()
示例11: plotBatchConsistencyForPooledPseudoreplicates
def plotBatchConsistencyForPooledPseudoreplicates(infiles, outfile):
idr_script = os.path.join(os.path.dirname(P.__file__), "WrapperIDR.py")
statement = IDR.getIDRPlotStatement(infiles[0], outfile, idr_script)
P.run()
示例12: plotBatchConsistencyForIndividualReplicates
def plotBatchConsistencyForIndividualReplicates(infiles, outfile):
# HACK!
idr_script = os.path.join(os.path.dirname(P.__file__), "WrapperIDR.py")
statement = IDR.getIDRPlotStatement(infiles, outfile, idr_script)
P.run()
示例13: plotBatchConsistencyForPooledPseudoreplicates
def plotBatchConsistencyForPooledPseudoreplicates(infiles, outfile):
statement = IDR.getIDRPlotStatement(infiles[0], outfile)
P.run()
示例14: plotBatchConsistencyForIndividualReplicates
def plotBatchConsistencyForIndividualReplicates(infiles, outfile):
# HACK!
statement = IDR.getIDRPlotStatement(infiles, outfile)
P.run()