Skip to content

Commit

Permalink
remove deprecated "max_reads_in_ram_per_tile" from picard opts, expos…
Browse files Browse the repository at this point in the history
…e opt "sort" (#71)

comment out deprecated "max_reads_in_ram_per_tile" from picard opts, expose opt sort, also re-enable Intel compression
  • Loading branch information
tomkinsc authored May 5, 2021
1 parent 0d8ec44 commit caf2a96
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tools/picard.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def execute(self, command, picardOptions=None, JVMmemory=None, background=False,

# the conda version wraps the jar file with a shell script
path = self.install_and_get_path()
tool_cmd = [path, '-Xmx' + JVMmemory, '-Djava.io.tmpdir=' + tempfile.gettempdir(), command] + picardOptions + ['USE_JDK_DEFLATER=true','USE_JDK_INFLATER=true']
tool_cmd = [path, '-Xmx' + JVMmemory, '-Djava.io.tmpdir=' + tempfile.gettempdir(), command] + picardOptions # + ['USE_JDK_DEFLATER=true','USE_JDK_INFLATER=true']
_log.debug(' '.join(tool_cmd))

env = os.environ.copy()
Expand Down Expand Up @@ -491,16 +491,19 @@ class IlluminaBasecallsToSamTool(PicardTools):
defaults = {
'read_structure': '101T8B8B101T',
'adapters_to_check': ('PAIRED_END', 'NEXTERA_V1', 'NEXTERA_V2'),
'max_reads_in_ram_per_tile': 1000000,
# MAX_READS_IN_RAM_PER_TILE is deprecated in newer versions of Picard in favor of MAX_RECORDS_IN_RAM
# commenting out for now until fully removed from picard
#'max_reads_in_ram_per_tile': 1000000,
'max_records_in_ram': 2000000,
'num_processors': 0,
'include_non_pf_reads': False,
'compression_level': 7,
'sort': True
}
option_list = (
'read_structure', 'sequencing_center', 'adapters_to_check', 'platform', 'max_reads_in_ram_per_tile',
'read_structure', 'sequencing_center', 'adapters_to_check', 'platform',
'max_records_in_ram', 'num_processors', 'apply_eamss_filter', 'force_gc', 'first_tile', 'tile_limit',
'include_non_pf_reads', 'run_start_date', 'read_group_id', 'compression_level'
'include_non_pf_reads', 'run_start_date', 'read_group_id', 'compression_level', 'sort'
)

# pylint: disable=W0221
Expand Down Expand Up @@ -529,6 +532,10 @@ def execute(self,
'BASECALLS_DIR=' + basecalls_dir, 'BARCODES_DIR=' + barcodes_dir, 'LANE=' + str(lane),
'RUN_BARCODE=' + read_group_id_precursor, 'LIBRARY_PARAMS=' + library_params
]
# MAX_READS_IN_RAM_PER_TILE is deprecated in newer versions of Picard in favor of MAX_RECORDS_IN_RAM
# remove from opts; this list comprehension can be removed once MAX_READS_IN_RAM_PER_TILE is removed
# from picard
opts = [opt for opt in opts if "MAX_READS_IN_RAM_PER_TILE" not in opt]
PicardTools.execute(self, self.subtoolName, opts, JVMmemory)

def execute_single_sample(self,
Expand Down

0 comments on commit caf2a96

Please sign in to comment.