# verify inputs, print to screen and log (infile_pass, infile_msg) = ic.CheckInfile(args.infile) (config_pass, config_msg) = ic.CheckConfig(args.configfile) verify_msg = infile_msg + '\n' + config_msg pipelineHelpers.LogInputCheck(verify_msg) if not (infile_pass and config_pass): raise Exception('Invalid input.') pipeline_msg = '\n---------------------------------\n' \ 'Running pipeline\n' \ '---------------------------------' print pipeline_msg log = pipelineHelpers.GetLogFile('MAIN') pipelineHelpers.Logging('INFO', log, pipeline_msg) num_procs = line_count * 4 if( args.phase): if(not args.splitbams): pipeline_run([pipeline.find_roi_bam], multiprocess=num_procs, verbose=1) if(args.cnvDelFile): pipeline_run([pipeline.complete_pipeline]) else: pipeline_run([pipeline.complete_pipeline_gain]) else: params.SetSplitBamsPath(args.splitbams)
import os import random from helpers import pipelineHelpers from ruffus import * import logging, sys from re import sub import taskHelpers from itertools import izip import itertools import re import subprocess global bases bases = ('A','T','C','G') log = pipelineHelpers.GetLogFile('Bamgineer') import utils import vcf import gzip import shutil chr_list = range(1,23) event_list=['gain','loss'] sentinel_path, results_path,haplotype_path,cancer_dir_path,tmpbams_path,finalbams_path = taskHelpers.GetProjectNamePathRunID() def initPool(queue, level, terminating_): """ This causes the logging module to be initialized with the necessary info in pool threads to work correctly. """
import os import sys from re import sub from ruffus import * from helpers import depthOfCoverageTasks, depthOfCoverageHelpers, pipelineHelpers from helpers import runIDHelpers as rid from helpers import parameters as params import subprocess current_path = params.GetProgramPath() log = pipelineHelpers.GetLogFile('DepthOfCoverage') def runCommand(cmd): try: process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) stdout, stderr = process.communicate() except OSError as e: print("Execution failed:", e)