Mercurial > repos > jeremie > breakdancer_bin
comparison breakdancer.py @ 13:62bf6aed1908 draft
Uploaded
author | jeremie |
---|---|
date | Wed, 02 Jul 2014 10:15:33 -0400 |
parents | c971e3f6de9f |
children | 2c3b8a1d8f4b |
comparison
equal
deleted
inserted
replaced
12:c220f4acef3f | 13:62bf6aed1908 |
---|---|
18 parser.add_argument('-b', dest='bufferSize', type=int, required=False, help='buffer size for building connection', default=100) | 18 parser.add_argument('-b', dest='bufferSize', type=int, required=False, help='buffer size for building connection', default=100) |
19 parser.add_argument('-t', dest='onlyTrans', action='store_true', help='only detect transchromosomal rearrangement', default=False) | 19 parser.add_argument('-t', dest='onlyTrans', action='store_true', help='only detect transchromosomal rearrangement', default=False) |
20 parser.add_argument('-d', dest='prefix', required=False, help='prefix of fastq files that SV supporting reads will be saved by library') | 20 parser.add_argument('-d', dest='prefix', required=False, help='prefix of fastq files that SV supporting reads will be saved by library') |
21 parser.add_argument('-g', dest='bedFormat', required=False, help='dump SVs and supporting reads in BED format for GBrowse') | 21 parser.add_argument('-g', dest='bedFormat', required=False, help='dump SVs and supporting reads in BED format for GBrowse') |
22 parser.add_argument('-l', dest='matePair', required=False, help='analyze Illumina long insert (mate-pair) library') | 22 parser.add_argument('-l', dest='matePair', required=False, help='analyze Illumina long insert (mate-pair) library') |
23 # parser.add_argument('-a', dest='sortByLibrary', action='store_true', help='print out copy number and support reads per library rather than per bam', default=False) | 23 parser.add_argument('-a', dest='sortByLibrary', action='store_true', help='print out copy number and support reads per library rather than per bam', default=False) |
24 # parser.add_argument('-h', dest='', 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'] |
150 cmd = 'perl %s %s' % (bam2cfgPath, args.inputBamFile) | 150 cmd = 'perl %s %s' % (bam2cfgPath, 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) | |
156 if args.chromosome: | |
157 cmd += ' -o %s ' % (args.chromosome) | |
158 if args.onlyTrans: | |
159 cmd += ' -t ' | |
160 if args.prefix: | |
161 cmd += ' -d %s ' % (args.prefix) | |
162 if args.bedFormat: | |
163 cmd += ' -g %s ' % (args.bedFormat) | |
164 if args.matePair: | |
165 cmd += ' -l ' | |
166 if args.sortByLibrary: | |
167 cmd += ' -a ' | |
168 if args.AFColumn: | |
169 cmd += ' -h ' | |
155 execute(cmd, output=args.outputRawFile) | 170 execute(cmd, output=args.outputRawFile) |
156 | 171 |
157 # breakdancer2vcf | 172 # breakdancer2vcf |
158 if args.outputVcfFile: | 173 if args.outputVcfFile: |
159 cmd = "python %s -i %s -o %s" % (breakdancer2vcfPath, args.outputRawFile, args.outputVcfFile) | 174 cmd = "python %s -i %s -o %s" % (breakdancer2vcfPath, args.outputRawFile, args.outputVcfFile) |