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


Python PipelineMappingQC.buildPicardAlignmentStats方法代码示例

本文整理汇总了Python中CGATPipelines.PipelineMappingQC.buildPicardAlignmentStats方法的典型用法代码示例。如果您正苦于以下问题:Python PipelineMappingQC.buildPicardAlignmentStats方法的具体用法?Python PipelineMappingQC.buildPicardAlignmentStats怎么用?Python PipelineMappingQC.buildPicardAlignmentStats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CGATPipelines.PipelineMappingQC的用法示例。


在下文中一共展示了PipelineMappingQC.buildPicardAlignmentStats方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: buildPicardStats

# 需要导入模块: from CGATPipelines import PipelineMappingQC [as 别名]
# 或者: from CGATPipelines.PipelineMappingQC import buildPicardAlignmentStats [as 别名]
def buildPicardStats(infile, outfile):
    '''build alignment stats using picard.
    Note that picards counts reads but they are in fact alignments.
    '''
    if PARAMS["pool_reads"]:
        reffile = os.path.join(
            os.path.dirname(infile), "agg-agg-agg.filtered.contigs.fa")
    else:
        reffile = P.snip(infile, ".bam") + ".fa"
    PipelineMappingQC.buildPicardAlignmentStats(infile,
                                                outfile,
                                                reffile)
开发者ID:Charlie-George,项目名称:cgat,代码行数:14,代码来源:pipeline_metagenomeassembly.py

示例2: runPicardOnRealigned

# 需要导入模块: from CGATPipelines import PipelineMappingQC [as 别名]
# 或者: from CGATPipelines.PipelineMappingQC import buildPicardAlignmentStats [as 别名]
def runPicardOnRealigned(infile, outfile):
    to_cluster = USECLUSTER
    job_options = getGATKOptions()
    # TS no multithreading so why 6 threads?
    # job_threads = 6
    tmpdir_gatk = P.getTempDir('/ifs/scratch')
    # threads = PARAMS["gatk_threads"]

    outfile_tumor = outfile.replace("Control", PARAMS["mutect_tumour"])
    infile_tumor = infile.replace("Control", PARAMS["mutect_tumour"])

    track = P.snip(os.path.basename(infile), ".bam")
    track_tumor = track.replace("Control", PARAMS["mutect_tumour"])

    genome = "%s/%s.fa" % (PARAMS["bwa_index_dir"],
                           PARAMS["genome"])

    PipelineMappingQC.buildPicardAlignmentStats(infile, outfile, genome)
    PipelineMappingQC.buildPicardAlignmentStats(infile_tumor,
                                                outfile_tumor, genome)

    # check above functions then remove statement
    statement = '''
    cat %(infile)s
    | python %%(scriptsdir)s/bam2bam.py -v 0 --method=set-sequence
    | CollectMultipleMetrics
    INPUT=/dev/stdin
    REFERENCE_SEQUENCE=%%(bwa_index_dir)s/%%(genome)s.fa
    ASSUME_SORTED=true
    OUTPUT=%(outfile)s
    VALIDATION_STRINGENCY=SILENT
    >& %(outfile)s;
    cat %(infile_tumor)s
    | python %%(scriptsdir)s/bam2bam.py -v 0
    --method=set-sequence --output-sam
    | CollectMultipleMetrics
    INPUT=/dev/stdin
    REFERENCE_SEQUENCE=%%(bwa_index_dir)s/%%(genome)s.fa
    ASSUME_SORTED=true
    OUTPUT=%(outfile_tumor)s
    VALIDATION_STRINGENCY=SILENT
    >& %(outfile_tumor)s;''' % locals()
开发者ID:hainm,项目名称:CGATPipelines,代码行数:44,代码来源:pipeline_exome_cancer.py

示例3: runPicardOnRealigned

# 需要导入模块: from CGATPipelines import PipelineMappingQC [as 别名]
# 或者: from CGATPipelines.PipelineMappingQC import buildPicardAlignmentStats [as 别名]
def runPicardOnRealigned(infile, outfile):
    to_cluster = USECLUSTER
    job_memory = PARAMS["gatk_memory"]

    tmpdir_gatk = P.getTempDir()

    outfile_tumor = outfile.replace(
        PARAMS["sample_control"], PARAMS["sample_tumour"])
    infile_tumor = infile.replace(
        PARAMS["sample_control"], PARAMS["sample_tumour"])

    track = P.snip(os.path.basename(infile), ".bam")
    track_tumor = track.replace(
        PARAMS["sample_control"], PARAMS["sample_tumour"])

    genome = "%s/%s.fa" % (PARAMS["bwa_index_dir"],
                           PARAMS["genome"])

    PipelineMappingQC.buildPicardAlignmentStats(infile, outfile, genome)
    PipelineMappingQC.buildPicardAlignmentStats(infile_tumor,
                                                outfile_tumor, genome)
开发者ID:gjaime,项目名称:CGATPipelines,代码行数:23,代码来源:pipeline_exome_cancer.py

示例4: buildPicardAlignmentStats

# 需要导入模块: from CGATPipelines import PipelineMappingQC [as 别名]
# 或者: from CGATPipelines.PipelineMappingQC import buildPicardAlignmentStats [as 别名]
def buildPicardAlignmentStats(infile, outfile):
    '''Gather BAM file alignment statistics using Picard '''

    PipelineMappingQC.buildPicardAlignmentStats(infile, outfile,
                                                os.path.join(PARAMS["bwa_index_dir"],
                                                             PARAMS["genome"] + ".fa"))
开发者ID:lesheng,项目名称:cgat,代码行数:8,代码来源:pipeline_medip.py


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