Skip to content

Commit

Permalink
more single barcode fixes. revert picard threads to fixed number inst…
Browse files Browse the repository at this point in the history
…ead of auto-scaling due to limit on open file handles
  • Loading branch information
dpark01 committed Apr 29, 2015
1 parent ec1285c commit e6041dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 4 additions & 3 deletions broad_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,16 @@ def main_extract_barcodes(args):
def make_params_file(inFile, bamDir, outFile):
'Create input file for illumina_basecalls'
if any(row.get('barcode_2') for row in util.file.read_tabfile_dict(inFile)):
header = ['BARCODE_1', 'BARCODE_2', 'OUTPUT', 'SAMPLE_ALIAS', 'LIBRARY_NAME']
header = ['OUTPUT', 'SAMPLE_ALIAS', 'LIBRARY_NAME', 'BARCODE_1', 'BARCODE_2']
else:
header = ['BARCODE_1', 'OUTPUT', 'SAMPLE_ALIAS', 'LIBRARY_NAME']
header = ['BARCODE', 'OUTPUT', 'SAMPLE_ALIAS', 'LIBRARY_NAME']
with open(outFile, 'wt') as outf:
outf.write('\t'.join(header)+'\n')
rows = list(util.file.read_tabfile_dict(inFile))
rows.append({'barcode_1':'N','barcode_2':'N','sample':'Unmatched'})
for row in rows:
out = {'BARCODE_1':row['barcode_1'],
out = {'BARCODE':row['barcode_1'],
'BARCODE_1':row['barcode_1'],
'BARCODE_2':row.get('barcode_2',''),
'SAMPLE_ALIAS':row['sample'],
'LIBRARY_NAME':row['sample']}
Expand Down
12 changes: 8 additions & 4 deletions tools/picard.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class ExtractIlluminaBarcodesTool(PicardTools) :
jvmMemDefault = '8g'
defaults = {'read_structure':'101T8B8B101T',
'max_mismatches':0, 'minimum_base_quality':25,
'num_processors':0}
'num_processors':8}
option_list = ('read_structure', 'max_mismatches', 'minimum_base_quality',
'min_mismatch_delta', 'max_no_calls', 'minimum_quality',
'compress_outputs', 'num_processors')
Expand Down Expand Up @@ -190,7 +190,7 @@ class IlluminaBasecallsToSamTool(PicardTools) :
defaults = {'read_structure':'101T8B8B101T', 'sequencing_center':'BI',
'adapters_to_check': ('PAIRED_END', 'NEXTERA_V1', 'NEXTERA_V2'),
'max_reads_in_ram_per_tile':100000, 'max_records_in_ram':100000,
'num_processors':0, 'force_gc':False}
'num_processors':8, 'force_gc':False}
option_list = ('read_structure', 'sequencing_center', 'adapters_to_check',
'platform', 'max_reads_in_ram_per_tile', 'max_records_in_ram', 'num_processors',
'apply_eamss_filter', 'force_gc', 'first_tile', 'tile_limit',
Expand All @@ -212,7 +212,11 @@ def execute(self, basecalls_dir, barcodes_dir,
opts += ['BASECALLS_DIR='+basecalls_dir,
'BARCODES_DIR='+barcodes_dir,
'LANE='+str(lane),
'RUN_BARCODE='+run_barcode,
'LIBRARY_PARAMS='+library_params]
'RUN_BARCODE='+run_barcode]
if 'BARCODE' in util.file.readFlatFileHeader(library_params):
# yes, it's deprecated, but it's the only way to do single-barcode pools
opts.append('BARCODE_PARAMS='+library_params)
else:
opts.append('LIBRARY_PARAMS='+library_params)
PicardTools.execute(self, self.subtoolName, opts, JVMmemory)

0 comments on commit e6041dd

Please sign in to comment.