Skip to content

Commit 15fa2fe

Browse files
committed
Fix #159
1 parent ba857e1 commit 15fa2fe

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
* [#138](https://github.com/nf-core/chipseq/issues/138) - Add social preview image
1111
* [#153](https://github.com/nf-core/chipseq/issues/153) - Add plotHeatmap
12+
* [#159](https://github.com/nf-core/chipseq/issues/159) - expose bwa mem -T parameter
1213
* [nf-core/atacseq#63](https://github.com/nf-core/atacseq/issues/63) - Added multicore support for Trim Galore!
1314
* [nf-core/atacseq#71](https://github.com/nf-core/atacseq/issues/71) - consensus_peaks.mLb.clN.boolean.intersect.plot.pdf not generated
1415
* [nf-core/atacseq#75](https://github.com/nf-core/atacseq/issues/75) - Include gene annotation versions in multiqc report
@@ -22,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2223
* Replace `set` with `tuple` and `file()` with `path()` in all processes
2324
* Capitalise process names
2425
* Parameters:
26+
* `--bwa_min_score` to set minimum alignment score for BWA MEM
2527
* `--macs_fdr` to provide FDR threshold for MACS2 peak calling
2628
* `--macs_pvalue` to provide p-value threshold for MACS2 peak calling
2729
* `--skip_peak_qc` to skip MACS2 peak QC plot generation

docs/usage.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* [`--skip_trimming`](#--skip_trimming)
3030
* [`--save_trimmed`](#--save_trimmed)
3131
* [Alignments](#alignments)
32+
* [`--bwa_min_score`](#--bwa_min_score)
3233
* [`--keep_dups`](#--keep_dups)
3334
* [`--keep_multi_map`](#--keep_multi_map)
3435
* [`--save_align_intermeds`](#--save_align_intermeds)
@@ -337,11 +338,11 @@ If provided, alignments that overlap with the regions in this file will be filte
337338

338339
### `--save_reference`
339340

340-
If the BWA index is generated by the pipeline use this parameter to save it to your results folder. These can then be used for future pipeline runs, reducing processing times.
341+
If the BWA index is generated by the pipeline use this parameter to save it to your results folder. These can then be used for future pipeline runs, reducing processing times (Default: false).
341342

342343
### `--igenomes_ignore`
343344

344-
Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`.
345+
Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config` (Default: false).
345346

346347
## Adapter trimming
347348

@@ -361,31 +362,35 @@ You can specify custom trimming parameters as follows:
361362

362363
### `--skip_trimming`
363364

364-
Skip the adapter trimming step. Use this if your input FastQ files have already been trimmed outside of the workflow or if you're very confident that there is no adapter contamination in your data.
365+
Skip the adapter trimming step. Use this if your input FastQ files have already been trimmed outside of the workflow or if you're very confident that there is no adapter contamination in your data (Default: false).
365366

366367
### `--save_trimmed`
367368

368-
By default, trimmed FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete.
369+
By default, trimmed FastQ files will not be saved to the results directory. Specify this flag (or set to true in your config file) to copy these files to the results directory when complete (Default: false).
369370

370371
## Alignments
371372

373+
### `--bwa_min_score`
374+
375+
Don’t output BWA MEM alignments with score lower than this parameter (Default: false).
376+
372377
### `--keep_dups`
373378

374-
Duplicate reads are not filtered from alignments.
379+
Duplicate reads are not filtered from alignments (Default: false).
375380

376381
### `--keep_multi_map`
377382

378-
Reads mapping to multiple locations in the genome are not filtered from alignments.
383+
Reads mapping to multiple locations in the genome are not filtered from alignments (Default: false).
379384

380385
### `--save_align_intermeds`
381386

382-
By default, intermediate BAM files will not be saved. The final BAM files created after the appropriate filtering step are always saved to limit storage usage. Set to true to also save other intermediate BAM files.
387+
By default, intermediate BAM files will not be saved. The final BAM files created after the appropriate filtering step are always saved to limit storage usage. Set to true to also save other intermediate BAM files (Default: false).
383388

384389
## Peaks
385390

386391
### `--narrow_peak`
387392

388-
MACS2 is run by default with the [`--broad`](https://github.com/taoliu/MACS#--broad) flag. Specify this flag to call peaks in narrowPeak mode.
393+
MACS2 is run by default with the [`--broad`](https://github.com/taoliu/MACS#--broad) flag. Specify this flag to call peaks in narrowPeak mode (Default: false).
389394

390395
### `--broad_cutoff`
391396

@@ -401,37 +406,37 @@ p-value cutoff for peak detection, `--macs_fdr` and `--macs_pvalue` are mutually
401406

402407
### `--min_reps_consensus`
403408

404-
Number of biological replicates required from a given condition for a peak to contribute to a consensus peak . If you are confident you have good reproducibility amongst your replicates then you can increase the value of this parameter to create a "reproducible" set of consensus of peaks. For example, a value of 2 will mean peaks that have been called in at least 2 replicates will contribute to the consensus set of peaks, and as such peaks that are unique to a given replicate will be discarded.
409+
Number of biological replicates required from a given condition for a peak to contribute to a consensus peak . If you are confident you have good reproducibility amongst your replicates then you can increase the value of this parameter to create a "reproducible" set of consensus of peaks. For example, a value of 2 will mean peaks that have been called in at least 2 replicates will contribute to the consensus set of peaks, and as such peaks that are unique to a given replicate will be discarded (Default: 1).
405410

406411
```bash
407412
-- min_reps_consensus 1
408413
```
409414

410415
### `--save_macs_pileup`
411416

412-
Instruct MACS2 to create bedGraph files using the `-B --SPMR` parameters.
417+
Instruct MACS2 to create bedGraph files using the `-B --SPMR` parameters (Default: false).
413418

414419
### `--skip_peak_qc`
415420

416-
Skip MACS2 peak QC plot generation.
421+
Skip MACS2 peak QC plot generation (Default: false).
417422

418423
### `--skip_peak_annotation`
419424

420-
Skip annotation of MACS2 and consensus peaks with HOMER.
425+
Skip annotation of MACS2 and consensus peaks with HOMER (Default: false).
421426

422427
### `--skip_consensus_peaks`
423428

424-
Skip consensus peak generation, annotation and counting.
429+
Skip consensus peak generation, annotation and counting (Default: false).
425430

426431
## Differential analysis
427432

428433
### `--deseq2_vst`
429434

430-
Use `vst` transformation instead of `rlog` with DESeq2. See [DESeq2 docs](http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization).
435+
Use `vst` transformation instead of `rlog` with DESeq2. See [DESeq2 docs](http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization) (Default: false).
431436

432437
### `--skip_diff_analysis`
433438

434-
Skip differential binding analysis with DESeq2.
439+
Skip differential binding analysis with DESeq2 (Default: false).
435440

436441
## Skipping QC steps
437442

main.nf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def helpMessage() {
4949
--save_trimmed [bool] Save the trimmed FastQ files in the results directory (Default: false)
5050
5151
Alignments
52+
--bwa_min_score [int] Don’t output BWA MEM alignments with score lower than this parameter (Default: false)
5253
--keep_dups [bool] Duplicate reads are not filtered from alignments (Default: false)
5354
--keep_multi_map [bool] Reads mapping to multiple locations are not filtered from alignments (Default: false)
5455
--save_align_intermeds [bool] Save the intermediate BAM files from the alignment step - not done by default (Default: false)
@@ -228,6 +229,7 @@ summary['GTF File'] = params.gtf
228229
if (params.gene_bed) summary['Gene BED File'] = params.gene_bed
229230
if (params.bwa_index) summary['BWA Index'] = params.bwa_index
230231
if (params.blacklist) summary['Blacklist BED'] = params.blacklist
232+
if (params.bwa_min_score) summary['BWA Min Score'] = params.bwa_min_score
231233
summary['MACS2 Genome Size'] = params.macs_gsize ?: 'Not supplied'
232234
summary['Min Consensus Reps'] = params.min_reps_consensus
233235
if (params.macs_gsize) summary['MACS2 Narrow Peaks'] = params.narrow_peak ? 'Yes' : 'No'
@@ -587,11 +589,13 @@ process BWA_MEM {
587589
if (params.seq_center) {
588590
rg = "\'@RG\\tID:${name}\\tSM:${name.split('_')[0..-2].join('_')}\\tPL:ILLUMINA\\tLB:${name}\\tPU:1\\tCN:${params.seq_center}\'"
589591
}
592+
score = params.bwa_min_score ? "-T ${params.bwa_min_score}" : ''
590593
"""
591594
bwa mem \\
592595
-t $task.cpus \\
593596
-M \\
594597
-R $rg \\
598+
$score \\
595599
${index}/${bwa_base} \\
596600
$reads \\
597601
| samtools view -@ $task.cpus -b -h -F 0x0100 -O BAM -o ${prefix}.bam -

nextflow.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ params {
2929
save_trimmed = false
3030

3131
// Options: Alignments
32+
bwa_min_score = false
3233
keep_dups = false
3334
keep_multi_map = false
3435
save_align_intermeds = false

0 commit comments

Comments
 (0)