当前位置: 首页>>代码示例>>Python>>正文


Python CGATPipelines.PipelineIDR类代码示例

本文整理汇总了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)
开发者ID:jmadzo,项目名称:cgat,代码行数:9,代码来源:pipeline_idr.py

示例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)
开发者ID:jmadzo,项目名称:cgat,代码行数:9,代码来源:pipeline_idr.py

示例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)
开发者ID:jmadzo,项目名称:cgat,代码行数:10,代码来源:pipeline_idr.py

示例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)
开发者ID:jmadzo,项目名称:cgat,代码行数:12,代码来源:pipeline_idr.py

示例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)
开发者ID:lesheng,项目名称:cgat,代码行数:13,代码来源:pipeline_idr.py

示例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)
开发者ID:jmadzo,项目名称:cgat,代码行数:14,代码来源:pipeline_idr.py

示例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()
开发者ID:jmadzo,项目名称:cgat,代码行数:25,代码来源:pipeline_idr.py

示例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)
开发者ID:gjaime,项目名称:CGATPipelines,代码行数:17,代码来源:pipeline_idr.py

示例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()
开发者ID:CGATOxford,项目名称:CGATPipelines,代码行数:20,代码来源:pipeline_idr.py

示例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()
开发者ID:jmadzo,项目名称:cgat,代码行数:22,代码来源:pipeline_idr.py

示例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()
开发者ID:jmadzo,项目名称:cgat,代码行数:4,代码来源:pipeline_idr.py

示例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()
开发者ID:jmadzo,项目名称:cgat,代码行数:5,代码来源:pipeline_idr.py

示例13: plotBatchConsistencyForPooledPseudoreplicates

def plotBatchConsistencyForPooledPseudoreplicates(infiles, outfile):
    statement = IDR.getIDRPlotStatement(infiles[0], outfile)
    P.run()
开发者ID:CGATOxford,项目名称:CGATPipelines,代码行数:3,代码来源:pipeline_idr.py

示例14: plotBatchConsistencyForIndividualReplicates

def plotBatchConsistencyForIndividualReplicates(infiles, outfile):

    # HACK!
    statement = IDR.getIDRPlotStatement(infiles, outfile)
    P.run()
开发者ID:CGATOxford,项目名称:CGATPipelines,代码行数:5,代码来源:pipeline_idr.py


注:本文中的CGATPipelines.PipelineIDR类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。