Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sfitz add intervals #92

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Unreleased]

### Added
- Add `CollectHsMetrics`
- Add `intervals_bed` option
- Add `mosdepth` quantize workflow
- Add `mosdepth` coverage windows workflow
- Add `FastQC` workflow
Expand Down
16 changes: 15 additions & 1 deletion config/F16.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 3.GB
memory = 8.GB
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mosdepth uses more memory when targets are specified. Can the allocated resources be based on whether intervals_bed is defined?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be updated but it has to be done in methods; the resource handler has an optional input for customized allocations

retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
withName: run_BedToIntervalList_picard {
withName: run_BedToIntervalList_Picard {

Picard should be capitalized

cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 4
memory = 24.GB
Expand Down
16 changes: 15 additions & 1 deletion config/F2.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 1.5.GB
memory = 4.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -103,6 +103,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 2
memory = 4.GB
Expand Down
16 changes: 15 additions & 1 deletion config/F32.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 3.GB
memory = 8.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 4
memory = 46.GB
Expand Down
19 changes: 17 additions & 2 deletions config/F4.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ process {
}
}
withName: assess_coverage_mosdepth {
cpus = 2
memory = 2.GB
cpus = 1
memory = 7.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,21 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}

withName: run_bamqc_Qualimap {
cpus = 2
memory = 4.GB
Expand Down
16 changes: 15 additions & 1 deletion config/F72.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 3.GB
memory = 8.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 4
memory = 56.GB
Expand Down
16 changes: 15 additions & 1 deletion config/F8.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 2.GB
memory = 8.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 4
memory = 9.GB
Expand Down
16 changes: 15 additions & 1 deletion config/M64.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ process {
}
withName: assess_coverage_mosdepth {
cpus = 1
memory = 3.GB
memory = 8.GB
retry_strategy {
memory {
strategy = 'add'
Expand Down Expand Up @@ -93,6 +93,20 @@ process {
}
}
}
withName: run_BedToIntervalList_picard {
cpus = 1
memory = 1.GB
}
withName: run_CollectHsMetrics_Picard {
cpus = 1
memory = 1.GB
retry_strategy {
memory {
strategy = 'add'
operand = 1.GB
}
}
}
withName: run_bamqc_Qualimap {
cpus = 16
memory = 38.GB
Expand Down
3 changes: 0 additions & 3 deletions config/custom_schema_types.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ custom_schema_types {
}
}

/**
* Check list of resource updates
*/
check_resource_update_list = { Map options, String name, Map properties ->
custom_schema_types.check_if_list(options[name], name)
for (item in options[name]) {
Expand Down
16 changes: 11 additions & 5 deletions config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ algorithm:
- mosdepth_quantize
- samtools_stats
- collectwgsmetrics
- collecthsmetrics
- qualimap_bamqc
default:
- samtools_stats
Expand All @@ -41,6 +42,11 @@ save_intermediate_files:
required: false
default: false
help: 'The option to save the intermediate files'
intervals_bed:
type: 'Path'
mode: 'r'
required: false
help: 'Absolute path to BED file with intervals to process'
fastqc_level:
type: 'String'
required: true
Expand Down Expand Up @@ -78,6 +84,11 @@ stats_additional_options:
allow_empty: true
default: ''
help: 'Additional arguments for SAMtools stats command'
mosdepth_windows:
type: 'Integer'
required: false
default: 500
help: 'Window size (integer). Only used if intervals file is not provided'
mosdepth_use_fast_algorithm:
type: 'Bool'
required: false
Expand All @@ -88,11 +99,6 @@ mosdepth_per_base_output:
required: false
default: true
help: 'Output per-base coverage'
mosdepth_window_size:
type: 'Integer'
required: false
default: 500
help: 'Window size for mosdepth coverage calculation'
mosdepth_additional_options:
type: 'String'
required: false
Expand Down
22 changes: 15 additions & 7 deletions config/template.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ includeConfig "${projectDir}/nextflow.config"

// Inputs/parameters of the pipeline
params {
algorithm = ['samtools_stats', 'collectwgsmetrics'] // 'fastqc', 'samtools_stats', 'collectwgsmetrics', 'mosdepth_quantize', 'mosdepth_coverage', 'qualimap_bamqc'
algorithm = ['samtools_stats', 'collectwgsmetrics'] // 'fastqc', 'samtools_stats', 'collectwgsmetrics', 'collecthsmetrics', 'mosdepth_quantize', 'mosdepth_coverage', 'qualimap_bamqc'
reference = '/hot/resource/reference-genome/GRCh38-BI-20160721/Homo_sapiens_assembly38.fasta'
output_dir = '/path/to/output/directory'
blcds_registered_dataset = false // if you want the output to be registered
save_intermediate_files = true
intervals_bed = ''

// SAMtools stats options
stats_max_rgs_per_sample = 20
stats_remove_duplicates = false
stats_additional_options = ''

// mosdepth window-base coverage options
// fast algorithm ignores read pair overlaps and should not be used on libraries with small insert sizes
mosdepth_use_fast_algorithm = false
// mosdepth window-based coverage options
mosdepth_windows = 500 // not used if intervals_bed is defined
mosdepth_use_fast_algorithm = false // fast algorithm ignores read pair overlaps and should not be used on libraries with small insert sizes
mosdepth_per_base_output = true
mosdepth_window_size = 500
mosdepth_additional_options = '--mapq 20'

// mosdepth quantized coverage (like GATK's Callable Regions)
Expand All @@ -36,14 +36,22 @@ params {
mosdepth_quantize_additional_options = '--mapq 20'

// Picard CollectWgsMetrics options
cwm_coverage_cap = 1000
cwm_coverage_cap = 250
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

250 is the Picard default value

cwm_minimum_mapping_quality = 20
cwm_minimum_base_quality = 20
cwm_use_fast_algorithm = false
cwm_additional_options = ''

// Picard CollectHsMetrics options
chm_bait_intervals_bed = '' // if not defined, intevals_bed will be used
chm_coverage_cap = 2000
chm_minimum_mapping_quality = 20
chm_minimum_base_quality = 20
chm_per_base_output = true
chm_additional_options = ''
Comment on lines +46 to +51
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: If these are new, they should get validated in schema as well


// Qualimap bamqc options
bamqc_output_format = 'pdf' // 'html' or 'pdf'
bamqc_output_format = 'html' // 'html' or 'pdf'. html is needed to use with multiqc
bamqc_additional_options = ''

// FastQC options
Expand Down
Loading