Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshah committed Nov 22, 2021
2 parents 0a0e020 + bf8850f commit e6e684e
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = """msk-access"""
__email__ = '[email protected]'
__version__ = '0.6.3'
__version__ = '1.1.1'
2 changes: 1 addition & 1 deletion cwl_commandlinetools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = """msk-access"""
__email__ = '[email protected]'
__version__ = '1.0.0'
__version__ = '1.1.1'
113 changes: 113 additions & 0 deletions docs/gatk/gatk_downsamplesam_4.1.8.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# ApplyBQSR v4.1.8.1

## Version of tools in [docker image ](https://hub.docker.com/r/broadinstitute/gatk)

| Tool | Version | Location |
| :--- | :--- | :--- |
| GATK | 4.1.8.1 | [https://github.com/broadinstitute/gatk/releases/tag/4.1.8.1](https://github.com/broadinstitute/gatk/releases/tag/4.1.8.1) |

[![](https://img.shields.io/badge/version-4.1.8.1-blue)](https://github.com/broadinstitute/gatk/releases/tag/4.1.8.1)

## CWL

* CWL specification 1.0
* Use example\_inputs.yml to see the inputs to the cwl
* Example Command using [toil](https://toil.readthedocs.io):

```bash
> toil-cwl-runner gatk_downsamplesam_4.1.8.1.cwl example_inputs.yml
```

**If at MSK, using the JUNO cluster you can use the following command**

```bash
#Using CWLTOOL
> cwltool --singularity --non-strict gatk_downsamplesam_4.1.8.1.cwl inputs.yaml

#Using toil-cwl-runner
> mkdir run_directory
> toil-cwl-runner --singularity --logFile path/to/run_directory/cwltoil.log --jobStore path/to/jobStore --batchSystem lsf --workDir /path/to/run_directory --outdir /path/to/run_directory --writeLogs /path/to/run_directory --logLevel DEBUG --stats --retryCount 2 --disableCaching --maxLogFileSize 20000000000 gatk_downsamplesam_4.1.8.1.cwl inputs.yaml > file.stdout 2> file.stderr &
```

## Usage

\`\`\`bash

> toil-cwl-runner gatk_downsamplesam_4.1.8.1.cwl --help
usage: gatk_downsamplesam_4.1.8.1.cwl [-h] --input INPUT --reference REFERENCE
[--output_file_name OUTPUT_FILE_NAME]
[--output_file_name_metrics OUTPUT_FILE_NAME_METRICS]
[--probability PROBABILITY]
[--random_seed RANDOM_SEED]
[--strategy STRATEGY]
[--arguments_file ARGUMENTS_FILE]
[--cloud-index-prefetch-buffer CLOUD_INDEX_PREFETCH_BUFFER]
[--cloud_prefetch_buffer CLOUD_PREFETCH_BUFFER]
[--create_output_bam_index]
[--create_output_bam_md5]
[--disable_bam_index_caching]
[--disable_read_filter DISABLE_READ_FILTER]
[--disable_sequence_dictionary_validation]
[--exclude_intervals EXCLUDE_INTERVALS]
[--gatk_config_file GATK_CONFIG_FILE]
[--gcs_max_retries GCS_MAX_RETRIES]
[--gcs_project_for_requester_pays GCS_PROJECT_FOR_REQUESTER_PAYS]
[--QUIET] [--read_filter READ_FILTER]
[--read_index READ_INDEX]
[--seconds_between_progress_updates SECONDS_BETWEEN_PROGRESS_UPDATES]
[--lenient]
[--number_of_threads NUMBER_OF_THREADS]
[--memory_per_job MEMORY_PER_JOB]
[--memory_overhead MEMORY_OVERHEAD]
[--temporary_directory TEMPORARY_DIRECTORY]
[job_order]

positional arguments:
job_order Job input json file

optional arguments:
-h, --help show this help message and exit
--input INPUT BAM/SAM file containing reads
--reference REFERENCE
Reference sequence file
--output_file_name OUTPUT_FILE_NAME
Output file name. Not Required
--output_file_name_metrics OUTPUT_FILE_NAME_METRICS
Output file name for metrics file. Not Required
--probability PROBABILITY
The probability of keeping any individual read,
between 0 and 1.
--random_seed RANDOM_SEED
Random seed used for deterministic results. Setting to
null will cause multiple invocations to produce
different results.
--strategy STRATEGY The --STRATEGY argument is an enumerated type
(Strategy), which can have one of the following
values: HighAccuracy ConstantMemory Chained default
Strategy ConstantMemory
--arguments_file ARGUMENTS_FILE
--cloud-index-prefetch-buffer CLOUD_INDEX_PREFETCH_BUFFER
--cloud_prefetch_buffer CLOUD_PREFETCH_BUFFER
--create_output_bam_index
--create_output_bam_md5
--disable_bam_index_caching
--disable_read_filter DISABLE_READ_FILTER
Read filters to be disabled before analysis
--disable_sequence_dictionary_validation
--exclude_intervals EXCLUDE_INTERVALS
--gatk_config_file GATK_CONFIG_FILE
--gcs_max_retries GCS_MAX_RETRIES
--gcs_project_for_requester_pays GCS_PROJECT_FOR_REQUESTER_PAYS
--QUIET
--read_filter READ_FILTER
--read_index READ_INDEX
--seconds_between_progress_updates SECONDS_BETWEEN_PROGRESS_UPDATES
--lenient
--number_of_threads NUMBER_OF_THREADS
--memory_per_job MEMORY_PER_JOB
--memory_overhead MEMORY_OVERHEAD
--temporary_directory TEMPORARY_DIRECTORY
Default value: null.


7 changes: 7 additions & 0 deletions fastp_0.20.1/fastp_0.20.1.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ inputs:
prefix: '--length_required'
doc: |
reads shorter than length_required will be discarded, default is 15.
- id: maximum_read_length
type: int?
inputBinding:
position: 0
prefix: '--length_limit'
doc: |
reads longer than length_limit will be discarded, default 0 means no limitation.
- default: fastp.json
id: json_output_path
type: string
Expand Down
21 changes: 21 additions & 0 deletions gatk_downsamplesam_4.1.8.1/example_inputs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
QUIET: null
arguments_file: null
create_output_bam_index: null
create_output_bam_md5: null
input:
class: File
path: input.bam
lenient: null
memory_overhead: null
memory_per_job: null
number_of_threads: null
output_file_name: null
output_file_name_metrics: null
probability: null
random_seed: null
reference:
class: File
path: reference.fasta
strategy: null
temporary_directory: null

201 changes: 201 additions & 0 deletions gatk_downsamplesam_4.1.8.1/gatk_downsamplesam_4.1.8.1.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
class: CommandLineTool
cwlVersion: v1.0
$namespaces:
dct: 'http://purl.org/dc/terms/'
doap: 'http://usefulinc.com/ns/doap#'
foaf: 'http://xmlns.com/foaf/0.1/'
sbg: 'https://www.sevenbridges.com/'
id: gatk_downsamplesam_4_1_8_1
baseCommand:
- gatk
- DownsampleSam
inputs:
- id: input
type: File
inputBinding:
position: 3
prefix: '--INPUT'
doc: BAM/SAM file containing reads
secondaryFiles:
- ^.bai
- id: reference
type: File
inputBinding:
position: 3
prefix: '--REFERENCE_SEQUENCE'
doc: Reference sequence file
secondaryFiles:
- .fai
- ^.dict
- id: output_file_name
type: string?
doc: Output file name. Not Required
- id: output_metrics_file_name
type: string?
doc: Output file name for metrics file. Not Required
- id: probability
type: float?
inputBinding:
position: 4
prefix: '--PROBABILITY'
doc: 'The probability of keeping any individual read, between 0 and 1.'
- id: random_seed
type: int?
inputBinding:
position: 4
prefix: '--RANDOM_SEED'
doc: >-
Random seed used for deterministic results. Setting to null will cause
multiple invocations to produce different results.
- id: strategy
type: string?
inputBinding:
position: 4
prefix: '--STRATEGY'
doc: >-
The --STRATEGY argument is an enumerated type (Strategy), which can have
one of the following values:


HighAccuracy

ConstantMemory

Chained

default Strategy ConstantMemory
- id: arguments_file
type:
- 'null'
- type: array
items: File
inputBinding:
position: 0
prefix: '--arguments_file'
- id: create_output_bam_index
type: boolean?
inputBinding:
position: 10
prefix: '--CREATE_INDEX'
- id: create_output_bam_md5
type: boolean?
inputBinding:
position: 10
prefix: '--CREATE_MD5_FILE'
- id: QUIET
type: boolean?
inputBinding:
position: 10
prefix: '--QUIET'
- id: "validation_stringency"
type: string?
inputBinding:
position: 6
prefix: '--VALIDATION_STRINGENCY'
- id: number_of_threads
type: int?
- id: memory_per_job
type: int?
- id: memory_overhead
type: int?
- id: temporary_directory
type: string?
doc: 'Default value: null.'
outputs:
- id: gatk_downsamplesam_output_bam
type: File
outputBinding:
glob: |-
${
if(inputs.output_file_name){
return inputs.output_file_name
} else {
return inputs.input.basename.replace(/.bam/, '_downsamplesam.bam')
}
}
secondaryFiles:
- ^.bai
- id: gatk_downsamplesam_output_metrics
type: File
outputBinding:
glob: |-
${
if(inputs.output_metrics_file_name){
return inputs.output_metrics_file_name
} else {
return inputs.input.basename.replace(/.bam/, '_downsamplesam.metrics')
}
}
label: gatk_downsample_sam_4.1.8.1
arguments:
- position: 0
prefix: '--java-options'
valueFrom: |-
${
if(inputs.memory_per_job && inputs.memory_overhead){
if(inputs.memory_per_job % 1000 == 0){
return "-Xmx" + (inputs.memory_per_job/1000).toString() + "G"
} else {
return "-Xmx" + Math.floor((inputs.memory_per_job/1000)).toString() + "G"
}
} else if (inputs.memory_per_job && !inputs.memory_overhead){
if(inputs.memory_per_job % 1000 == 0) {
return "-Xmx" + (inputs.memory_per_job/1000).toString() + "G"
} else {
return "-Xmx" + Math.floor((inputs.memory_per_job/1000)).toString() + "G"
}
} else if(!inputs.memory_per_job && inputs.memory_overhead){
return "-Xmx12G"
} else {
return "-Xmx12G"
}
}
- position: 2
prefix: '--TMP_DIR'
valueFrom: |-
${
if(inputs.temporary_directory)
return inputs.temporary_directory;
return runtime.tmpdir
}
- position: 2
prefix: '--OUTPUT'
valueFrom: |-
${
if(inputs.output_file_name){
return inputs.output_file_name
} else {
return inputs.input.basename.replace(/.bam/, '_downsamplesam.bam')
}
}
- position: 2
prefix: '--METRICS_FILE'
valueFrom: |-
${
if(inputs.output_metrics_file_name){
return inputs.output_metrics_file_name
} else {
return inputs.input.basename.replace(/.bam/, '_downsamplesam.metrics')
}
}
requirements:
- class: ResourceRequirement
ramMin: 20000
coresMin: 2
- class: DockerRequirement
dockerPull: 'ghcr.io/msk-access/gatk:4.1.8.1'
- class: InlineJavascriptRequirement
'dct:contributor':
- class: 'foaf:Organization'
'foaf:member':
- class: 'foaf:Person'
'foaf:mbox': 'mailto:shahr2@mskcc.org'
'foaf:name': Ronak Shah
'foaf:name': Memorial Sloan Kettering Cancer Center
'dct:creator':
- class: 'foaf:Organization'
'foaf:member':
- class: 'foaf:Person'
'foaf:mbox': 'mailto:shahr2@mskcc.org'
'foaf:name': Ronak Shah
'foaf:name': Memorial Sloan Kettering Cancer Center
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.1.1
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/msk-access/cwl-commandlinetools',
version='1.0.0',
version='1.1.1',
zip_safe=False,
)

0 comments on commit e6e684e

Please sign in to comment.