def bamDiff(bamfn1, bamfn2, path): bamutil_path = params.GetConfigReader().get('SOFTWARE', 'bamutil_path') command = " ".join([ bamutil_path, "diff", "--in1", bamfn1, "--in2", bamfn2, "--out", "/".join([path, "diff.bam"]) ]) runCommand(command)
def GetProjectNamePathRunID(): results_path = params.GetConfigReader().get('RESULTS', 'results_path') cancer_type = params.GetCancerType() cancer_dir_path = "/".join([results_path, cancer_type]) haplotype_path = "/".join([cancer_dir_path, "haplotypedir"]) tmpbams_path = "/".join([cancer_dir_path, "tmpbams"]) finalbams_path = "/".join([cancer_dir_path, "finalbams"]) sentinel_path = CheckPath(cancer_dir_path + '/' + params.GetProjectName() + "_" + rid.GetRunID() + '/sentinels/') return sentinel_path, results_path, haplotype_path, cancer_dir_path, tmpbams_path, finalbams_path
def main(args): outbamfn = args.outBamFile configReader = params.GetConfigReader() params.InitConfigReader(args.configfile) params.SetCancerType(args.cancerType) params.SetOutputFileName(args.outBamFile) params.SetSplitBamsPath(args.splitbams) params.SetPhase(args.phase) params.SetctDNA(args.ctDNA) params.SetXY(args.singleXY) params.SetCNV(args.cnvBed) results_path = configReader.get('RESULTS', 'results_path') cnvdir = "/".join([results_path, "cnv_dir"]) if (not os.path.exists(cnvdir)): os.makedirs(cnvdir) createEventBedFiles(cnvdir, params.GetCNV()) params.SetCNVDir(cnvdir) # set software paths java_path = bamhelp.GetJavaPath() beagle_path = bamhelp.GetBeaglePath() samtools_path = bamhelp.GetSamtoolsPath() bedtools_path = bamhelp.GetBedtoolsPath() vcftools_path = bamhelp.GetVCFtoolsPath() sambamba_path = bamhelp.GetSambambaPath() params.SetSoftwarePath(java_path, beagle_path, samtools_path, bedtools_path, vcftools_path, sambamba_path) if (args.phase): run_pipeline(results_path) else: print('Please provide costume phasing algorithm')
def main(args): outbamfn = args.outBamFile configReader = params.GetConfigReader() params.InitConfigReader(args.configfile) params.SetGainCNV(args.cnvAmpFile) params.SetLossCNV(args.cnvDelFile) params.SetCancerType(args.cancerType) params.SetOutputFileName(args.outBamFile) params.SetSplitBamsPath(args.splitbams) results_path = configReader.get('RESULTS', 'results_path') #set software paths java_path = bamhelp.GetJavaPath() beagle_path = bamhelp.GetBeaglePath() samtools_path = bamhelp.GetSamtoolsPath() bedtools_path = bamhelp.GetBedtoolsPath() vcftools_path = bamhelp.GetVCFtoolsPath() sambamba_path = bamhelp.GetSambambaPath() params.SetSoftwarePath(java_path, beagle_path, samtools_path, bedtools_path, vcftools_path, sambamba_path) if (args.phase): run_pipeline(results_path)
parser.add_argument( '--project-name', action='store', required=True, dest='project_name', help='name of the project') parser.add_argument( '-r', '--run_id', action='store', type=int, dest='custom_run_id', help='manually enter run_id (used to re-launch a run)', default=False) args = parser.parse_args() t0 = time.time() args = parser.parse_args() current_path = os.path.dirname(os.path.realpath(__file__)) outbamfn = args.outBamFile configReader = params.GetConfigReader() params.InitConfigReader(args.configfile) params.SetProjectName(args.project_name) params.SetProgramPath(current_path) params.SetInfile(args.infile) params.SetGainCNV(args.cnvAmpFile) params.SetLossCNV(args.cnvDelFile) params.SetCancerType(args.cancerType) params.SetOutputFileName(args.outBamFile) # set the run id used for this run if args.custom_run_id == False: # increment and set runID