Mercurial > repos > jeremie > breakdancer_bin
comparison breakdancer.py @ 19:b83483e9b1e8 draft
Uploaded
author | jeremie |
---|---|
date | Mon, 07 Jul 2014 04:04:13 -0400 |
parents | 0e73928aa0ca |
children | 96e938d6904e |
comparison
equal
deleted
inserted
replaced
18:0e73928aa0ca | 19:b83483e9b1e8 |
---|---|
24 # parser.add_argument('-h', dest='AFColumn', action='store_true', help='print out Allele Frequency column', default=False) | 24 # parser.add_argument('-h', dest='AFColumn', action='store_true', help='print out Allele Frequency column', default=False) |
25 parser.add_argument('-y', dest='scoreFilter', type=int, required=False, help='output score filter', default=30) | 25 parser.add_argument('-y', dest='scoreFilter', type=int, required=False, help='output score filter', default=30) |
26 | 26 |
27 | 27 |
28 | 28 |
29 binPath = os.environ['BREAKDANCER_BIN'] | 29 # binPath = os.environ['BREAKDANCER_BIN'] |
30 | 30 |
31 bam2cfgPath = binPath+"/bam2cfg.pl" | 31 # bam2cfgPath = binPath+"/bam2cfg.pl" |
32 breakdancer2vcfPath = binPath+"/breakdancer2vcf.py" | 32 # breakdancer2vcfPath = binPath+"/breakdancer2vcf.py" |
33 | 33 |
34 | 34 |
35 # def bam2cfg(args, tempDir): | 35 # def bam2cfg(args, tempDir): |
36 # config = tempDir+"/breakdancer_config" | 36 # config = tempDir+"/breakdancer_config" |
37 # cmd = 'perl %s %s' % (bam2cfgPath, args.inputBamFile) | 37 # cmd = 'perl %s %s' % (bam2cfgPath, args.inputBamFile) |
145 # breakdancer(args, config) | 145 # breakdancer(args, config) |
146 # breakdancer2vcf(args) | 146 # breakdancer2vcf(args) |
147 | 147 |
148 # bam2cfg | 148 # bam2cfg |
149 config = tempDir+"/breakdancer_config" | 149 config = tempDir+"/breakdancer_config" |
150 cmd = 'perl %s %s' % (bam2cfgPath, args.inputBamFile) | 150 cmd = 'bam2cfg.pl %s' % (args.inputBamFile) |
151 execute(cmd, output=config) | 151 execute(cmd, output=config) |
152 | 152 |
153 # breakdancer | 153 # breakdancer |
154 cmd = 'breakdancer-max %s' % (config) | 154 cmd = 'breakdancer-max %s' % (config) |
155 cmd += ' -s %d -c %d -m %d -q %d -r %d -x %d -b %d -y %d' % (args.minLength, args.cutoff, args.maxSvSize, args.minMapQuality, args.minReadDepth, args.maxHaploidCov, args.bufferSize, args.scoreFilter) | 155 cmd += ' -s %d -c %d -m %d -q %d -r %d -x %d -b %d -y %d' % (args.minLength, args.cutoff, args.maxSvSize, args.minMapQuality, args.minReadDepth, args.maxHaploidCov, args.bufferSize, args.scoreFilter) |
169 # cmd += ' -h ' | 169 # cmd += ' -h ' |
170 execute(cmd, output=args.outputRawFile) | 170 execute(cmd, output=args.outputRawFile) |
171 | 171 |
172 # breakdancer2vcf | 172 # breakdancer2vcf |
173 if args.outputVcfFile: | 173 if args.outputVcfFile: |
174 cmd = "python %s -i %s -o %s" % (breakdancer2vcfPath, args.outputRawFile, args.outputVcfFile) | 174 cmd = "breakdancer2vcf.py -i %s -o %s" % (args.outputRawFile, args.outputVcfFile) |
175 execute(cmd) | 175 execute(cmd) |
176 | 176 |
177 # quelques tests | 177 # quelques tests |
178 # verifier que les fichiers de sorties ne sont pas vides | 178 # verifier que les fichiers de sorties ne sont pas vides |
179 check(args.outputRawFile) | 179 check(args.outputRawFile) |