Skip to content
This repository was archived by the owner on Aug 21, 2018. It is now read-only.

Commit adc816b

Browse files
authored
Merge pull request #117 from ewels/master
Don't save intermediate files by default
2 parents 58b87c5 + 57d9c7e commit adc816b

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,33 @@
11
# NGI-RNAseq
22

3+
## [1.0.2](https://github.com/SciLifeLab/NGI-RNAseq/releases/tag/1.0.2) - 2017-04-11
4+
A couple of tweaks to help the pipeline in production:
5+
6+
* Trimming FastQ files and intermediate BAM files now not saved by default
7+
* This is configurable in the config or with `--saveTrimmed` / `--saveAlignedIntermediates`
8+
* featureCounts merge process uses `.collect()` for better consistency
9+
10+
## [1.0.1](https://github.com/SciLifeLab/NGI-RNAseq/releases/tag/1.0.1) - 2017-04-10
11+
This release includes a bugfix for the last major release relating to the strandedness of `RSEQC`.
12+
13+
* Single end reverse is now correctly `+-,-+.`
14+
* Single end forward is now correctly `++, --`
15+
* PE forward is now correctly `-1++,1--,2+-,2-+`
16+
317
## [1.0](https://github.com/SciLifeLab/NGI-RNAseq/releases/tag/1.0) - 2017-04-05
4-
* Initial production release
18+
The pipeline has now been validated for use in our production work.
19+
This version includes some new features:
20+
21+
* The output from featureCounts is now merged into a single table and supplied along side the individual reports.
22+
* markDuplicates JVM memory is now automatically scaled based on the process memory
23+
* an `html` file with results documentation is now generated and supplied amongst the results
24+
* It's now possible to configure the pipeline for different stranded libraries with just a simple CL flag.
25+
* Additional support and documentation for other platforms than Uppmax. Inluding C3SE.
26+
* + Numerous minor tweaks and improvements.
27+
28+
## [0.3](https://github.com/SciLifeLab/NGI-RNAseq/releases/tag/0.3) - 2016-12-13
29+
In order to properly validate this pipeline and take it into production we need to tag a stable release.
30+
I've tagged specific software versions in the `uppmax.config` file.
31+
32+
## [0.2](https://github.com/SciLifeLab/NGI-RNAseq/releases/tag/0.2) - 2016-10-14
33+
First (semi-) stable release of the new NGI-RNAseq pipeline, as we head towards deployment in production.

docs/usage.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ and BED12 files will then be generated from these downloaded files.
123123
Supply this parameter to save any generated reference genome files to your results folder.
124124
These can then be used for future pipeline runs, reducing processing times.
125125

126+
### `--saveTrimmed`
127+
By default, trimmed FastQ files will not be saved to the results directory. Specify this
128+
flag (or set to true in your config file) to copy these files when complete.
129+
130+
### `--saveAlignedIntermediates`
131+
As above, by default intermediate BAM files will not be saved. The final BAM files created
132+
after the Picard MarkDuplicates step are always saved. Set to true to also copy out BAM
133+
files from STAR / HISAT2 and sorting steps.
134+
126135
## Adapter Trimming
127136
If specific additional trimming is required (for example, from additional tags),
128137
you can use any of the following command line parameters. These affect the command

main.nf

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ vim: syntax=groovy
2222
*/
2323

2424
// Pipeline version
25-
version = 1.0
25+
version = '1.0.2'
2626

2727
// Configurable variables
2828
params.project = false
@@ -41,6 +41,8 @@ params.download_fasta = false
4141
params.download_gtf = false
4242
params.hisatBuildMemory = 200 // Required amount of memory in GB to build HISAT2 index with splice sites
4343
params.saveReference = false
44+
params.saveTrimmed = false
45+
params.saveAlignedIntermediates = false
4446
params.reads = "data/*{1,2}.fastq.gz"
4547
params.outdir = './results'
4648

@@ -148,6 +150,9 @@ log.info "R libraries : ${params.rlocation}"
148150
log.info "Script dir : $baseDir"
149151
log.info "Working dir : $workDir"
150152
log.info "Output dir : ${params.outdir}"
153+
log.info "Save Reference : ${params.saveReference}"
154+
log.info "Save Trimmed : ${params.saveTrimmed}"
155+
log.info "Save Intermeds : ${params.saveAlignedIntermediates}"
151156
if( params.pico ) log.info "Trim Profile : SMARTer Stranded Total RNA-Seq Kit - Pico Input"
152157
if( params.clip_r1 > 0) log.info "Trim R1 : ${params.clip_r1}"
153158
if( params.clip_r2 > 0) log.info "Trim R2 : ${params.clip_r2}"
@@ -380,7 +385,7 @@ process trim_galore {
380385
saveAs: {filename ->
381386
if (filename.indexOf("_fastqc") > 0) "FastQC/$filename"
382387
else if (filename.indexOf("trimming_report.txt") > 0) "logs/$filename"
383-
else "$filename"
388+
else params.saveTrimmed ? filename : null
384389
}
385390

386391
input:
@@ -434,7 +439,10 @@ if(params.aligner == 'star'){
434439
process star {
435440
tag "$prefix"
436441
publishDir "${params.outdir}/STAR", mode: 'copy',
437-
saveAs: {filename -> filename.indexOf(".out") > 0 ? "logs/$filename" : "$filename"}
442+
saveAs: {filename ->
443+
if (filename.indexOf(".out") > 0) "logs/$filename"
444+
else params.saveAlignedIntermediates ? filename : null
445+
}
438446

439447
input:
440448
file reads from trimmed_reads
@@ -476,7 +484,10 @@ if(params.aligner == 'hisat2'){
476484
process hisat2Align {
477485
tag "$prefix"
478486
publishDir "${params.outdir}/HISAT2", mode: 'copy',
479-
saveAs: {filename -> filename.indexOf("_log.txt") > 0 ? "logs/$filename" : "aligned/$filename"}
487+
saveAs: {filename ->
488+
if (filename.indexOf("_log.txt") > 0) "logs/$filename"
489+
else params.saveAlignedIntermediates ? filename : null
490+
}
480491

481492
input:
482493
file reads from trimmed_reads
@@ -528,7 +539,8 @@ if(params.aligner == 'hisat2'){
528539

529540
process hisat2_sortOutput {
530541
tag "${hisat2_bam.baseName}"
531-
publishDir "${params.outdir}/HISAT2/aligned_sorted", mode: 'copy'
542+
publishDir "${params.outdir}/HISAT2", mode: 'copy',
543+
saveAs: {filename -> params.saveAlignedIntermediates ? "aligned_sorted/$filename" : null }
532544

533545
input:
534546
file hisat2_bam
@@ -748,7 +760,7 @@ process merge_featureCounts {
748760
publishDir "${params.outdir}/featureCounts", mode: 'copy'
749761

750762
input:
751-
file input_files from featureCounts_to_merge.toList()
763+
file input_files from featureCounts_to_merge.collect()
752764

753765
output:
754766
file 'merged_gene_counts.txt'

0 commit comments

Comments
 (0)