def main():
	args = usage()
	
	conf = config(args.reference)
	soft = conf['software']
	ref = conf['reference'][args.reference]
	# pprint.pprint(conf)
	
	#Test for qualityQcontol
	multiprocessing.Process(target=qualityQcontol.run, args=(args.pe1,args.pe2,args.indir,args.out,soft['IllQC'],args.nthreads)).start()
	
	#Test mapping
	sam,mappingOut=mappingAndDedup.mapping(args.pe1,args.pe2,args.indir,args.out,ref['genomeBuild'],soft=soft['bwa'],t=args.nthreads)
	dedup = mappingAndDedup.dedup(sam, mappingOut, sortsam = soft['sortsam'], mark = soft['mark'])
	
	#Test recalibrate
	recal = recalibrate.realignAndrecal(dedup,mappingOut,mappingOut,index=ref['genomeBuild'],soft = soft['gatk'],t = args.nthreads,mill = ref['mill'], kg = ref['kg'],dbsnp=ref['dbsnp'])
	
	#Test Call SV
	cmd="bash %s/bin/callSV.sh -b %s -i %s -o %s -r %s &" %(root,recal,mappingOut,args.out,args.reference)
	os.system(cmd)
	
	#Test call CNV
	cmd = "bash %s/bin/callCNV.sh -b %s -i %s -o %s -r %s &" %(root,recal,mappingOut,args.out,args.reference)
	os.system(cmd)
	
	#Test variant calling
	vcf,variantout = callVariants.gatkCall(recal,mappingOut,args.out,index=ref['genomeBuild'],soft = soft['gatk'],t = args.nthreads,mill = ref['mill'], kg = ref['kg'],dbsnp=ref['dbsnp'],omni=ref['omni'],hapmap=ref['hapmap'])
	
	#Test annotation
	annotateWithAnnovar.annotate(vcf,variantout,args.out,hd=ref['humandb'],con=soft['convert2annovar'],tb=soft['table_annovar'])
def main():
	args = usage()
	
	conf = config(args.reference)
	soft = conf['software']
	ref = conf['reference'][args.reference]
	script = conf['script']
	# pprint.pprint(conf)
	
	#Test for qualityQcontol
	multiprocessing.Process(target=qualityQcontol.run, args=(args.pe1,args.pe2,args.indir,args.out,soft['IllQC'],args.nthreads)).start()
	
	#Test mapping
	sam,mappingOut=mappingAndDedup.mapping(args.pe1,args.pe2,args.indir,args.out,ref['genomeBuild'],soft=soft['bwa'],t=args.nthreads)
	dedup = mappingAndDedup.dedup(sam, mappingOut, sortsam = soft['sortsam'], mark = soft['mark'])
	
	#Test mappingRate
	bam = sam + '.bam'
	#mappingRate.mappingRate(bam,mappingOut,args.out,index = ref['genomeBuild'],cap = ref[args.capture],soft = soft['ngscat'],t=args.nthreads)
	#In multiprocessing method
	multiprocessing.Process(target=mappingRate.mappingRate,args=(bam,mappingOut,args.out,ref['genomeBuild'],ref[args.capture],soft['ngscat'],args.nthreads)).start()
	
	#Test recalibrate
	recal = recalibrate.realignAndrecal(dedup,mappingOut,mappingOut,index=ref['genomeBuild'],soft = soft['gatk'],t = args.nthreads,mill = ref['mill'], kg = ref['kg'],dbsnp=ref['dbsnp'])
		
	#Test variant calling
	vcf,variantout = callVariants.gatkCall(recal,mappingOut,args.out,index=ref['genomeBuild'],soft = soft['gatk'],t = args.nthreads,mill = ref['mill'], kg = ref['kg'],dbsnp=ref['dbsnp'],omni=ref['omni'],hapmap=ref['hapmap'])
	
	#Test annotation
	annotateWithAnnovar.annotate(vcf,variantout,args.out,hd=ref['humandb'],con=soft['convert2annovar'],tb=soft['table_annovar'])
Example #3
0
def main():
    args = usage()

    conf = config(args.reference)
    soft = conf['software']
    ref = conf['reference'][args.reference]
    # pprint.pprint(conf)

    #Test for qualityQcontol
    multiprocessing.Process(target=qualityQcontol.run,
                            args=(args.pe1, args.pe2, args.indir, args.out,
                                  soft['IllQC'], args.nthreads)).start()

    #Test mapping
    sam, mappingOut = mappingAndDedup.mapping(args.pe1,
                                              args.pe2,
                                              args.indir,
                                              args.out,
                                              ref['genomeBuild'],
                                              soft=soft['bwa'],
                                              t=args.nthreads)
    dedup = mappingAndDedup.dedup(sam,
                                  mappingOut,
                                  sortsam=soft['sortsam'],
                                  mark=soft['mark'])

    #Test recalibrate
    recal = recalibrate.realignAndrecal(dedup,
                                        mappingOut,
                                        mappingOut,
                                        index=ref['genomeBuild'],
                                        soft=soft['gatk'],
                                        t=args.nthreads,
                                        mill=ref['mill'],
                                        kg=ref['kg'],
                                        dbsnp=ref['dbsnp'])

    #Test Call SV
    cmd = "bash %s/bin/callSV.sh -b %s -i %s -o %s -r %s &" % (
        root, recal, mappingOut, args.out, args.reference)
    os.system(cmd)

    #Test call CNV
    cmd = "bash %s/bin/callCNV.sh -b %s -i %s -o %s -r %s &" % (
        root, recal, mappingOut, args.out, args.reference)
    os.system(cmd)

    #Test variant calling
    vcf, variantout = callVariants.gatkCall(recal,
                                            mappingOut,
                                            args.out,
                                            index=ref['genomeBuild'],
                                            soft=soft['gatk'],
                                            t=args.nthreads,
                                            mill=ref['mill'],
                                            kg=ref['kg'],
                                            dbsnp=ref['dbsnp'],
                                            omni=ref['omni'],
                                            hapmap=ref['hapmap'])

    #Test annotation
    annotateWithAnnovar.annotate(vcf,
                                 variantout,
                                 args.out,
                                 hd=ref['humandb'],
                                 con=soft['convert2annovar'],
                                 tb=soft['table_annovar'])