Mercurial > repos > jeremie > pindel_test
comparison pindel.py @ 10:accf671c1f3d draft
Uploaded
author | jeremie |
---|---|
date | Mon, 07 Jul 2014 05:16:08 -0400 |
parents | 844ad5ce74cc |
children | 52d89fc2e7fe |
comparison
equal
deleted
inserted
replaced
9:844ad5ce74cc | 10:accf671c1f3d |
---|---|
74 if stderr != '': # une erreur interne au programme : stdout (sinon, souvent des warning arrete les programmes) | 74 if stderr != '': # une erreur interne au programme : stdout (sinon, souvent des warning arrete les programmes) |
75 sys.stdout.write("warning or error while doing : %s\n-----\n%s-----\n\n" %(cmd, stderr)) | 75 sys.stdout.write("warning or error while doing : %s\n-----\n%s-----\n\n" %(cmd, stderr)) |
76 | 76 |
77 | 77 |
78 def indexBam(inputFastaFile, inputBamFile): | 78 def indexBam(inputFastaFile, inputBamFile): |
79 cmd = "samtools indexBam %s" %(inputBamFile) | 79 cmd = "samtools index %s" %(inputBamFile) |
80 execute(cmd) | 80 execute(cmd) |
81 cmd = "samtools faidx %s" %(inputFastaFile) | 81 cmd = "samtools faidx %s" %(inputFastaFile) |
82 execute(cmd) | 82 execute(cmd) |
83 | 83 |
84 | 84 |
196 # sys.stdout.write('problem cmd') | 196 # sys.stdout.write('problem cmd') |
197 # pipeline(args.reference, args.bam, args.output_raw, args.outputVcfFile, size, name, args) | 197 # pipeline(args.reference, args.bam, args.output_raw, args.outputVcfFile, size, name, args) |
198 | 198 |
199 try: | 199 try: |
200 indexBam(args.inputFastaFile, args.inputBamFile) | 200 indexBam(args.inputFastaFile, args.inputBamFile) |
201 meanInsertSize = int(getMeanInsertSize(args.inputBamFile)) | 201 meanInsertSize = int(getMeanInsertSize(args.inputBamFile, tempDir)) |
202 configFile = config(args.inputBamFile, meanInsertSize, args.name, tempDir) | 202 configFile = config(args.inputBamFile, meanInsertSize, args.name, tempDir) |
203 pindelTempDir = pindel(args.inputFastaFile, configFile, args, tempDir) | 203 pindelTempDir = pindel(args.inputFastaFile, configFile, args, tempDir) |
204 pindel2vcf(args.outputVcfFile, args.inputFastaFile, args.name, pindelTempDir) | 204 pindel2vcf(args.outputVcfFile, args.inputFastaFile, args.name, pindelTempDir) |
205 | 205 |
206 finally: | 206 finally: |