diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 0678c15a..e25ccba3 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -72,21 +72,21 @@ jobs: parallel: true query: ^workflows - - name: Build nextflow schemas - uses: viash-io/viash-actions/pro/build-nextflow-schemas@v4 - with: - components: src - workflows: src - viash_pro_token: ${{ secrets.GITHUB_TOKEN }} - tools_version: 'main_build' + # - name: Build nextflow schemas + # uses: viash-io/viash-actions/pro/build-nextflow-schemas@v4 + # with: + # components: src + # workflows: src + # viash_pro_token: ${{ secrets.GITHUB_TOKEN }} + # tools_version: 'main_build' - - name: Build parameter files - uses: viash-io/viash-actions/pro/build-nextflow-params@v4 - with: - workflows: src - components: src - viash_pro_token: ${{ secrets.GITHUB_TOKEN }} - tools_version: 'main_build' + # - name: Build parameter files + # uses: viash-io/viash-actions/pro/build-nextflow-params@v4 + # with: + # workflows: src + # components: src + # viash_pro_token: ${{ secrets.GTHB_PAT }} + # tools_version: 'main_build' - name: Deploy to target branch uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/src/bbmap_bbsplit/config.vsh.yaml b/src/bbmap_bbsplit/config.vsh.yaml index b6446e7b..720ef188 100644 --- a/src/bbmap_bbsplit/config.vsh.yaml +++ b/src/bbmap_bbsplit/config.vsh.yaml @@ -40,7 +40,7 @@ functionality: description: Directory with index files - name: "--versions" type: file - default: versions.yml + must_exist: false # Outputs - name: "--fastq_1" diff --git a/src/bbmap_bbsplit/script.sh b/src/bbmap_bbsplit/script.sh index 3dc57c3f..51ca112d 100755 --- a/src/bbmap_bbsplit/script.sh +++ b/src/bbmap_bbsplit/script.sh @@ -47,13 +47,13 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - bbmap: \$(bbversion.sh | grep -v "Duplicate cpuset") -END_VERSIONS + +text="${meta_functionality_name}: + bbmap: $(bbversion.sh | grep -v "Duplicate cpuset")" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/bedtools_genomecov/config.vsh.yaml b/src/bedtools_genomecov/config.vsh.yaml index 189125cf..72bdf777 100644 --- a/src/bedtools_genomecov/config.vsh.yaml +++ b/src/bedtools_genomecov/config.vsh.yaml @@ -18,6 +18,9 @@ functionality: - name: "--extra_bedtools_args" type: string default: '' + - name: "--versions" + type: file + must_exist: false - name: "--bedgraph_forward" type: file @@ -27,6 +30,10 @@ functionality: type: file default: $id.reverse.bedgraph direction: output + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/bedtools_genomecov/script.sh b/src/bedtools_genomecov/script.sh index 722fb486..9a163351 100644 --- a/src/bedtools_genomecov/script.sh +++ b/src/bedtools_genomecov/script.sh @@ -25,13 +25,13 @@ mv $prefix_forward.bedGraph $par_bedgraph_forward mv $prefix_reverse.bedGraph $par_bedgraph_reverse # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - bedtools: \$(bedtools --version | sed -e "s/bedtools v//g") -END_VERSIONS + +text="${meta_functionality_name}: + bedtools: $(bedtools --version | sed -e "s/bedtools\ v//g")" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/cat_additional_fasta/config.vsh.yaml b/src/cat_additional_fasta/config.vsh.yaml index 805ade15..a051e39c 100644 --- a/src/cat_additional_fasta/config.vsh.yaml +++ b/src/cat_additional_fasta/config.vsh.yaml @@ -22,6 +22,9 @@ functionality: - name: "--biotype" type: string description: Biotype value to use when appending entries to GTF file when additional fasta file is provided. + - name: "--versions" + type: file + must_exist: false # Output - name: "--fasta_output" @@ -32,6 +35,10 @@ functionality: type: file direction: output description: Concatenated GTF file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/cat_additional_fasta/script.sh b/src/cat_additional_fasta/script.sh index 56966665..e33f4183 100755 --- a/src/cat_additional_fasta/script.sh +++ b/src/cat_additional_fasta/script.sh @@ -15,13 +15,13 @@ cat $par_fasta $par_additional_fasta > $par_fasta_output cat $par_gtf ${add_name%%.*}.gtf > $par_gtf_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - python: \$(python --version | sed 's/Python //g') -END_VERSIONS + +text="${meta_functionality_name}: + python: $(python3 --version | sed 's/Python //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/cat_fastq/config.vsh.yaml b/src/cat_fastq/config.vsh.yaml index 3cdc7347..c8b706b1 100644 --- a/src/cat_fastq/config.vsh.yaml +++ b/src/cat_fastq/config.vsh.yaml @@ -18,6 +18,9 @@ functionality: multiple: true multiple_sep: ";" description: Read 2 fastq files to be concatenated + - name: "--versions" + type: file + must_exist: false - name: "--fastq_1" type: file @@ -30,6 +33,10 @@ functionality: must_exist: false default: $id.read2.merged.fastq.gz description: Concatenated read 2 fastq + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/cat_fastq/script.sh b/src/cat_fastq/script.sh index 043a8472..0659f869 100644 --- a/src/cat_fastq/script.sh +++ b/src/cat_fastq/script.sh @@ -16,13 +16,13 @@ if [ ${#read_2[@]} -gt 0 ]; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') -END_VERSIONS + +text="${meta_functionality_name}: + cat: $(echo $(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/deseq2_qc/config.vsh.yaml b/src/deseq2_qc/config.vsh.yaml index 8a3712c1..3a765544 100644 --- a/src/deseq2_qc/config.vsh.yaml +++ b/src/deseq2_qc/config.vsh.yaml @@ -29,6 +29,10 @@ functionality: - name: "--extra_args2" type: string default: star_salmon + - name: "--versions" + type: file + must_exist: false + # OUTPUT - name: "--deseq2_output" @@ -43,6 +47,10 @@ functionality: type: file direction: output default: deseq2.sample.dists_mqc.tsv + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/deseq2_qc/script.sh b/src/deseq2_qc/script.sh index 39248bf0..9e409f61 100755 --- a/src/deseq2_qc/script.sh +++ b/src/deseq2_qc/script.sh @@ -44,13 +44,13 @@ if [ -f "$par_deseq2_output/R_sessionInfo.log" ]; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') - bioconductor-deseq2: \$(Rscript -e "library(DESeq2); cat(as.character(packageVersion('DESeq2')))") -END_VERSIONS + +text="${meta_functionality_name}: + r-base: $(echo $(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + bioconductor-deseq2: $(Rscript -e 'library(DESeq2); cat(as.character(packageVersion('DESeq2')))')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/dupradar/config.vsh.yaml b/src/dupradar/config.vsh.yaml index 72396012..aeb4de22 100644 --- a/src/dupradar/config.vsh.yaml +++ b/src/dupradar/config.vsh.yaml @@ -33,6 +33,11 @@ functionality: required: false choices: ["forward", "reverse", "unstranded"] description: strandedness of input bam file reads (forward, reverse or unstranded (default, applicable to paired reads)) + + - name: "--versions" + type: file + must_exist: false + - name: "--output_dupmatrix" type: file @@ -89,6 +94,11 @@ functionality: must_exist: true default: $id.intercept_slope.txt description: output file (txt) with progression of duplication rate value + + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/dupradar/script.sh b/src/dupradar/script.sh index 454ed47f..c9661a72 100644 --- a/src/dupradar/script.sh +++ b/src/dupradar/script.sh @@ -28,14 +28,14 @@ mv "$par_id"_expressionHist.pdf $par_output_expression_histogram mv "$par_id"_intercept_slope.txt $par_output_intercept_slope # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') - bioconductor-dupradar: \$(Rscript -e "library(dupRadar); cat(as.character(packageVersion('dupRadar')))") -END_VERSIONS + +text="${meta_functionality_name}: + r-base: $(echo $(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + bioconductor-dupradar: $(Rscript -e 'library(dupRadar); cat(as.character(packageVersion('dupRadar')))')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/fastqc/config.vsh.yaml b/src/fastqc/config.vsh.yaml index c038c51a..51efa17d 100644 --- a/src/fastqc/config.vsh.yaml +++ b/src/fastqc/config.vsh.yaml @@ -21,6 +21,10 @@ functionality: multiple_sep: "," description: Input fastq files, either one or two (paired) example: sample.fastq + - name: "--versions" + type: file + must_exist: false + - name: "--fastqc_html_1" type: file @@ -46,10 +50,15 @@ functionality: required: false must_exist: false default: $id.$key.read2.zip + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script path: script.sh + test_resources: - type: bash_script path: test.sh diff --git a/src/fastqc/script.sh b/src/fastqc/script.sh index 92711699..0a87f1ce 100644 --- a/src/fastqc/script.sh +++ b/src/fastqc/script.sh @@ -54,13 +54,13 @@ if [ -e "$zip2" ]; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) -END_VERSIONS + +text="${meta_functionality_name}: + fastqc: $( fastqc --version | sed -e 's/FastQC v//g' )" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/fq_subsample/config.vsh.yaml b/src/fq_subsample/config.vsh.yaml index 444d4ea9..2f1202b8 100644 --- a/src/fq_subsample/config.vsh.yaml +++ b/src/fq_subsample/config.vsh.yaml @@ -18,6 +18,10 @@ functionality: type: string default: "" description: Extra arguments to pass to fq subsample + - name: "--versions" + type: file + must_exist: false + - name: "--output_1" type: file @@ -30,6 +34,10 @@ functionality: direction: output default: $id.read2.subsampled.fastq.gz description: Sampled read 2 fastq files + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/fq_subsample/script.sh b/src/fq_subsample/script.sh index dcd900d1..06b0a32d 100644 --- a/src/fq_subsample/script.sh +++ b/src/fq_subsample/script.sh @@ -24,13 +24,13 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - fq: \$(echo \$(fq subsample --version | sed 's/fq-subsample //g')) -END_VERSIONS + +text="${meta_functionality_name}: + fq: $(echo $(fq subsample --version | sed 's/fq-subsample //g'))" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/getchromsizes/config.vsh.yaml b/src/getchromsizes/config.vsh.yaml index ed528962..75697d05 100644 --- a/src/getchromsizes/config.vsh.yaml +++ b/src/getchromsizes/config.vsh.yaml @@ -12,6 +12,10 @@ functionality: - name: "--fasta" type: file description: Genome fasta files + - name: "--versions" + type: file + must_exist: false + # output - name: "--sizes" @@ -26,6 +30,10 @@ functionality: type: file description: Optional gzip index file for compressed inputs direction: output + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/getchromsizes/script.sh b/src/getchromsizes/script.sh index 30e2b2d0..5994c7f8 100755 --- a/src/getchromsizes/script.sh +++ b/src/getchromsizes/script.sh @@ -9,13 +9,13 @@ cut -f 1,2 "$par_fasta.fai" > $par_sizes mv "$par_fasta.fai" $par_fai # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - getchromsizes: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS + +text="${meta_functionality_name}: + getchromsizes: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/gffread/config.vsh.yaml b/src/gffread/config.vsh.yaml index d070188c..1bbd498d 100644 --- a/src/gffread/config.vsh.yaml +++ b/src/gffread/config.vsh.yaml @@ -13,16 +13,25 @@ functionality: type: file required: true description: A reference file in either the GFF3, GFF2 or GTF format. + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file direction: output required: true description: GTF file resulting from the conversion of the GFF input file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script path: script.sh + test_resources: - type: bash_script path: test.sh diff --git a/src/gffread/script.sh b/src/gffread/script.sh index e861d148..2c7fdd2d 100644 --- a/src/gffread/script.sh +++ b/src/gffread/script.sh @@ -5,13 +5,13 @@ set -eo pipefail gffread $par_input -o $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - gffread: \$(gffread --version 2>&1) -END_VERSIONS + +text="${meta_functionality_name}: + gffread: $(gffread --version 2>&1)" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/gtf2bed/config.vsh.yaml b/src/gtf2bed/config.vsh.yaml index 39f3feb1..046003a1 100644 --- a/src/gtf2bed/config.vsh.yaml +++ b/src/gtf2bed/config.vsh.yaml @@ -13,12 +13,20 @@ functionality: type: file required: true description: A reference file in GTF format. + - name: "--versions" + type: file + must_exist: false + - name: "--bed_output" type: file direction: output required: true description: BED file resulting from the conversion of the GTF input file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/gtf2bed/script.sh b/src/gtf2bed/script.sh index a3d353c6..9b82f652 100755 --- a/src/gtf2bed/script.sh +++ b/src/gtf2bed/script.sh @@ -5,13 +5,13 @@ set -eo pipefail perl "$meta_resources_dir/gtf2bed.pl" $par_gtf > $par_bed_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - perl: \$(echo \$(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/') -END_VERSIONS + +text="${meta_functionality_name}: + perl: $(echo $(perl --version 2>&1) | sed 's/.*v\\(.*\\)) built.*/\\1/')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/gtf_gene_filter/config.vsh.yaml b/src/gtf_gene_filter/config.vsh.yaml index 0cdfc950..2c73dc43 100644 --- a/src/gtf_gene_filter/config.vsh.yaml +++ b/src/gtf_gene_filter/config.vsh.yaml @@ -15,11 +15,19 @@ functionality: - name: "--gtf" type: file description: GTF file + - name: "--versions" + type: file + must_exist: false + - name: "--filtered_gtf" type: file direction: output description: Filtered GTF file containing only genes in the genome + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/gtf_gene_filter/script.sh b/src/gtf_gene_filter/script.sh index 59d61a61..64b1489b 100644 --- a/src/gtf_gene_filter/script.sh +++ b/src/gtf_gene_filter/script.sh @@ -7,13 +7,13 @@ filename="$(basename -- $par_fasta)" python3 "$meta_resources_dir/filter_gtf_for_genes_in_genome.py" --gtf $par_gtf --fasta $par_fasta -o $par_filtered_gtf # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - python: \$(python --version | sed 's/Python //g') -END_VERSIONS + +text="${meta_functionality_name}: + python: $(python3 --version | sed 's/Python //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/gunzip/config.vsh.yaml b/src/gunzip/config.vsh.yaml index 94defcdc..410f2253 100644 --- a/src/gunzip/config.vsh.yaml +++ b/src/gunzip/config.vsh.yaml @@ -13,12 +13,20 @@ functionality: type: file required: true description: Path of file to be decompressed + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file direction: output required: true description: Decompressed file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/gunzip/script.sh b/src/gunzip/script.sh index a3167014..8a552d80 100755 --- a/src/gunzip/script.sh +++ b/src/gunzip/script.sh @@ -11,13 +11,11 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') -END_VERSIONS - +text="${meta_functionality_name}: + gunzip: $(echo $(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/multiqc/config.vsh.yaml b/src/multiqc/config.vsh.yaml index b90bf9f4..44eb6dc5 100644 --- a/src/multiqc/config.vsh.yaml +++ b/src/multiqc/config.vsh.yaml @@ -28,6 +28,10 @@ functionality: - name: "--input" type: file must_exist: false + - name: "--versions" + type: file + must_exist: false + - name: "Ouput" arguments: @@ -43,9 +47,10 @@ functionality: type: file direction: output default: multiqc_plots - # - name: "--versions" - # type: file - # direction: output + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/multiqc/script.sh b/src/multiqc/script.sh index c79c058b..46091e56 100644 --- a/src/multiqc/script.sh +++ b/src/multiqc/script.sh @@ -9,13 +9,13 @@ multiqc \ $par_input # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) -END_VERSIONS -if [ -e "$par_versions" ]; then +text="${meta_functionality_name}: + multiqc: $( multiqc --version | sed -e 's/multiqc, version //g' )" + +if [ $par_versions ] && [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi diff --git a/src/multiqc_custom_biotype/config.vsh.yaml b/src/multiqc_custom_biotype/config.vsh.yaml index 8b83b254..01e1e5a4 100644 --- a/src/multiqc_custom_biotype/config.vsh.yaml +++ b/src/multiqc_custom_biotype/config.vsh.yaml @@ -15,12 +15,19 @@ functionality: - name: "--biotypes_header" type: file default: assets/multiqc/biotypes_header.txt - + - name: "--versions" + type: file + must_exist: false + - name: '--featurecounts_multiqc' type: file direction: output default: $id.biotype_counts_rrna_mqc.tsv + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/multiqc_custom_biotype/script.sh b/src/multiqc_custom_biotype/script.sh index 94886027..b6e02ae6 100644 --- a/src/multiqc_custom_biotype/script.sh +++ b/src/multiqc_custom_biotype/script.sh @@ -11,13 +11,13 @@ python3 "$meta_resources_dir/mqc_features_stat.py" \ -o $par_featurecounts_multiqc # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - python: \$(python --version | sed 's/Python //g') -END_VERSIONS + +text="${meta_functionality_name}: + python: $(python3 --version | sed 's/Python //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/picard_markduplicates/config.vsh.yaml b/src/picard_markduplicates/config.vsh.yaml index b52d483c..477f0734 100644 --- a/src/picard_markduplicates/config.vsh.yaml +++ b/src/picard_markduplicates/config.vsh.yaml @@ -22,6 +22,10 @@ functionality: type: string description: Additional argument to be passed to Picard MarkDuplicates default: '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' + - name: "--versions" + type: file + must_exist: false + - name: "--output_bam" type: file @@ -39,6 +43,10 @@ functionality: direction: output description: Duplicate metrics file generated by picard default: $id.MarkDuplicates.metrics.txt + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/picard_markduplicates/script.sh b/src/picard_markduplicates/script.sh index 385f5d97..95e87779 100755 --- a/src/picard_markduplicates/script.sh +++ b/src/picard_markduplicates/script.sh @@ -17,13 +17,12 @@ java -Xmx${avail_mem}M -jar $PICARD MarkDuplicates \ --METRICS_FILE $par_metrics # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - picard: \$(echo \$(picard MarkDuplicates --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) -END_VERSIONS +text="${meta_functionality_name}: + picard: $(echo $(picard MarkDuplicates --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:)" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/preprocess_transcripts_fasta/config.vsh.yaml b/src/preprocess_transcripts_fasta/config.vsh.yaml index bf3d4d23..b40d1583 100644 --- a/src/preprocess_transcripts_fasta/config.vsh.yaml +++ b/src/preprocess_transcripts_fasta/config.vsh.yaml @@ -13,12 +13,20 @@ functionality: type: file required: true description: Path of transcripts FASTA file + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file direction: output required: true description: Path of processed output FASTA file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/preseq_lcextrap/config.vsh.yaml b/src/preseq_lcextrap/config.vsh.yaml index bd892cad..4045f69c 100644 --- a/src/preseq_lcextrap/config.vsh.yaml +++ b/src/preseq_lcextrap/config.vsh.yaml @@ -16,11 +16,19 @@ functionality: - name: "--paired" type: boolean description: Paired-end reads? + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file direction: output default: $id.lc_extrap.txt + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/preseq_lcextrap/script.sh b/src/preseq_lcextrap/script.sh index 6c69b900..26bacb7d 100644 --- a/src/preseq_lcextrap/script.sh +++ b/src/preseq_lcextrap/script.sh @@ -16,13 +16,13 @@ preseq lc_extrap \ -o $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//') -END_VERSIONS + +text="${meta_functionality_name}: + preseq: $(echo $(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/qualimap/config.vsh.yaml b/src/qualimap/config.vsh.yaml index 215a928d..a74927e3 100644 --- a/src/qualimap/config.vsh.yaml +++ b/src/qualimap/config.vsh.yaml @@ -19,6 +19,11 @@ functionality: required: true description: path to annotations file in Ensembl GTF format. + - name: "--versions" + type: file + must_exist: false + + - name: "--output_dir" direction: output type: file @@ -40,6 +45,11 @@ functionality: default: html description: Format of the output report (PDF or HTML, default is HTML) + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + - name: "--pr_bases" type: integer required: false diff --git a/src/qualimap/script.sh b/src/qualimap/script.sh index 0dcdfa0d..9773bec6 100644 --- a/src/qualimap/script.sh +++ b/src/qualimap/script.sh @@ -18,13 +18,13 @@ qualimap rnaseq \ -outformat $par_output_format # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - qualimap: \$(echo \$(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//') -END_VERSIONS + +text="${meta_functionality_name}: + qualimap: $(echo $(qualimap 2>&1) | sed 's/^.*QualiMap v.//; s/Built.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi diff --git a/src/rsem/prepare_reference/config.vsh.yaml b/src/rsem/prepare_reference/config.vsh.yaml index 0033efe1..edb14514 100644 --- a/src/rsem/prepare_reference/config.vsh.yaml +++ b/src/rsem/prepare_reference/config.vsh.yaml @@ -19,6 +19,10 @@ functionality: description: GTF file - name: "--star" type: boolean + - name: "--versions" + type: file + must_exist: false + - name: "--rsem" type: file @@ -28,6 +32,10 @@ functionality: type: file direction: output description: Fasta file of transcripts + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/rsem/prepare_reference/script.sh b/src/rsem/prepare_reference/script.sh index 92169f3a..2bcf1f0a 100755 --- a/src/rsem/prepare_reference/script.sh +++ b/src/rsem/prepare_reference/script.sh @@ -27,14 +27,14 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") -END_VERSIONS + +text="${meta_functionality_name}: + rsem: $(rsem-calculate-expression --version | sed -e 's/Current version: RSEM v//g) + star: $(STAR --version | sed -e "s/STAR_//g")" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/bamstat/config.vsh.yaml b/src/rseqc/bamstat/config.vsh.yaml index 6a3ea823..e3aece9b 100644 --- a/src/rseqc/bamstat/config.vsh.yaml +++ b/src/rseqc/bamstat/config.vsh.yaml @@ -21,6 +21,11 @@ functionality: default: 30 description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30. min: 0 + + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file @@ -28,6 +33,11 @@ functionality: required: false default: $id.mapping_quality.txt description: output file (txt) with mapping quality statistics + + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/rseqc/bamstat/script.sh b/src/rseqc/bamstat/script.sh index 912efc1e..9d2948c6 100644 --- a/src/rseqc/bamstat/script.sh +++ b/src/rseqc/bamstat/script.sh @@ -8,13 +8,13 @@ bam_stat.py \ > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(bam_stat.py --version | sed -e "s/bam_stat.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(bam_stat.py --version | sed -e 's/bam_stat.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/inferexperiment/config.vsh.yaml b/src/rseqc/inferexperiment/config.vsh.yaml index 5750314d..82b8b06e 100644 --- a/src/rseqc/inferexperiment/config.vsh.yaml +++ b/src/rseqc/inferexperiment/config.vsh.yaml @@ -33,6 +33,11 @@ functionality: default: 30 description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30. min: 0 + + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file @@ -41,6 +46,11 @@ functionality: default: $id.strandedness.txt description: output file (txt) of strandness report + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: bash_script path: script.sh diff --git a/src/rseqc/inferexperiment/script.sh b/src/rseqc/inferexperiment/script.sh index afc5c832..2a7f3278 100644 --- a/src/rseqc/inferexperiment/script.sh +++ b/src/rseqc/inferexperiment/script.sh @@ -10,13 +10,13 @@ infer_experiment.py \ > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(infer_experiment.py --version | sed -e "s/infer_experiment.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(infer_experiment.py --version | sed -e 's/infer_experiment.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/innerdistance/config.vsh.yaml b/src/rseqc/innerdistance/config.vsh.yaml index 1f42462e..83e98735 100644 --- a/src/rseqc/innerdistance/config.vsh.yaml +++ b/src/rseqc/innerdistance/config.vsh.yaml @@ -55,6 +55,11 @@ functionality: required: false default: 5 description: Step size (bp) of histograme. This option is used for plotting histogram, default=5. + + - name: "--versions" + type: file + must_exist: false + - name: "--output_stats" type: file @@ -96,6 +101,11 @@ functionality: default: $id.inner_distance_plot.r description: output file (R) with script of histogram plot of of inner distances of all paired reads + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: bash_script path: script.sh diff --git a/src/rseqc/innerdistance/script.sh b/src/rseqc/innerdistance/script.sh index 6f2cbcdf..a5f70992 100644 --- a/src/rseqc/innerdistance/script.sh +++ b/src/rseqc/innerdistance/script.sh @@ -26,13 +26,13 @@ if $par_paired; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(inner_distance.py --version | sed -e "s/inner_distance.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(inner_distance.py --version | sed -e 's/inner_distance.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/junctionannotation/config.vsh.yaml b/src/rseqc/junctionannotation/config.vsh.yaml index a60c6445..3a3fa8f1 100644 --- a/src/rseqc/junctionannotation/config.vsh.yaml +++ b/src/rseqc/junctionannotation/config.vsh.yaml @@ -33,6 +33,11 @@ functionality: default: 50 min: 1 description: Minimum intron length (bp), default = 50. + + - name: "--versions" + type: file + must_exist: false + - name: "--output_log" type: file @@ -83,6 +88,11 @@ functionality: default: $id.splice_junctions_plot.pdf description: plot of junctions (pdf) + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: bash_script path: script.sh diff --git a/src/rseqc/junctionannotation/script.sh b/src/rseqc/junctionannotation/script.sh index 422483e8..c3e022c8 100644 --- a/src/rseqc/junctionannotation/script.sh +++ b/src/rseqc/junctionannotation/script.sh @@ -20,13 +20,13 @@ mv $prefix.splice_events.pdf $par_output_splice_events_plot mv $prefix.splice_junction.pdf $par_output_splice_junctions_plot # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(junction_annotation.py --version | sed -e "s/junction_annotation.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(junction_annotation.py --version | sed -e 's/junction_annotation.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/junctionsaturation/config.vsh.yaml b/src/rseqc/junctionsaturation/config.vsh.yaml index 22ae03d2..6fe64a00 100644 --- a/src/rseqc/junctionsaturation/config.vsh.yaml +++ b/src/rseqc/junctionsaturation/config.vsh.yaml @@ -64,6 +64,11 @@ functionality: default: 30 description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30. min: 0 + + - name: "--versions" + type: file + must_exist: false + - name: "--output_plot_r" type: file @@ -78,10 +83,16 @@ functionality: required: false default: $id.junction_saturation_plot.pdf description: plot of junction saturation (pdf) + + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script path: script.sh + test_resources: - type: bash_script path: test.sh diff --git a/src/rseqc/junctionsaturation/script.sh b/src/rseqc/junctionsaturation/script.sh index 10c5f86a..267e5e25 100644 --- a/src/rseqc/junctionsaturation/script.sh +++ b/src/rseqc/junctionsaturation/script.sh @@ -19,13 +19,13 @@ mv $prefix.junctionSaturation_plot.pdf $par_output_plot mv $prefix.junctionSaturation_plot.r $par_output_plot_r # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(junction_saturation.py --version | sed -e "s/junction_saturation.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(junction_saturation.py --version | sed -e 's/junction_saturation.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/readdistribution/config.vsh.yaml b/src/rseqc/readdistribution/config.vsh.yaml index bb950a8e..d26ee10b 100644 --- a/src/rseqc/readdistribution/config.vsh.yaml +++ b/src/rseqc/readdistribution/config.vsh.yaml @@ -19,6 +19,11 @@ functionality: type: file required: true description: Reference gene model in bed format + + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file @@ -27,6 +32,11 @@ functionality: default: $id.read_distribution.txt description: output file (txt) of read distribution analysis. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: bash_script path: script.sh diff --git a/src/rseqc/readdistribution/script.sh b/src/rseqc/readdistribution/script.sh index c30089d8..7c39eaf7 100644 --- a/src/rseqc/readdistribution/script.sh +++ b/src/rseqc/readdistribution/script.sh @@ -8,13 +8,13 @@ read_distribution.py \ > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(read_distribution.py --version | sed -e "s/read_distribution.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(read_distribution.py --version | sed -e 's/read_distribution.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/readduplication/config.vsh.yaml b/src/rseqc/readduplication/config.vsh.yaml index 7cd8ebcc..3e3655de 100644 --- a/src/rseqc/readduplication/config.vsh.yaml +++ b/src/rseqc/readduplication/config.vsh.yaml @@ -28,6 +28,11 @@ functionality: default: 30 description: Minimum mapping quality (phred scaled) to determine uniquely mapped reads, default=30. min: 0 + + - name: "--versions" + type: file + must_exist: false + - name: "--output_duplication_rate_plot_r" type: file @@ -56,10 +61,16 @@ functionality: required: false default: $id.duplication_rate_sequencing.xls description: Summary of sequencing-based read duplication + + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script path: script.sh + test_resources: - type: bash_script path: test.sh diff --git a/src/rseqc/readduplication/script.sh b/src/rseqc/readduplication/script.sh index e093ce44..1e4b254d 100644 --- a/src/rseqc/readduplication/script.sh +++ b/src/rseqc/readduplication/script.sh @@ -16,13 +16,13 @@ mv $prefix.pos.DupRate.xls $par_output_duplication_rate_mapping mv $prefix.seq.DupRate.xls $par_output_duplication_rate_sequence # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(read_duplication.py --version | sed -e "s/read_duplication.py //g") -END_VERSIONS + +text="${meta_functionality_name}: + rseqc: $(read_duplication.py --version | sed -e 's/read_duplication.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/rseqc/tin/config.vsh.yaml b/src/rseqc/tin/config.vsh.yaml index 429737eb..e28fa09e 100644 --- a/src/rseqc/tin/config.vsh.yaml +++ b/src/rseqc/tin/config.vsh.yaml @@ -43,6 +43,11 @@ functionality: type: boolean_true description: Set flag to subtract background noise (estimated from intronic reads). Only use this option if there are substantial intronic reads. + - name: "--versions" + type: file + must_exist: false + + - name: "--output_tin_summary" type: file direction: output @@ -57,9 +62,15 @@ functionality: default: $id.tin.xls description: file with TIN metrics (xls) + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: bash_script path: script.sh + test_resources: - type: bash_script path: test.sh diff --git a/src/rseqc/tin/script.sh b/src/rseqc/tin/script.sh index 36a7999f..d0fab3e8 100644 --- a/src/rseqc/tin/script.sh +++ b/src/rseqc/tin/script.sh @@ -29,13 +29,12 @@ mv ${bam_file%.*}.tin.xls $par_output_tin clean_up # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - rseqc: \$(tin.py --version | sed -e "s/tin.py //g") -END_VERSIONS +text="${meta_functionality_name}: + rseqc: $(tin.py --version | sed -e 's/tin.py //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/salmon/index/config.vsh.yaml b/src/salmon/index/config.vsh.yaml index 1a088618..26e1086c 100644 --- a/src/salmon/index/config.vsh.yaml +++ b/src/salmon/index/config.vsh.yaml @@ -14,10 +14,18 @@ functionality: type: file - name: "--transcriptome_fasta" type: file + - name: "--versions" + type: file + must_exist: false + - name: "--salmon_index" type: file direction: output + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/salmon/index/script.sh b/src/salmon/index/script.sh index d293d651..f835f88a 100755 --- a/src/salmon/index/script.sh +++ b/src/salmon/index/script.sh @@ -20,13 +20,13 @@ salmon index \ -i $par_salmon_index # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g") -END_VERSIONS + +text="${meta_functionality_name}: + salmon: $(echo $(salmon --version) | sed -e 's/salmon //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/salmon/quant/config.vsh.yaml b/src/salmon/quant/config.vsh.yaml index 4808dd14..f6890296 100644 --- a/src/salmon/quant/config.vsh.yaml +++ b/src/salmon/quant/config.vsh.yaml @@ -41,6 +41,10 @@ functionality: type: string description: Extra arguments to pass to salmon quant command in addition to defaults defined by the pipeline. default: '' + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file @@ -52,6 +56,10 @@ functionality: direction: output description: File containing meta information from Salmon quant default: $id.$key.meta_info.json + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: @@ -61,10 +69,10 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/SRR6357073_1.fastq.gz - - path: testData/reference/salmon.tar.gz - - path: testData/reference/genes.gtf.gz - - path: testData/reference/transcriptome.fasta + - path: /testData/minimal_test/SRR6357073_1.fastq.gz + - path: /testData/reference/salmon.tar.gz + - path: /testData/reference/genes.gtf.gz + - path: /testData/reference/transcriptome.fasta platforms: - type: docker diff --git a/src/salmon/quant/script.sh b/src/salmon/quant/script.sh index 6dfd2926..73702e62 100755 --- a/src/salmon/quant/script.sh +++ b/src/salmon/quant/script.sh @@ -59,13 +59,12 @@ if [ -f "$par_output/aux_info/meta_info.json" ]; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g") -END_VERSIONS +text="${meta_functionality_name}: + salmon: $(echo $(salmon --version) | sed -e "s/salmon\ //g")" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/salmon/summarizedexperiment/config.vsh.yaml b/src/salmon/summarizedexperiment/config.vsh.yaml index 185069b1..0f7227a3 100644 --- a/src/salmon/summarizedexperiment/config.vsh.yaml +++ b/src/salmon/summarizedexperiment/config.vsh.yaml @@ -24,12 +24,20 @@ functionality: type: file - name: "--tx2gene_tsv" type: file + - name: "--versions" + type: file + must_exist: false + # Output - name: "--output" type: file direction: output default: salmon_merged_summarizedexperiment + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -40,13 +48,13 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/gene_counts_length_scaled.tsv - - path: testData/minimal_test/gene_counts_scaled.tsv - - path: testData/minimal_test/gene_counts.tsv - - path: testData/minimal_test/gene_tpm.tsv - - path: testData/minimal_test/transcript_counts.tsv - - path: testData/minimal_test/transcript_tpm.tsv - - path: testData/minimal_test/salmon_tx2gene.tsv + - path: /testData/minimal_test/gene_counts_length_scaled.tsv + - path: /testData/minimal_test/gene_counts_scaled.tsv + - path: /testData/minimal_test/gene_counts.tsv + - path: /testData/minimal_test/gene_tpm.tsv + - path: /testData/minimal_test/transcript_counts.tsv + - path: /testData/minimal_test/transcript_tpm.tsv + - path: /testData/minimal_test/salmon_tx2gene.tsv platforms: - type: docker diff --git a/src/salmon/summarizedexperiment/script.sh b/src/salmon/summarizedexperiment/script.sh index 88c1edf7..e17f24aa 100755 --- a/src/salmon/summarizedexperiment/script.sh +++ b/src/salmon/summarizedexperiment/script.sh @@ -18,14 +18,13 @@ mv ${par_counts_gene_scaled%.*}.rds $par_output/ mv ${par_counts_transcript%.*}.rds $par_output/ # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') - bioconductor-summarizedexperiment: \$(Rscript -e "library(SummarizedExperiment); cat(as.character(packageVersion('SummarizedExperiment')))") -END_VERSIONS +text="${meta_functionality_name}: + r-base: $(echo $(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + bioconductor-summarizedexperiment: $(Rscript -e 'library(SummarizedExperiment); cat(as.character(packageVersion('SummarizedExperiment')))')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/salmon/tx2gene/config.vsh.yaml b/src/salmon/tx2gene/config.vsh.yaml index db8749f5..e41e36cb 100644 --- a/src/salmon/tx2gene/config.vsh.yaml +++ b/src/salmon/tx2gene/config.vsh.yaml @@ -21,11 +21,19 @@ functionality: - name: "--gtf_group_features" type: string default: 'gene_id' + - name: "--versions" + type: file + must_exist: false + - name: "--tsv" type: file direction: output default: salmon_tx2gene.tsv + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -36,9 +44,9 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/reference/genes.gtf.gz - - path: testData/minimal_test/WT_REP1.salmon_quant - - path: testData/minimal_test/WT_REP2.salmon_quant + - path: /testData/reference/genes.gtf.gz + - path: /testData/minimal_test/WT_REP1.salmon_quant + - path: /testData/minimal_test/WT_REP2.salmon_quant platforms: - type: docker diff --git a/src/salmon/tx2gene/script.sh b/src/salmon/tx2gene/script.sh index 63ca9804..543e5716 100755 --- a/src/salmon/tx2gene/script.sh +++ b/src/salmon/tx2gene/script.sh @@ -23,13 +23,12 @@ python3 "$meta_resources_dir/salmon_tx2gene.py" \ -o $par_tsv # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - python: \$(python --version | sed 's/Python //g') -END_VERSIONS +text="${meta_functionality_name}: + python: $(python3 --version | sed 's/Python //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/salmon/tximport/config.vsh.yaml b/src/salmon/tximport/config.vsh.yaml index de117931..7d9d456d 100644 --- a/src/salmon/tximport/config.vsh.yaml +++ b/src/salmon/tximport/config.vsh.yaml @@ -15,6 +15,10 @@ functionality: multiple_sep: "," - name: "--tx2gene_tsv" type: file + - name: "--versions" + type: file + must_exist: false + # Output - name: "--tpm_gene" @@ -41,6 +45,10 @@ functionality: type: file direction: output default: salmon.merged.transcript_counts.tsv + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -51,9 +59,9 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/salmon_tx2gene.tsv - - path: testData/minimal_test/WT_REP1.salmon_quant - - path: testData/minimal_test/WT_REP2.salmon_quant + - path: /testData/minimal_test/salmon_tx2gene.tsv + - path: /testData/minimal_test/WT_REP1.salmon_quant + - path: /testData/minimal_test/WT_REP2.salmon_quant platforms: - type: docker diff --git a/src/salmon/tximport/script.sh b/src/salmon/tximport/script.sh index 40ee1b27..e199e594 100755 --- a/src/salmon/tximport/script.sh +++ b/src/salmon/tximport/script.sh @@ -18,14 +18,13 @@ done Rscript "$meta_resources_dir/salmon_tximport.r" NULL $salmon_tmpdir salmon.merged $par_tx2gene_tsv # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') - bioconductor-tximeta: \$(Rscript -e "library(tximeta); cat(as.character(packageVersion('tximeta')))") -END_VERSIONS +text="${meta_functionality_name}: + r-base: $(echo $(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//') + bioconductor-tximeta: $(Rscript -e 'library(tximeta); cat(as.character(packageVersion('tximeta')))')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/samtools/flagstat/config.vsh.yaml b/src/samtools/flagstat/config.vsh.yaml index 1dcb9a42..b151cb5d 100644 --- a/src/samtools/flagstat/config.vsh.yaml +++ b/src/samtools/flagstat/config.vsh.yaml @@ -16,12 +16,20 @@ functionality: - name: "--bai" type: file description: BAM index file. + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file description: File containing samtools stats output. direction: output default: $id.$key.flagstat + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -30,8 +38,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/mapt.NA12156.altex.bam - - path: testData/minimal_test/mapt.NA12156.altex.bam.bai + - path: /testData/minimal_test/mapt.NA12156.altex.bam + - path: /testData/minimal_test/mapt.NA12156.altex.bam.bai platforms: - type: nextflow diff --git a/src/samtools/flagstat/script.sh b/src/samtools/flagstat/script.sh index 12468512..6bb391ce 100755 --- a/src/samtools/flagstat/script.sh +++ b/src/samtools/flagstat/script.sh @@ -5,13 +5,12 @@ set -eo pipefail samtools flagstat --threads $meta_cpus $par_bam > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/samtools/idxstats/config.vsh.yaml b/src/samtools/idxstats/config.vsh.yaml index 54ec91ee..10ec8772 100644 --- a/src/samtools/idxstats/config.vsh.yaml +++ b/src/samtools/idxstats/config.vsh.yaml @@ -9,6 +9,7 @@ functionality: description: | Reports alignment summary statistics for a BAM file + arguments: - name: "--bam" type: file @@ -19,12 +20,20 @@ functionality: - name: "--fasta" type: file description: Reference file the CRAM was created with (optional). + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file description: File containing samtools stats output. direction: output default: $id.$key.idxstats + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -33,8 +42,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/mapt.NA12156.altex.bam - - path: testData/minimal_test/mapt.NA12156.altex.bam.bai + - path: /testData/minimal_test/mapt.NA12156.altex.bam + - path: /testData/minimal_test/mapt.NA12156.altex.bam.bai platforms: - type: nextflow diff --git a/src/samtools/idxstats/script.sh b/src/samtools/idxstats/script.sh index 67bd763a..159e0b7f 100755 --- a/src/samtools/idxstats/script.sh +++ b/src/samtools/idxstats/script.sh @@ -5,13 +5,12 @@ set -eo pipefail samtools idxstats --threads $meta_cpus $par_bam > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/samtools/index/config.vsh.yaml b/src/samtools/index/config.vsh.yaml index 38e07756..20233753 100644 --- a/src/samtools/index/config.vsh.yaml +++ b/src/samtools/index/config.vsh.yaml @@ -9,6 +9,7 @@ functionality: description: | Index BAM file. + arguments: # Inputs - name: "--input" @@ -17,6 +18,10 @@ functionality: - name: "--bam_csi_index" type: boolean description: Create a CSI index for BAM files instead of the traditional BAI index. This will be required for genomes with larger chromosome sizes. + - name: "--versions" + type: file + must_exist: false + # Output - name: "--output_bai" @@ -29,6 +34,10 @@ functionality: description: CSI index direction: output default: $id.$key.bam.csi + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -37,7 +46,7 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/mapt.NA12156.altex.bam + - path: /testData/minimal_test/mapt.NA12156.altex.bam platforms: - type: nextflow diff --git a/src/samtools/index/script.sh b/src/samtools/index/script.sh index 407c6c1f..ec436316 100755 --- a/src/samtools/index/script.sh +++ b/src/samtools/index/script.sh @@ -9,13 +9,12 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/samtools/sort/config.vsh.yaml b/src/samtools/sort/config.vsh.yaml index 56f6f5bb..2c5ee96c 100644 --- a/src/samtools/sort/config.vsh.yaml +++ b/src/samtools/sort/config.vsh.yaml @@ -6,19 +6,27 @@ functionality: git_repo: https://github.com/nf-core/rnaseq.git paths: [modules/nf-core/samtools/sort/main.nf, modules/nf-core/samtools/sort/meta.yml] last_sha: 88280ca1e495f0e1f0ec014635799c784f1f0ca3 - description: | Sort BAM file. + arguments: - name: "--input" type: file description: BAM input file. + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file description: Sorted BAM direction: output default: $id.$key.bam + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -27,7 +35,7 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/mapt.NA12156.altex.bam + - path: /testData/minimal_test/mapt.NA12156.altex.bam platforms: diff --git a/src/samtools/sort/script.sh b/src/samtools/sort/script.sh index 00bd3c11..a21ebd49 100755 --- a/src/samtools/sort/script.sh +++ b/src/samtools/sort/script.sh @@ -5,13 +5,12 @@ set -eo pipefail samtools sort -@ $meta_cpus -o $par_output $par_input # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/samtools/stats/config.vsh.yaml b/src/samtools/stats/config.vsh.yaml index 54e217d3..fd454eae 100644 --- a/src/samtools/stats/config.vsh.yaml +++ b/src/samtools/stats/config.vsh.yaml @@ -6,9 +6,9 @@ functionality: git_repo: https://github.com/nf-core/rnaseq.git paths: [modules/nf-core/samtools/stats/main.nf, modules/nf-core/samtools/stats/meta.yml] last_sha: 55398de6ab7577acfe9b1180016a93d7af7eb859 - description: | Produces comprehensive statistics from BAM file. + arguments: - name: "--bam" type: file @@ -19,12 +19,20 @@ functionality: - name: "--fasta" type: file description: Reference file the CRAM was created with (optional). + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file description: File containing samtools stats output. direction: output default: $id.$key.stats + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -33,8 +41,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/mapt.NA12156.altex.bam - - path: testData/minimal_test/mapt.NA12156.altex.bam.bai + - path: /testData/minimal_test/mapt.NA12156.altex.bam + - path: /testData/minimal_test/mapt.NA12156.altex.bam.bai platforms: - type: nextflow diff --git a/src/samtools/stats/script.sh b/src/samtools/stats/script.sh index d45be421..ba4fb3b1 100755 --- a/src/samtools/stats/script.sh +++ b/src/samtools/stats/script.sh @@ -11,13 +11,12 @@ fi samtools stats --threads $meta_cpus $reference $par_bam > $par_output # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/sortmerna/config.vsh.yaml b/src/sortmerna/config.vsh.yaml index 3211da82..4f51462e 100644 --- a/src/sortmerna/config.vsh.yaml +++ b/src/sortmerna/config.vsh.yaml @@ -20,6 +20,10 @@ functionality: - name: "--ribo_database_manifest" type: file description: Text file containing paths to fasta files (one per line) that will be used to create the database for SortMeRNA. + - name: "--versions" + type: file + must_exist: false + - name: "--sortmerna_log" type: file @@ -41,6 +45,10 @@ functionality: description: Output file for read 2. direction: output default: $id.$key.read2.fastq.gz + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -49,9 +57,9 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/SRR6357070_1.fastq.gz - - path: testData/minimal_test/SRR6357070_2.fastq.gz - - path: testData/reference/rrna-db-defaults.txt + - path: /testData/minimal_test/SRR6357070_1.fastq.gz + - path: /testData/minimal_test/SRR6357070_2.fastq.gz + - path: /testData/reference/rrna-db-defaults.txt platforms: diff --git a/src/sortmerna/script.sh b/src/sortmerna/script.sh index 2e7a7b28..d3bdae85 100755 --- a/src/sortmerna/script.sh +++ b/src/sortmerna/script.sh @@ -31,13 +31,12 @@ fi mv rRNA_reads.log $par_sortmerna_log # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + sortmerna: $(echo $(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/star/align/config.vsh.yaml b/src/star/align/config.vsh.yaml index 768d6080..6c9e04bb 100644 --- a/src/star/align/config.vsh.yaml +++ b/src/star/align/config.vsh.yaml @@ -42,6 +42,10 @@ functionality: type: string default: '' description: Extra arguments to pass to STAR alignment command in addition to defaults defined by the pipeline. + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file @@ -59,6 +63,10 @@ functionality: type: file direction: output default: $id.star_aligned.log.final.out + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -67,9 +75,9 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/SRR6357070_1.fastq.gz - - path: testData/minimal_test/SRR6357070_2.fastq.gz - - path: testData/reference/genes.gtf.gz + - path: /testData/minimal_test/SRR6357070_1.fastq.gz + - path: /testData/minimal_test/SRR6357070_2.fastq.gz + - path: /testData/reference/genes.gtf.gz platforms: - type: docker diff --git a/src/star/align/script.sh b/src/star/align/script.sh index ea1caa45..e2b24c9a 100755 --- a/src/star/align/script.sh +++ b/src/star/align/script.sh @@ -62,15 +62,14 @@ if [ -f "$par_output/Unmapped.out.mate2" ]; then fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') -END_VERSIONS +text="${meta_functionality_name}: + star: $(STAR --version | sed -e "s/STAR_//g") + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: $(echo $(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/star/genomegenerate/config.vsh.yaml b/src/star/genomegenerate/config.vsh.yaml index 70b60b08..e3bb5c11 100644 --- a/src/star/genomegenerate/config.vsh.yaml +++ b/src/star/genomegenerate/config.vsh.yaml @@ -17,11 +17,19 @@ functionality: - name: "--gtf" type: file description: GTF file + - name: "--versions" + type: file + must_exist: false + - name: "--star_index" type: file direction: output description: STAR index directory. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -30,8 +38,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/reference/genes.gtf.gz - - path: testData/reference/genome.fasta + - path: /testData/reference/genes.gtf.gz + - path: /testData/reference/genome.fasta platforms: - type: docker diff --git a/src/star/genomegenerate/script.sh b/src/star/genomegenerate/script.sh index dacfcf09..17525e32 100644 --- a/src/star/genomegenerate/script.sh +++ b/src/star/genomegenerate/script.sh @@ -8,15 +8,14 @@ mkdir $par_star_index STAR --runMode genomeGenerate --genomeDir $par_star_index --genomeFastaFiles $par_fasta --sjdbGTFfile $par_gtf --runThreadN $meta_cpus --genomeSAindexNbases $NUM_BASES # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') -END_VERSIONS +text="${meta_functionality_name}: + star: $(STAR --version | sed -e "s/STAR_//g") + samtools: $(echo $(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + gawk: $(echo $(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/stringtie/config.vsh.yaml b/src/stringtie/config.vsh.yaml index 5d5677aa..a89c34d0 100644 --- a/src/stringtie/config.vsh.yaml +++ b/src/stringtie/config.vsh.yaml @@ -24,6 +24,10 @@ functionality: - name: "--stringtie_ignore_gtf" type: boolean description: Perform reference-guided de novo assembly of transcripts using StringTie, i.e. don't restrict to those in GTF file. + - name: "--versions" + type: file + must_exist: false + # Output - name: "--transcript_gtf" @@ -43,6 +47,10 @@ functionality: description: for running ballgown default: $id.$key.ballgown direction: output + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -51,8 +59,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/reference/genes.gtf.gz - - path: testData/minimal_test/test.bam # add test BAM file + - path: /testData/reference/genes.gtf.gz + - path: /testData/minimal_test/test.bam # add test BAM file platforms: - type: docker diff --git a/src/stringtie/script.sh b/src/stringtie/script.sh index c848e3cd..69f66441 100644 --- a/src/stringtie/script.sh +++ b/src/stringtie/script.sh @@ -25,13 +25,12 @@ mv ballgown $par_ballgown mv abundance.txt $par_abundance # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - stringtie: \$(stringtie --version 2>&1) -END_VERSIONS +text="${meta_functionality_name}: + stringtie: $(stringtie --version 2>&1)" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/subread_featurecounts/config.vsh.yaml b/src/subread_featurecounts/config.vsh.yaml index c1c5a206..ca0d6765 100644 --- a/src/subread_featurecounts/config.vsh.yaml +++ b/src/subread_featurecounts/config.vsh.yaml @@ -34,6 +34,10 @@ functionality: - name: "--gencode" type: boolean description: Specify if the GTF annotation is in GENCODE format. + - name: "--versions" + type: file + must_exist: false + - name: "--counts" type: file @@ -45,6 +49,10 @@ functionality: direction: output description: Summary log file default: $id.featureCounts.txt.summary + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -53,8 +61,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/reference/genes.gtf.gz - - path: testData/minimal_test/test.bam # add test BAM file + - path: /testData/reference/genes.gtf.gz + - path: /testData/minimal_test/test.bam # add test BAM file platforms: - type: docker diff --git a/src/subread_featurecounts/script.sh b/src/subread_featurecounts/script.sh index 9f280dba..788b97cf 100644 --- a/src/subread_featurecounts/script.sh +++ b/src/subread_featurecounts/script.sh @@ -32,13 +32,12 @@ featureCounts \ $par_bam # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - subread: \$( echo \$(featureCounts -v 2>&1) | sed -e "s/featureCounts v//g") -END_VERSIONS +text="${meta_functionality_name}: + subread: $( echo $(featureCounts -v 2>&1) | sed -e 's/featureCounts v//g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/trimgalore/config.vsh.yaml b/src/trimgalore/config.vsh.yaml index cc34edb6..a05f0b4c 100644 --- a/src/trimgalore/config.vsh.yaml +++ b/src/trimgalore/config.vsh.yaml @@ -22,6 +22,10 @@ functionality: example: sample.fastq multiple: true multiple_sep: "," + - name: "--versions" + type: file + must_exist: false + # Outputs - name: "--fastq_1" @@ -67,6 +71,10 @@ functionality: required: false must_exist: false default: $id.$key.read2.fastqc.zip + - name: "--updated_versions" + type: file + default: versions.yml + direction: output # Optional arguments - name: "--extra_trimgalore_args" diff --git a/src/trimgalore/script.sh b/src/trimgalore/script.sh index 7f627bc1..d3984c7c 100755 --- a/src/trimgalore/script.sh +++ b/src/trimgalore/script.sh @@ -57,14 +57,13 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') - cutadapt: \$(cutadapt --version) -END_VERSIONS +text="${meta_functionality_name}: + trimgalore: $(echo $(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') + cutadapt: $(cutadapt --version)" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/ucsc/bedclip/config.vsh.yaml b/src/ucsc/bedclip/config.vsh.yaml index e8bfc093..8595fc9a 100644 --- a/src/ucsc/bedclip/config.vsh.yaml +++ b/src/ucsc/bedclip/config.vsh.yaml @@ -15,12 +15,20 @@ functionality: - name: "--sizes" type: file description: File with chromosome sizes + - name: "--versions" + type: file + must_exist: false + - name: "--output_bedgraph" type: file direction: output description: bedGraph file after clipping default: $id.$key.bedgraph + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -29,8 +37,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/test.bedgraph - - path: testData/minimal_test/chrom_sizes + - path: /testData/minimal_test/test.bedgraph + - path: /testData/minimal_test/chrom_sizes platforms: diff --git a/src/ucsc/bedclip/script.sh b/src/ucsc/bedclip/script.sh index 0ac3ad8c..6e30638d 100644 --- a/src/ucsc/bedclip/script.sh +++ b/src/ucsc/bedclip/script.sh @@ -5,13 +5,12 @@ set -eo pipefail bedClip $par_input_bedgraph $par_sizes $par_output_bedgraph # # Version -# read -r -d '' text <<- END_VERSIONS -# "${meta_functionality_name}": -# ucsc: version? -# END_VERSIONS +# text="${meta_functionality_name}: +# ucsc: version?" # if [ -e "$par_versions" ]; then # echo "$text" >> "$par_versions" + # mv "$par_versions" "$par_updated_versions" # else -# echo "$text" > "$par_versions" +# echo "$text" > "$par_updated_versions" # fi \ No newline at end of file diff --git a/src/ucsc/bedgraphtobigwig/config.vsh.yaml b/src/ucsc/bedgraphtobigwig/config.vsh.yaml index 0e0a249f..79f868f1 100644 --- a/src/ucsc/bedgraphtobigwig/config.vsh.yaml +++ b/src/ucsc/bedgraphtobigwig/config.vsh.yaml @@ -15,12 +15,20 @@ functionality: - name: "--sizes" type: file description: File with chromosome sizes + - name: "--versions" + type: file + must_exist: false + - name: "--bigwig" type: file direction: output description: bigWig coverage file relative to genes on the input file default: $id.$key.bigwig + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -29,8 +37,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/test.bedgraph - - path: testData/minimal_test/chrom_sizes + - path: /testData/minimal_test/test.bedgraph + - path: /testData/minimal_test/chrom_sizes platforms: - type: docker diff --git a/src/ucsc/bedgraphtobigwig/script.sh b/src/ucsc/bedgraphtobigwig/script.sh index 0ae18ab4..7b3bf42d 100644 --- a/src/ucsc/bedgraphtobigwig/script.sh +++ b/src/ucsc/bedgraphtobigwig/script.sh @@ -5,13 +5,12 @@ set -eo pipefail bedGraphToBigWig $par_bedgraph $par_sizes $par_bigwig # # Version -# read -r -d '' text <<- END_VERSIONS -# "${meta_functionality_name}": -# ucsc: version? -# END_VERSIONS +# text="${meta_functionality_name}: +# ucsc: version?"" # if [ -e "$par_versions" ]; then # echo "$text" >> "$par_versions" + # mv "$par_versions" "$par_updated_versions" # else -# echo "$text" > "$par_versions" +# echo "$text" > "$par_updated_versions" # fi \ No newline at end of file diff --git a/src/umitools/dedup/config.vsh.yaml b/src/umitools/dedup/config.vsh.yaml index 028a7c95..5d91edfc 100644 --- a/src/umitools/dedup/config.vsh.yaml +++ b/src/umitools/dedup/config.vsh.yaml @@ -24,6 +24,10 @@ functionality: - name: "--get_output_stats" type: boolean description: Whether or not to generate output stats. + - name: "--versions" + type: file + must_exist: false + # Outputs - name: "--output_bam" @@ -35,6 +39,10 @@ functionality: type: file description: Directory containing UMI based dedupllication statistics files default: $id.umi_dedup.stats + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -43,8 +51,8 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/test.bam - - path: testData/minimal_test/test.bam.bai + - path: /testData/minimal_test/test.bam + - path: /testData/minimal_test/test.bam.bai platforms: - type: docker diff --git a/src/umitools/dedup/script.sh b/src/umitools/dedup/script.sh index 29169cc1..9d0263e2 100755 --- a/src/umitools/dedup/script.sh +++ b/src/umitools/dedup/script.sh @@ -21,13 +21,12 @@ fi PYTHONHASHSEED=0 umi_tools dedup -I $par_bam -S $par_output_bam $stats $paired $args # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') -END_VERSIONS +text="${meta_functionality_name}: + umitools: $(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/umitools/extract/config.vsh.yaml b/src/umitools/extract/config.vsh.yaml index 590f82f7..e03ebb9a 100644 --- a/src/umitools/extract/config.vsh.yaml +++ b/src/umitools/extract/config.vsh.yaml @@ -30,6 +30,10 @@ functionality: description: "The UMI barcode pattern to use e.g. 'NNNNNN' indicates that the first 6 nucleotides of the read are from the UMI." multiple: true multiple_sep: "," + - name: "--versions" + type: file + must_exist: false + # Outputs - name: "--fastq_1" @@ -45,6 +49,10 @@ functionality: description: Output file for read 2. direction: output default: $id.$key.read2.fastq.gz + - name: "--updated_versions" + type: file + default: versions.yml + direction: output # Optional arguments - name: "--umitools_extract_method" diff --git a/src/umitools/extract/script.sh b/src/umitools/extract/script.sh index 11248fdf..4ff61343 100755 --- a/src/umitools/extract/script.sh +++ b/src/umitools/extract/script.sh @@ -59,13 +59,12 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - umitools: \$(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//') -END_VERSIONS +text="${meta_functionality_name}: + umitools: $(umi_tools --version 2>&1 | sed 's/^.*UMI-tools version://; s/ *\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/umitools_prepareforquant/config.vsh.yaml b/src/umitools_prepareforquant/config.vsh.yaml index f265ce69..c545fac9 100644 --- a/src/umitools_prepareforquant/config.vsh.yaml +++ b/src/umitools_prepareforquant/config.vsh.yaml @@ -10,6 +10,11 @@ functionality: arguments: - name: "--bam" type: file + - name: "--versions" + type: file + must_exist: false + + - name: "--output" type: file direction: output @@ -18,6 +23,10 @@ functionality: type: file direction: output default: $id.$key.log + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script @@ -28,7 +37,7 @@ functionality: test_resources: - type: bash_script path: test.sh - - path: testData/minimal_test/test.bam + - path: /testData/minimal_test/test.bam platforms: - type: docker diff --git a/src/umitools_prepareforquant/script.sh b/src/umitools_prepareforquant/script.sh index 51608b9c..239a2504 100755 --- a/src/umitools_prepareforquant/script.sh +++ b/src/umitools_prepareforquant/script.sh @@ -8,13 +8,12 @@ python3 "$meta_resources_dir/prepare-for-rsem.py" \ --log=$par_log # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - python: \$(python --version | sed 's/Python //g') -END_VERSIONS +text="${meta_functionality_name}: + python: $(python3 --version | sed 's/Python //g')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/untar/config.vsh.yaml b/src/untar/config.vsh.yaml index 44b7a0dc..80e4e3b6 100644 --- a/src/untar/config.vsh.yaml +++ b/src/untar/config.vsh.yaml @@ -12,11 +12,19 @@ functionality: - name: "--input" type: file description: Path of file to be decompressed + - name: "--versions" + type: file + must_exist: false + - name: "--output" type: file direction: output description: Directory containing contents of decompressed file. + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: bash_script diff --git a/src/untar/script.sh b/src/untar/script.sh index fff6b16b..b98fe75b 100755 --- a/src/untar/script.sh +++ b/src/untar/script.sh @@ -17,13 +17,12 @@ else fi # Version -read -r -d '' text <<- END_VERSIONS -"${meta_functionality_name}": - untar: \$(echo \$(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//') -END_VERSIONS +text="${meta_functionality_name}: + untar: $(echo $(tar --version 2>&1) | sed 's/^.*(GNU tar) //; s/ Copyright.*\$//')" if [ -e "$par_versions" ]; then echo "$text" >> "$par_versions" + mv "$par_versions" "$par_updated_versions" else - echo "$text" > "$par_versions" + echo "$text" > "$par_updated_versions" fi \ No newline at end of file diff --git a/src/workflows/genome_alignment_and_quant/config.vsh.yaml b/src/workflows/genome_alignment_and_quant/config.vsh.yaml index 49780c88..97347705 100644 --- a/src/workflows/genome_alignment_and_quant/config.vsh.yaml +++ b/src/workflows/genome_alignment_and_quant/config.vsh.yaml @@ -77,8 +77,8 @@ functionality: description: By default, the pipeline uses the gene_name field to obtain additional gene identifiers from the input GTF file when running Salmon. - name: "--versions" type: file - default: versions.yml - + must_exist: false + # Output - name: "--star_alignment" type: file @@ -132,6 +132,10 @@ functionality: type: file direction: output default: $id.salmon_quant + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: nextflow_script diff --git a/src/workflows/genome_alignment_and_quant/main.nf b/src/workflows/genome_alignment_and_quant/main.nf index 4d01cd08..e54a40c4 100644 --- a/src/workflows/genome_alignment_and_quant/main.nf +++ b/src/workflows/genome_alignment_and_quant/main.nf @@ -17,13 +17,15 @@ workflow run_wf { "extra_star_align_args", "seq_platform", "seq_center", - "star_ignore_sjdbgtf" + "star_ignore_sjdbgtf", + "versions" ], toState: [ "star_alignment": "output", "genome_bam": "star_align_bam", "transcriptome_bam": "star_align_bam_transcriptome", - "star_multiqc": "log_final" + "star_multiqc": "log_final", + "versions": "updated_versions" ] ) @@ -35,11 +37,13 @@ workflow run_wf { | samtools_index.run ( fromState: [ "input": "genome_bam_sorted", - "bam_csi_index": "bam_csi_index" + "bam_csi_index": "bam_csi_index", + "versions": "versions" ], toState: [ "genome_bam_bai": "output_bai", - "genome_bam_csi": "output_csi" + "genome_bam_csi": "output_csi", + "versions": "updated_versions" ], key: "genome_sorted" ) @@ -51,44 +55,64 @@ workflow run_wf { fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_stats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_stats": "output"], key: "genome_stats" ) | samtools_flagstat.run ( fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_flagstat": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_flagstat": "output"], key: "genome_flagstat" ) | samtools_idxstats.run( fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_idxstats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_idxstats": "output"], key: "genome_idxstats" ) // TRANSCRIPTOME BAM | samtools_sort.run ( - fromState: ["input": "transcriptome_bam"], - toState: ["transcriptome_bam_sorted": "output"], + fromState: [ + "input": "transcriptome_bam", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_sorted": "output", + "versions": "updated_versions" + ], key: "transcriptome_sorted" ) | samtools_index.run ( fromState: [ "input": "transcriptome_bam_sorted", - "bam_csi_index": "bam_csi_index" + "bam_csi_index": "bam_csi_index", + "versions": "versions" ], toState: [ "transcriptome_bam_bai": "output_bai", - "transcriptome_bam_csi": "output_csi" + "transcriptome_bam_csi": "output_csi", + "versions": "updated_versions" ], key: "transcriptome_sorted", ) @@ -99,25 +123,37 @@ workflow run_wf { | samtools_stats.run ( fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_stats": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_stats": "output"], key: "transcriptome_stats" ) | samtools_flagstat.run ( fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_flagstat": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_flagstat": "output"], key: "transcriptome_flagstat" ) | samtools_idxstats.run( fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_idxstats": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_idxstats": "output"], key: "transcriptome_idxstats" ) @@ -132,20 +168,26 @@ workflow run_wf { "paired": "paired", "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "get_output_stats": "umi_dedup_stats" + "get_output_stats": "umi_dedup_stats", + "versions": "versions" + ], + toState: [ + "genome_bam_sorted": "output_bam", + "versions": "updated_versions" ], - toState: ["genome_bam_sorted": "output_bam"], key: "genome_deduped" ) | samtools_index.run ( runIf: { id, state -> state.with_umi }, fromState: [ "input": "genome_bam_sorted", - "bam_csi_index": "bam_csi_index" + "bam_csi_index": "bam_csi_index", + "versions": "versions" ], toState: [ "genome_bam_bai": "output_bai", - "genome_bam_csi": "output_csi" + "genome_bam_csi": "output_csi", + "versions": "updated_versions" ], key: "genome_deduped" ) @@ -158,9 +200,13 @@ workflow run_wf { fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_stats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_stats": "output"], key: "genome_deduped_stats" ) | samtools_flagstat.run ( @@ -168,9 +214,13 @@ workflow run_wf { fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_flagstat": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_flagstat": "output"], key: "genome_deduped_flagstat" ) | samtools_idxstats.run( @@ -178,9 +228,13 @@ workflow run_wf { fromState: [ "bam": "genome_bam_sorted", "bai": "genome_bam_index", - "fasta": "fasta" + "fasta": "fasta", + "versions": "versions" + ], + toState: [ + "genome_bam_idxstats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_idxstats": "output"], key: "genome_deduped_idxstats" ) @@ -191,26 +245,38 @@ workflow run_wf { "paired": "paired", "bam": "transcriptome_bam_sorted", "bai": "transcriptome_bam_index", - "get_output_stats": "umi_dedup_stats" + "get_output_stats": "umi_dedup_stats", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_deduped": "output_bam", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_deduped": "output_bam"], key: "transcriptome_deduped" ) | samtools_sort.run ( runIf: { id, state -> state.with_umi }, - fromState: ["input": "transcriptome_bam_deduped"], - toState: ["transcriptome_bam_sorted": "output"], + fromState: [ + "input": "transcriptome_bam_deduped", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_sorted": "output", + "versions": "updated_versions" + ], key: "transcriptome_deduped_sorted" ) | samtools_index.run ( runIf: { id, state -> state.with_umi }, fromState: [ "input": "transcriptome_bam_sorted", - "bam_csi_index": "bam_csi_index" + "bam_csi_index": "bam_csi_index", + "versions": "versions" ], toState: [ "transcriptome_bam_bai": "output_bai", - "transcriptome_bam_csi": "output_csi" + "transcriptome_bam_csi": "output_csi", + "versions": "updated_versions" ], key: "transcriptome_deduped_sorted", ) @@ -222,35 +288,53 @@ workflow run_wf { runIf: { id, state -> state.with_umi }, fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_stats": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_stats": "output"], key: "transcriptome_deduped_stats" ) | samtools_flagstat.run ( runIf: { id, state -> state.with_umi }, fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_flagstat": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_flagstat": "output"], key: "transcriptome_deduped_flagstat" ) | samtools_idxstats.run( runIf: { id, state -> state.with_umi }, fromState: [ "bam": "transcriptome_bam_sorted", - "bai": "transcriptome_bam_index" + "bai": "transcriptome_bam_index", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_idxstats": "output", + "versions": "updated_versions" ], - toState: ["transcriptome_bam_idxstats": "output"], key: "transcriptome_deduped_idxstats" ) // Fix paired-end reads in name sorted BAM file | umitools_prepareforquant.run ( runIf: {id, state -> state.with_umi && state.paired}, - fromState: ["bam": "transcriptome_bam_sorted"], - toState: ["transcriptome_bam_sorted": "output"] + fromState: [ + "bam": "transcriptome_bam_sorted", + "versions": "versions" + ], + toState: [ + "transcriptome_bam_sorted": "output", + "versions": "updated_versions" + ] ) // Count reads from BAM alignments using Salmon @@ -261,9 +345,13 @@ workflow run_wf { "input": "transcriptome_bam_sorted", "transcript_fasta": "transcript_fasta", "gtf": "gtf", + "versions": "versions" ], args: ["alignment_mode": true], - toState: ["salmon_quant_results": "output"] + toState: [ + "salmon_quant_results": "output", + "versions": "updated_versions" + ] ) | setState ( @@ -279,7 +367,8 @@ workflow run_wf { "transcriptome_bam_stats": "transcriptome_bam_stats", "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", - "salmon_quant_results": "salmon_quant_results" ] + "salmon_quant_results": "salmon_quant_results", + "updated_versions": "versions" ] ) emit: diff --git a/src/workflows/post_processing/config.vsh.yaml b/src/workflows/post_processing/config.vsh.yaml index 02fd0bcc..bfaabb73 100644 --- a/src/workflows/post_processing/config.vsh.yaml +++ b/src/workflows/post_processing/config.vsh.yaml @@ -76,7 +76,7 @@ functionality: type: boolean - name: "--versions" type: file - default: versions.yml + must_exist: false - name: "Output" arguments: @@ -136,6 +136,10 @@ functionality: type: file direction: output default: $id.reverse.bigwig + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: nextflow_script diff --git a/src/workflows/post_processing/main.nf b/src/workflows/post_processing/main.nf index 9565b802..e214ffb3 100644 --- a/src/workflows/post_processing/main.nf +++ b/src/workflows/post_processing/main.nf @@ -13,30 +13,38 @@ workflow run_wf { "bam": "genome_bam", "fasta": "fasta", "fai": "fai", - "extra_picard_args": "extra_picard_args" + "extra_picard_args": "extra_picard_args", + "versions": "versions" ], toState: [ "genome_bam": "output_bam", - "markduplicates_metrics": "metrics" + "markduplicates_metrics": "metrics", + "versions": "updated_versions" ] ) | samtools_sort.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ "input": "genome_bam", + "versions": "versions" + ], + toState: [ + "genome_bam": "output", + "versions": "updated_versions" ], - toState: [ "genome_bam": "output" ], key: "genome_sorted_MarkDuplicates" ) | samtools_index.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ "input": "genome_bam", - "bam_csi_index": "bam_csi_index" + "bam_csi_index": "bam_csi_index", + "versions": "versions" ], toState: [ "genome_bam_bai": "output_bai", - "genome_bam_csi": "output_csi" + "genome_bam_csi": "output_csi", + "versions": "updated_versions" ], key: "genome_sorted_MarkDuplicates", ) @@ -48,27 +56,39 @@ workflow run_wf { runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ "bam": "genome_bam", - "bai": "genome_bam_index" + "bai": "genome_bam_index", + "versions": "versions" + ], + toState: [ + "genome_bam_stats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_stats": "output"], key: "MarkDuplicates_stats" ) | samtools_flagstat.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ "bam": "genome_bam", - "bai": "genome_bam_index" + "bai": "genome_bam_index", + "versions": "versions" + ], + toState: [ + "genome_bam_flagstat": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_flagstat": "output"], key: "MarkDuplicates_flagstat" ) | samtools_idxstats.run( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ "bam": "genome_bam", - "bai": "genome_bam_index" + "bai": "genome_bam_index", + "versions": "versions" + ], + toState: [ + "genome_bam_idxstats": "output", + "versions": "updated_versions" ], - toState: ["genome_bam_idxstats": "output"], key: "MarkDuplicates_idxstats" ) @@ -78,13 +98,15 @@ workflow run_wf { "strandedness": "strandedness", "bam": "genome_bam", "annotation_gtf": "gtf", - "extra_stringtie_args": "extra_stringtie_args" + "extra_stringtie_args": "extra_stringtie_args", + "versions": "versions" ], toState: [ "stringtie_transcript_gtf": "transcript_gtf", "stringtie_coverage_gtf": "coverage_gtf", "stringtie_abundance": "abundance", - "stringtie_ballgown": "ballgown" + "stringtie_ballgown": "ballgown", + "versions": "updated_versions" ] ) @@ -95,11 +117,13 @@ workflow run_wf { fromState: [ "strandedness": "strandedness", "bam": "genome_bam", - "extra_bedtools_args": "extra_bedtools_args" + "extra_bedtools_args": "extra_bedtools_args", + "versions": "versions" ], toState: [ "bedgraph_forward": "bedgraph_forward", - "bedgraph_reverse": "bedgraph_reverse" + "bedgraph_reverse": "bedgraph_reverse", + "versions": "updated_versions" ] ) @@ -107,9 +131,13 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "input_bedgraph": "bedgraph_forward", - "sizes": "chrom_sizes" + "sizes": "chrom_sizes" + // "versions": "versions" ], - toState: [ "bedgraph_forward": "output_bedgraph" ], + toState: [ + "bedgraph_forward": "output_bedgraph" + // "versions": "updated_versions" + ], key: "bedclip_forward" ) @@ -117,9 +145,13 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "bedgraph": "bedgraph_forward", - "sizes": "chrom_sizes" + "sizes": "chrom_sizes" + // "versions": "versions" ], - toState: [ "bigwig_forward": "bigwig" ], + toState: [ + "bigwig_forward": "bigwig" + // "versions": "updated_versions" + ], key: "bedgraphtobigwig_forward" ) @@ -127,9 +159,13 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "input_bedgraph": "bedgraph_reverse", - "sizes": "chrom_sizes" + "sizes": "chrom_sizes", + // "versions": "updated_versions" ], - toState: [ "bedgraph_reverse": "output_bedgraph" ], + toState: [ + "bedgraph_reverse": "output_bedgraph" + // "versions": "updated_versions" + ], key: "bedclip_reverse" ) @@ -137,9 +173,13 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "bedgraph": "bedgraph_reverse", - "sizes": "chrom_sizes" + "sizes": "chrom_sizes" + // "versions": "updated_versions" ], - toState: [ "bigwig_reverse": "bigwig" ], + toState: [ + "bigwig_reverse": "bigwig" + // "versions": "updated_versions" + ], key: "bedgraphtobigwig_reverse" ) @@ -157,7 +197,8 @@ workflow run_wf { "bedgraph_forward": "bedgraph_forward", "bedgraph_reverse": "bedgraph_reverse", "bigwig_forward": "bigwig_forward", - "bigwig_reverse": "bigwig_reverse" + "bigwig_reverse": "bigwig_reverse", + "updated_versions": "versions" ) emit: diff --git a/src/workflows/pre_processing/config.vsh.yaml b/src/workflows/pre_processing/config.vsh.yaml index 30fad533..4a2f0d76 100644 --- a/src/workflows/pre_processing/config.vsh.yaml +++ b/src/workflows/pre_processing/config.vsh.yaml @@ -156,7 +156,8 @@ functionality: description: Extra arguments to pass to fq subsample command in addition to defaults defined by the pipeline. - name: "--versions" type: file - default: versions.yml + must_exist: false + - name: "Output" arguments: @@ -250,7 +251,10 @@ functionality: direction: output description: File containing meta information from Salmon quant default: $id.salmon_meta_info.json - + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: nextflow_script diff --git a/src/workflows/pre_processing/main.nf b/src/workflows/pre_processing/main.nf index f9c6c4f9..9afe6ac8 100644 --- a/src/workflows/pre_processing/main.nf +++ b/src/workflows/pre_processing/main.nf @@ -17,11 +17,13 @@ workflow run_wf { runIf: { id, state -> state.strandedness == 'auto' }, fromState: [ "input": "input", - "extra_args": "extra_fq_subsample_args" + "extra_args": "extra_fq_subsample_args", + "versions": "versions" ], toState: [ "subsampled_fastq_1": "output_1", - "subsampled_fastq_2": "output_2" + "subsampled_fastq_2": "output_2", + "versions": "updated_versions" ] ) @@ -34,17 +36,19 @@ workflow run_wf { input: input, transcript_fasta: state.transcript_fasta, gtf: state.gtf, - salmon_index: state.salmon_index ] + salmon_index: state.salmon_index, + versions: state.versions ] }, - args: [ - "alignment_mode": false, - "lib_type": "A", - "extra_salmon_quant_args": "--skipQuant" - ], - toState: [ - "salmon_quant_output": "output", - "salmon_json_info": "json_info" - ] + args: [ + "alignment_mode": false, + "lib_type": "A", + "extra_salmon_quant_args": "--skipQuant" + ], + toState: [ + "salmon_quant_output": "output", + "salmon_json_info": "json_info", + "versions": "updated_versions" + ] ) // Perform QC on input fastq files @@ -53,13 +57,15 @@ workflow run_wf { fromState: { id, state -> def input = state.paired ? [ state.fastq_1, state.fastq_2 ] : [ state.fastq_1 ] [ paired: state.paired, - input: input ] + input: input, + versions: state.versions ] }, toState: [ "fastqc_html_1": "fastqc_html_1", "fastqc_html_2": "fastqc_html_2", "fastqc_zip_1": "fastqc_zip_1", - "fastqc_zip_2": "fastqc_zip_2" + "fastqc_zip_2": "fastqc_zip_2", + "versions": "updated_versions" ] ) @@ -72,11 +78,13 @@ workflow run_wf { [ paired: state.paired, input: input, bc_pattern: bc_pattern, - umi_discard_read: state.umi_discard_read ] + umi_discard_read: state.umi_discard_read, + versions: state.versions ] }, toState: [ "fastq_1": "fastq_1", - "fastq_2": "fastq_2" + "fastq_2": "fastq_2", + "versions": "updated_versions" ] ) @@ -99,7 +107,8 @@ workflow run_wf { [ paired: state.paired, input: input, extra_trimgalore_args: state.extra_trimgalore_args, - min_trimmed_reads: state.min_trimmed_reads ] + min_trimmed_reads: state.min_trimmed_reads, + versions: state.versions ] }, toState: [ "fastq_1": "fastq_1", @@ -109,7 +118,8 @@ workflow run_wf { "trim_zip_1": "trim_zip_1", "trim_zip_2": "trim_zip_2", "trim_html_1": "trim_html_1", - "trim_html_2": "trim_html_2" + "trim_html_2": "trim_html_2", + "versions": "updated_versions" ] ) @@ -139,12 +149,15 @@ workflow run_wf { def input = state.paired ? [ state.fastq_1, state.fastq_2 ] : [ state.fastq_1 ] [ paired: state.paired, input: input, - ribo_database_manifest: state.ribo_database_manifest ] + ribo_database_manifest: state.ribo_database_manifest, + versions: state.versions ] }, toState: [ "fastq_1": "fastq_1", "fastq_2": "fastq_2", - "sortmerna_log": "sortmerna_log" ] + "sortmerna_log": "sortmerna_log", + "versions": "updated_versions" + ] ) | map { id, state -> @@ -168,7 +181,8 @@ workflow run_wf { "trim_html_1": "trim_html_1", "trim_html_2": "trim_html_2", "sortmerna_log": "sortmerna_log", - "salmon_json_info": "salmon_json_info" + "salmon_json_info": "salmon_json_info", + "updated_versions": "versions" ) emit: diff --git a/src/workflows/prepare_genome/config.vsh.yaml b/src/workflows/prepare_genome/config.vsh.yaml index 15a84184..47f28db7 100644 --- a/src/workflows/prepare_genome/config.vsh.yaml +++ b/src/workflows/prepare_genome/config.vsh.yaml @@ -61,8 +61,8 @@ functionality: description: Biotype value to use while appending entries to GTF file when additional fasta file is provided. - name: "--versions" type: file - default: versions.yml - + must_exist: false + - name: "Output" arguments: - name: "--fasta_uncompressed" @@ -114,6 +114,10 @@ functionality: description: FASTA index file direction: output default: reference_genome.fasta.fai + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: nextflow_script diff --git a/src/workflows/prepare_genome/main.nf b/src/workflows/prepare_genome/main.nf index 6ce49e60..5499f5d6 100644 --- a/src/workflows/prepare_genome/main.nf +++ b/src/workflows/prepare_genome/main.nf @@ -8,17 +8,29 @@ workflow run_wf { // decompress fasta | gunzip.run ( - fromState: ["input": "fasta"], - toState: ["fasta": "output"], + fromState: [ + "input": "fasta", + "versions": "versions" + ], + toState: [ + "fasta": "output", + "versions": "updated_versions" + ], key: "gunzip_fasta", - args: [output: "reference_genome.fasta"] + args: [ output: "reference_genome.fasta" ] ) // decompress gtf | gunzip.run ( runIf: {id, state -> state.gtf}, - fromState: ["input": "gtf"], - toState: ["gtf": "output"], + fromState: [ + "input": "gtf", + "versions": "versions" + ], + toState: [ + "gtf": "output", + "versions": "updated_versions" + ], key: "gunzip_gtf", args: [output: "gene_annotation.gtf"] ) @@ -26,8 +38,14 @@ workflow run_wf { // decompress gff | gunzip.run ( runIf: {id, state -> !state.gtf && state.gff}, - fromState: ["input": "gff"], - toState: ["gff": "output"], + fromState: [ + "input": "gff", + "versions": "versions" + ], + toState: [ + "gff": "output", + "versions": "updated_versions" + ], key: "gunzip_gff", args: [output: "gene_annotation.gff"] ) @@ -35,16 +53,28 @@ workflow run_wf { // gff to gtf | gffread.run ( runIf: {id, state -> state.gff}, - fromState: ["input": "annotation"], - toState: ["gtf": "output"], + fromState: [ + "input": "annotation", + "versions": "versions" + ], + toState: [ + "gtf": "output", + "versions": "updated_versions" + ], args: [output: "gene_annotation.gtf"] ) // decompress additional fasta | gunzip.run ( runIf: {id, state -> state.additional_fasta}, - fromState: ["input": "additional_fasta"], - toState: ["additional_fasta": "output"], + fromState: [ + "input": "additional_fasta", + "versions": "versions" + ], + toState: [ + "additional_fasta": "output", + "versions": "updated_versions" + ], key: "gunzip_additional_fasta", args: [output: "additional.fasta"] ) @@ -56,11 +86,13 @@ workflow run_wf { "fasta": "fasta", "gtf": "gtf", "additional_fasta": "additional_fasta", - "biotype": "biotype" + "biotype": "biotype", + "versions": "versions" ], toState: [ "fasta": "fasta_output", - "gtf": "gtf_output" + "gtf": "gtf_output", + "versions": "updated_versions" ], key: "cat_additional", args: [ @@ -71,8 +103,14 @@ workflow run_wf { // decompress bed file | gunzip.run ( runIf: {id, state -> state.gene_bed}, - fromState: ["input": "gene_bed"], - toState: ["gene_bed": "output"], + fromState: [ + "input": "gene_bed", + "versions": "versions" + ], + toState: [ + "gene_bed": "output", + "versions": "updated_versions" + ], key: "gunzip_gene_bed", args: [output: "genome_additional.bed"] ) @@ -80,16 +118,28 @@ workflow run_wf { // gtf to bed | gtf2bed.run ( runIf: { id, state -> !state.gene_bed}, - fromState: ["gtf": "gtf"], - toState: ["gene_bed": "bed_output"], + fromState: [ + "gtf": "gtf", + "versions": "versions" + ], + toState: [ + "gene_bed": "bed_output", + "versions": "updated_versions" + ], args: [bed_output: "genome_additional.bed"] ) // decompress transcript fasta | gunzip.run ( runIf: {id, state -> state.transcript_fasta}, - fromState: ["input": "transcript_fasta"], - toState: ["transcript_fasta": "output"], + fromState: [ + "input": "transcript_fasta", + "versions": "versions" + ], + toState: [ + "transcript_fasta": "output", + "versions": "updated_versions" + ], key: "transcript_fasta", args: [output: "transcriptome.fasta"] ) @@ -97,8 +147,14 @@ workflow run_wf { // preprocess transcripts fasta if gtf is in gencode format | preprocess_transcripts_fasta.run ( runIf: {id, state -> state.transcript_fastaa && state.gencode}, - fromState: ["transcript_fasta": "transcript_fasta"], - toState: ["transcript_fasta": "output"], + fromState: [ + "transcript_fasta": "transcript_fasta", + "versions": "versions" + ], + toState: [ + "transcript_fasta": "output", + "versions": "updated_versions" + ], key: "transcript_fixed", args: [output: "transcriptome.fasta"] ) @@ -108,9 +164,13 @@ workflow run_wf { runIf: {id, state -> !state.transcript_fasta}, fromState: [ "fasta": "fasta", - "gtf": "gtf" + "gtf": "gtf", + "versions": "versions" ], - toState: ["filtered_gtf": "filtered_gtf"], + toState: [ + "filtered_gtf": "filtered_gtf", + "versions": "updated_versions" + ], args: [filtered_gtf: "genome_additional_genes.gtf"] ) @@ -119,19 +179,28 @@ workflow run_wf { runIf: {id, state -> !state.transcript_fasta}, fromState: [ "fasta": "fasta", - "gtf": "filtered_gtf" + "gtf": "filtered_gtf", + "versions": "versions" + ], + toState: [ + "transcript_fasta": "transcript_fasta", + "versions": "updated_versions" ], - toState: ["transcript_fasta": "transcript_fasta"], key: "rsem_ref", args: [transcript_fasta: "transcriptome.fasta"] ) // chromosome size and fai index | getchromsizes.run ( - fromState: ["fasta": "fasta"], + fromState: [ + "fasta": "fasta", + "versions": "versions" + ], toState: [ "fai": "fai", - "sizes": "sizes" ], + "sizes": "sizes", + "versions": "updated_versions" + ], key: "chromsizes", args: [ fai: "genome_additional.fasta.fai", @@ -142,8 +211,14 @@ workflow run_wf { // untar bbsplit index, if available | untar.run ( runIf: {id, state -> state.bbsplit_index}, - fromState: ["input": "bbsplit_index"], - toState: ["bbsplit_index": "output"], + fromState: [ + "input": "bbsplit_index", + "versions": "versions" + ], + toState: [ + "bbsplit_index": "output", + "versions": "updated_versions" + ], key: "bbsplit_uncompressed", args: [output: "BBSplit_index"] ) @@ -153,9 +228,13 @@ workflow run_wf { runIf: {id, state -> !state.skip_bbsplit && !state.bbsplit_index}, fromState: [ "primary_ref": "fasta", - "bbsplit_fasta_list": "bbsplit_fasta_list" + "bbsplit_fasta_list": "bbsplit_fasta_list", + "versions": "versions" + ], + toState: [ + "bbsplit_index": "bbsplit_index", + "versions": "updated_versions" ], - toState: ["bbsplit_index": "bbsplit_index"], args: [ "only_build_index": true, bbsplit_index: "BBSplit_index" @@ -166,8 +245,14 @@ workflow run_wf { // Uncompress STAR index or generate from scratch if required | untar.run ( runIf: {id, state -> state.star_index}, - fromState: ["input": "star_index"], - toState: ["star_index": "output"], + fromState: [ + "input": "star_index", + "versions": "versions" + ], + toState: [ + "star_index": "output", + "versions": "updated_versions" + ], key: "star_index_uncompressed", args: [output: "STAR_index"] ) @@ -176,9 +261,13 @@ workflow run_wf { runIf: {id, state -> !state.star_index}, fromState: [ "fasta": "fasta", - "gtf": "gtf" + "gtf": "gtf", + "versions": "versions" + ], + toState: [ + "star_index": "star_index", + "versions": "updated_versions" ], - toState: ["star_index": "star_index"], key: "star_index_uncompressed", args: [star_index: "STAR_index"] ) @@ -190,8 +279,14 @@ workflow run_wf { // Uncompress Salmon index or generate from scratch if required | untar.run ( runIf: {id, state -> state.salmon_index}, - fromState: ["input": "salmon_index"], - toState: ["salmon_index": "output"], + fromState: [ + "input": "salmon_index", + "versions": "versions" + ], + toState: [ + "salmon_index": "output", + "versions": "updated_versions" + ], key: "salmon_index_uncompressed", args: [output: "Salmon_index"] ) @@ -200,9 +295,13 @@ workflow run_wf { runIf: {id, state -> !state.salmon_index}, fromState: [ "genome_fasta": "fasta", - "transcriptome_fasta": "transcript_fasta" + "transcriptome_fasta": "transcript_fasta", + "versions": "versions" + ], + toState: [ + "salmon_index": "salmon_index", + "versions": "updated_versions" ], - toState: ["salmon_index": "salmon_index"], key: "salmon_index_uncompressed", args: [salmon_index: "Salmon_index"] ) @@ -216,7 +315,8 @@ workflow run_wf { "salmon_index_uncompressed": "salmon_index", "bbsplit_index_uncompressed": "bbsplit_index", "chrom_sizes": "sizes", - "fai": "fai" + "fai": "fai", + "updated_versions": "versions" ) emit: diff --git a/src/workflows/quality_control/config.vsh.yaml b/src/workflows/quality_control/config.vsh.yaml index d5874619..4d82f620 100644 --- a/src/workflows/quality_control/config.vsh.yaml +++ b/src/workflows/quality_control/config.vsh.yaml @@ -296,7 +296,8 @@ functionality: - name: "--versions" type: file - default: versions.yml + must_exist: false + - name: Output arguments: @@ -572,6 +573,11 @@ functionality: direction: output default: salmon_merged_summarizedexperiment + - name: "--updated_versions" + type: file + default: versions.yml + direction: output + resources: - type: nextflow_script path: main.nf diff --git a/src/workflows/quality_control/main.nf b/src/workflows/quality_control/main.nf index 053e7170..ca6e6808 100644 --- a/src/workflows/quality_control/main.nf +++ b/src/workflows/quality_control/main.nf @@ -23,11 +23,13 @@ workflow run_wf { "gencode": "gencode", "extra_featurecounts_args": "extra_featurecounts_args", "featurecounts_group_type": "featurecounts_group_type", - "featurecounts_feature_type": "featurecounts_feature_type", + "featurecounts_feature_type": "featurecounts_feature_type", + "versions": "versions" ], toState: [ "featurecounts": "counts", - "featurecounts_summary": "summary" + "featurecounts_summary": "summary", + "versions": "updated_versions" ] ) @@ -36,9 +38,13 @@ workflow run_wf { fromState: [ "id": "id", "biocounts": "featurecounts", - "biotypes_header": "biotypes_header" + "biotypes_header": "biotypes_header", + "versions": "versions" ], - toState: [ "featurecounts_multiqc": "featurecounts_multiqc" ] + toState: [ + "featurecounts_multiqc": "featurecounts_multiqc", + "versions": "updated_versions" + ] ) | preseq_lcextrap.run ( @@ -46,18 +52,26 @@ workflow run_wf { fromState: [ "paired": "paired", "bam": "genome_bam", - "extra_preseq_args": "extra_preseq_args" + "extra_preseq_args": "extra_preseq_args", + "versions": "versions" + ], + toState: [ + "preseq_output": "output", + "versions": "updated_versions" ], - toState: [ "preseq_output": "output" ], ) | rseqc_bamstat.run ( runIf: { id, state -> "bam_stat" in state.rseqc_modules }, fromState: [ "input": "genome_bam", - "map_qual": "map_qual" + "map_qual": "map_qual", + "versions": "versions" ], - toState: [ "bamstat_output": "output" ] + toState: [ + "bamstat_output": "output", + "versions": "updated_versions" + ] ) | rseqc_inferexperiment.run( runIf: { id, state -> "infer_experiment" in state.rseqc_modules }, @@ -65,9 +79,13 @@ workflow run_wf { "input": "genome_bam", "refgene": "gene_bed", "sample_size": "sample_size", - "map_qual": "map_qual" + "map_qual": "map_qual", + "versions": "versions" ], - toState: [ "strandedness_output": "output" ] + toState: [ + "strandedness_output": "output", + "versions": "updated_versions" + ] ) // Get predicted strandedness from the RSeQC infer_experiment.py output | map { id, state -> @@ -86,14 +104,16 @@ workflow run_wf { "map_qual": "map_qual", "lower_bound_size": "lower_bound_size", "upper_bound_size": "upper_bound_size", - "step_size": "step_size" + "step_size": "step_size", + "versions": "versions" ], toState: [ "inner_dist_output_stats": "output_stats", "inner_dist_output_dist": "output_dist", "inner_dist_output_freq": "output_freq", "inner_dist_output_plot": "output_plot", - "inner_dist_output_plot_r": "output_plot_r" + "inner_dist_output_plot_r": "output_plot_r", + "versions": "updated_versions" ] ) | rseqc_junctionannotation.run( @@ -102,7 +122,8 @@ workflow run_wf { "input": "genome_bam", "refgene": "gene_bed", "map_qual": "map_qual", - "min_intron": "min_intron" + "min_intron": "min_intron", + "versions": "versions" ], toState: [ "junction_annotation_output_log": "output_log", @@ -111,7 +132,8 @@ workflow run_wf { "junction_annotation_output_junction_interact": "output_junction_interact", "junction_annotation_output_junction_sheet": "output_junction_sheet", "junction_annotation_output_splice_events_plot": "output_splice_events_plot", - "junction_annotation_output_splice_junctions_plot": "output_splice_junctions_plot" + "junction_annotation_output_splice_junctions_plot": "output_splice_junctions_plot", + "versions": "updated_versions" ] ) | rseqc_junctionsaturation.run( @@ -124,33 +146,41 @@ workflow run_wf { "sampling_percentile_step": "sampling_percentile_step", "min_intron": "min_intron", "min_splice_read": "min_splice_read", - "map_qual": "map_qual" + "map_qual": "map_qual", + "versions": "versions" ], toState: [ "junction_saturation_output_plot_r": "output_plot_r", - "junction_saturation_output_plot": "output_plot" + "junction_saturation_output_plot": "output_plot", + "versions": "updated_versions" ] ) | rseqc_readdistribution.run( runIf: { id, state -> "read_distribution" in state.rseqc_modules }, fromState: [ "input": "genome_bam", - "refgene": "gene_bed" + "refgene": "gene_bed", + "versions": "versions" ], - toState: [ "read_distribution_output": "output" ] + toState: [ + "read_distribution_output": "output", + "versions": "updated_versions" + ] ) | rseqc_readduplication.run( runIf: { id, state -> "read_duplication" in state.rseqc_modules }, fromState: [ "input": "genome_bam", "read_count_upper_limit": "read_count_upper_limit", - "map_qual": "map_qual" + "map_qual": "map_qual", + "versions": "versions" ], toState: [ - "read_duplication_output_duplication_rate_plot_r": "output_duplication_rate_plot_r", - "read_duplication_output_duplication_rate_plot": "output_duplication_rate_plot", - "read_duplication_output_duplication_rate_mapping": "output_duplication_rate_mapping", - "read_duplication_output_duplication_rate_sequence": "output_duplication_rate_sequence" + "read_duplication_output_duplication_rate_plot_r": "output_duplication_rate_plot_r", + "read_duplication_output_duplication_rate_plot": "output_duplication_rate_plot", + "read_duplication_output_duplication_rate_mapping": "output_duplication_rate_mapping", + "read_duplication_output_duplication_rate_sequence": "output_duplication_rate_sequence", + "versions": "updated_versions" ] ) | rseqc_tin.run( @@ -161,11 +191,13 @@ workflow run_wf { "refgene": "gene_bed", "minimum_coverage": "minimum_coverage", "sample_size": "tin_sample_size", - "subtract_background": "subtract_background" + "subtract_background": "subtract_background", + "versions": "versions" ], toState: [ "tin_output_summary": "output_tin_summary", - "tin_output_metrics": "output_tin" + "tin_output_metrics": "output_tin", + "versions": "updated_versions" ] ) @@ -175,7 +207,8 @@ workflow run_wf { "input": "genome_bam", "gtf_annotation": "gtf", "paired": "paired", - "strandedness": "strandedness" + "strandedness": "strandedness", + "versions": "versions" ], toState: [ "dupradar_output_dupmatrix": "output_dupmatrix", @@ -184,7 +217,8 @@ workflow run_wf { "dupradar_output_duprate_exp_densplot": "output_duprate_exp_densplot", "dupradar_output_duprate_exp_denscurve_mqc": "output_duprate_exp_denscurve_mqc", "dupradar_output_expression_histogram": "output_expression_histogram", - "dupradar_output_intercept_slope": "output_intercept_slope" + "dupradar_output_intercept_slope": "output_intercept_slope", + "versions": "updated_versions" ] ) @@ -197,11 +231,13 @@ workflow run_wf { "algorithm": "algorithm", "sequencing_protocol": "sequencing_protocol", "sorted": "sorted", - "java_memory_size": "java_memory_size" + "java_memory_size": "java_memory_size", + "versions": "versions" ], toState: [ "qualimap_output_pdf": "output_pdf", - "qualimap_output_dir": "output_dir" + "qualimap_output_dir": "output_dir", + "versions": "updated_versions" ] ) @@ -327,6 +363,7 @@ workflow run_wf { def extra_deseq2_args = list.collect { id, state -> state.extra_deseq2_args }.unique()[0] def extra_deseq2_args2 = list.collect { id, state -> state.extra_deseq2_args2 }.unique()[0] def skip_deseq2_qc = list.collect { id, state -> state.skip_deseq2_qc }.unique()[0] + def versions = list.collect { id, state -> state.versions }.unique()[0] ["merged", [ ids: ids, strandedness: strandedness, @@ -366,7 +403,8 @@ workflow run_wf { passed_mapping: passed_mapping, percent_mapped: percent_mapped, inferred_strand: inferred_strand, - passed_strand_check: passed_strand_check + passed_strand_check: passed_strand_check, + versions: versions ] ] } @@ -375,7 +413,8 @@ workflow run_wf { "salmon_quant_results": "salmon_quant_results", "gtf": "gtf", "gtf_extra_attributes": "gtf_extra_attributes", - "gtf_group_features": "gtf_group_features" + "gtf_group_features": "gtf_group_features", + "versions": "versions" ], toState: [ "tpm_gene": "tpm_gene", @@ -384,7 +423,8 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment" + "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment", + "versions": "versions" ], ) @@ -396,12 +436,14 @@ workflow run_wf { "clustering_header_multiqc": "clustering_header_multiqc", "deseq2_vst": "deseq2_vst", "extra_deseq2_args": "extra_deseq2_args", - "extra_deseq2_args2": "extra_deseq2_args2" + "extra_deseq2_args2": "extra_deseq2_args2", + "versions": "versions" ], toState: [ "deseq2_output": "deseq2_output", "deseq2_pca_multiqc": "pca_multiqc", - "deseq2_dists_multiqc": "dists_multiqc" + "deseq2_dists_multiqc": "dists_multiqc", + "versions": "updated_versions" ], ) @@ -451,38 +493,38 @@ workflow run_wf { | prepare_multiqc_input.run( fromState: [ - "multiqc_custom_config": "multiqc_custom_config", - "multiqc_title": "multiqc_title", - "multiqc_logo": "multiqc_logo", - "multiqc_methods_description": "multiqc_methods_description", - "workflow_summary": "workflow_summary", - "fail_trimming_multiqc": "fail_trimming_multiqc", - "fail_mapping_multiqc": "fail_mapping_multiqc", - "fail_strand_multiqc": "fail_strand_multiqc", - "fastqc_raw_multiqc": "fastqc_zip", - "fastqc_trim_multiqc": "trim_zip", - "trim_log_multiqc": "trim_log", - "sortmerna_multiqc": "sortmerna_log", - "star_multiqc": "star_multiqc", - "salmon_multiqc": "salmon_multiqc", - "samtools_stats": "genome_bam_stats", - "samtools_flagstat": "genome_bam_flagstat", - "samtools_idxstats": "genome_bam_idxstats", - "markduplicates_multiqc": "markduplicates_multiqc", - "featurecounts_multiqc": "featurecounts_multiqc", - "aligner_pca_multiqc": "deseq2_pca_multiqc", - "aligner_clustering_multiqc": "deseq2_dists_multiqc", - "preseq_multiqc": "preseq_output", - "qualimap_multiqc": "qualimap_output_dir", - "dupradar_multiqc": "dupradar_output_dup_intercept_mqc", - "bamstat_multiqc": "bamstat_output", - "inferexperiment_multiqc": "inferexperiment_multiqc", - "innerdistance_multiqc": "inner_dist_output_freq", - "junctionannotation_multiqc": "junction_annotation_output_log", - "junctionsaturation_multiqc": "junctionsaturation_multiqc", - "readdistribution_multiqc": "read_distribution_output", - "readduplication_multiqc": "read_duplication_output_duplication_rate_mapping", - "tin_multiqc": "tin_output_summary", + "multiqc_custom_config": "multiqc_custom_config", + "multiqc_title": "multiqc_title", + "multiqc_logo": "multiqc_logo", + "multiqc_methods_description": "multiqc_methods_description", + "workflow_summary": "workflow_summary", + "fail_trimming_multiqc": "fail_trimming_multiqc", + "fail_mapping_multiqc": "fail_mapping_multiqc", + "fail_strand_multiqc": "fail_strand_multiqc", + "fastqc_raw_multiqc": "fastqc_zip", + "fastqc_trim_multiqc": "trim_zip", + "trim_log_multiqc": "trim_log", + "sortmerna_multiqc": "sortmerna_log", + "star_multiqc": "star_multiqc", + "salmon_multiqc": "salmon_multiqc", + "samtools_stats": "genome_bam_stats", + "samtools_flagstat": "genome_bam_flagstat", + "samtools_idxstats": "genome_bam_idxstats", + "markduplicates_multiqc": "markduplicates_multiqc", + "featurecounts_multiqc": "featurecounts_multiqc", + "aligner_pca_multiqc": "deseq2_pca_multiqc", + "aligner_clustering_multiqc": "deseq2_dists_multiqc", + "preseq_multiqc": "preseq_output", + "qualimap_multiqc": "qualimap_output_dir", + "dupradar_multiqc": "dupradar_output_dup_intercept_mqc", + "bamstat_multiqc": "bamstat_output", + "inferexperiment_multiqc": "inferexperiment_multiqc", + "innerdistance_multiqc": "inner_dist_output_freq", + "junctionannotation_multiqc": "junction_annotation_output_log", + "junctionsaturation_multiqc": "junctionsaturation_multiqc", + "readdistribution_multiqc": "read_distribution_output", + "readduplication_multiqc": "read_duplication_output_duplication_rate_mapping", + "tin_multiqc": "tin_output_summary", ], toState: [ "multiqc_input": "output" @@ -492,16 +534,18 @@ workflow run_wf { | multiqc.run ( fromState: [ // "multiqc_custom_config": "multiqc_custom_config", - "multiqc_title": "multiqc_title", - "multiqc_logo": "multiqc_logo", - "multiqc_methods_description": "multiqc_methods_description", - "input": "multiqc_input" + "multiqc_title": "multiqc_title", + "multiqc_logo": "multiqc_logo", + "multiqc_methods_description": "multiqc_methods_description", + "input": "multiqc_input", + "versions": "versions" ], toState: [ - "multiqc_report": "report", - "multiqc_data": "data", - "multiqc_plots": "plots", - "multiqc_versions": "versions" + "multiqc_report": "report", + "multiqc_data": "data", + "multiqc_plots": "plots", + "multiqc_versions": "versions", + "versions": "updated_versions" ] ) @@ -518,7 +562,8 @@ workflow run_wf { multiqc_report: state.multiqc_report, multiqc_data: state.multiqc_data, multiqc_plots: state.multiqc_plots, - multiqc_versions: state.multiqc_versions + multiqc_versions: state.multiqc_versions, + versions: state.versions ] ] } @@ -578,7 +623,8 @@ workflow run_wf { "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_versions": "multiqc_versions", + "updated_versions": "versions" ] ) diff --git a/src/workflows/rnaseq/config.vsh.yaml b/src/workflows/rnaseq/config.vsh.yaml index 0b5480ae..5831ee86 100644 --- a/src/workflows/rnaseq/config.vsh.yaml +++ b/src/workflows/rnaseq/config.vsh.yaml @@ -735,7 +735,8 @@ functionality: direction: output - name: "--versions" type: file - default: versions.yml + + must_exist: false direction: output resources: @@ -754,5 +755,5 @@ functionality: platforms: - type: nextflow - # directives: - # label: [ "lowtime", "lowmem", "lowcpu" ] + directives: + label: [ "lowtime", "lowmem", "lowcpu" ] diff --git a/src/workflows/rnaseq/main.nf b/src/workflows/rnaseq/main.nf index 135548a5..49fd60df 100644 --- a/src/workflows/rnaseq/main.nf +++ b/src/workflows/rnaseq/main.nf @@ -26,7 +26,8 @@ workflow run_wf { hisat2_index: list[1][-1].hisat2_index, bbsplit_index: list[1][-1].bbsplit_index, gencode: list[1][-1].gencode, - biotype: list[1][-1].biotype ] + biotype: list[1][-1].biotype] + // versions: list[1][-1].versions ] ] } // prepare all the necessary files for reference genome @@ -46,7 +47,8 @@ workflow run_wf { // "hisat2_index": "hisat2_index", "bbsplit_index": "bbsplit_index", "gencode": "gencode", - "biotype": "biotype" + "biotype": "biotype", + "versions": "versions" ], toState: [ "fasta": "uncompressed_fasta", @@ -57,7 +59,8 @@ workflow run_wf { "bbsplit_index": "bbsplit_index_uncompressed", "star_index": "star_index_uncompressed", "salmon_index": "salmon_index_uncompressed", - "gene_bed": "gene_bed_uncompressed" + "gene_bed": "gene_bed_uncompressed", + "versions": "updated_versions" ] ) @@ -78,11 +81,13 @@ workflow run_wf { | cat_fastq.run ( fromState: [ "read_1": "fastq_1", - "read_2": "fastq_2" + "read_2": "fastq_2", + "versions": "versions" ], toState: [ "fastq_1": "fastq_1", - "fastq_2": "fastq_2" + "fastq_2": "fastq_2", + "versions": "updated_versions" ] ) @@ -109,7 +114,8 @@ workflow run_wf { "umi_discard_read": "umi_discard_read", "skip_trimming": "skip_trimming", "skip_bbsplit": "skip_bbsplit", - "remove_ribo_rna": "remove_ribo_rna" + "remove_ribo_rna": "remove_ribo_rna", + "versions": "versions" ], toState: [ "fastqc_html_1": "fastqc_html_1", @@ -127,7 +133,8 @@ workflow run_wf { "passed_trimmed_reads": "passed_trimmed_reads", "num_trimmed_reads": "num_trimmed_reads", "sortmerna_log": "sortmerna_log", - "salmon_json_info": "salmon_json_info" + "salmon_json_info": "salmon_json_info", + "versions": "updated_versions" ] ) @@ -175,7 +182,8 @@ workflow run_wf { "umi_dedup_stats": "umi_dedup_stats", "gtf_group_features": "gtf_group_features", "gtf_extra_attributes": "gtf_extra_attributes", - "salmon_quant_libtype": "salmon_quant_libtype" + "salmon_quant_libtype": "salmon_quant_libtype", + "versions": "versions" ], toState: [ "star_alignment": "star_alignment", @@ -190,7 +198,8 @@ workflow run_wf { "transcriptome_bam_stats": "transcriptome_bam_stats", "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", - "salmon_quant_results": "salmon_quant_results" + "salmon_quant_results": "salmon_quant_results", + "versions": "updated_versions" ] ) @@ -229,7 +238,8 @@ workflow run_wf { "skip_qc": "skip_qc", "skip_markdupkicates": "skip_markdupkicates", "skip_stringtie": "skip_stringtie", - "skip_bigwig":"gencode" + "skip_bigwig":"gencode", + "versions": "versions" ], toState: [ "genome_bam_sorted": "processed_genome_bam", @@ -245,7 +255,8 @@ workflow run_wf { "bedgraph_forward": "bedgraph_forward", "bedgraph_reverse": "bedgraph_reverse", "bigwig_forward": "bigwig_forward", - "bigwig_reverse": "bigwig_reverse" + "bigwig_reverse": "bigwig_reverse", + "versions": "updated_versions" ] ) @@ -291,7 +302,8 @@ workflow run_wf { "num_trimmed_reads": "num_trimmed_reads", "passed_trimmed_reads": "passed_trimmed_reads", "passed_mapping": "passed_mapping", - "percent_mapped": "percent_mapped" + "percent_mapped": "percent_mapped", + "versions": "versions" ], toState: [ "preseq_output": "preseq_output", @@ -340,7 +352,8 @@ workflow run_wf { "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_versions": "multiqc_versions", + "versions": "updated_versions" ] ) @@ -437,7 +450,8 @@ workflow run_wf { "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_versions": "multiqc_versions", + "versions": "versions" ] ) | niceView() diff --git a/src/workflows/salmon_quant_merge_counts/config.vsh.yaml b/src/workflows/salmon_quant_merge_counts/config.vsh.yaml index ed4af020..21233223 100644 --- a/src/workflows/salmon_quant_merge_counts/config.vsh.yaml +++ b/src/workflows/salmon_quant_merge_counts/config.vsh.yaml @@ -20,8 +20,8 @@ functionality: default: 'gene_id' - name: "--versions" type: file - default: versions.yml - + must_exist: false + - name: "Output" arguments: - name: "--tpm_gene" @@ -52,6 +52,10 @@ functionality: type: file direction: output default: salmon_merged_summarizedexperiment + - name: "--updated_versions" + type: file + default: versions.yml + direction: output resources: - type: nextflow_script diff --git a/src/workflows/salmon_quant_merge_counts/main.nf b/src/workflows/salmon_quant_merge_counts/main.nf index 55af8dbf..0d3cf84a 100644 --- a/src/workflows/salmon_quant_merge_counts/main.nf +++ b/src/workflows/salmon_quant_merge_counts/main.nf @@ -10,15 +10,20 @@ workflow run_wf { "salmon_quant_results": "salmon_quant_results", "gtf_extra_attributes": "gtf_extra_attributes", "gtf": "gtf", - "gtf_group_features": "gtf_group_features" + "gtf_group_features": "gtf_group_features", + "versions": "versions" ], - toState: [ "tx2gene_tsv": "tsv" ] + toState: [ + "tx2gene_tsv": "tsv", + "versions": "updated_versions" + ] ) | salmon_tximport.run ( fromState: [ "salmon_quant_results": "salmon_quant_results", - "tx2gene_tsv": "tx2gene_tsv" + "tx2gene_tsv": "tx2gene_tsv", + "versions": "versions" ], toState: [ "tpm_gene": "tpm_gene", @@ -26,7 +31,8 @@ workflow run_wf { "counts_gene_length_scaled": "counts_gene_length_scaled", "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", - "counts_transcript": "counts_transcript" + "counts_transcript": "counts_transcript", + "versions": "updated_versions" ] ) @@ -38,9 +44,13 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "tx2gene_tsv": "tx2gene_tsv" + "tx2gene_tsv": "tx2gene_tsv", + "versions": "versions" ], - toState: [ "salmon_merged_summarizedexperiment": "output" ] + toState: [ + "salmon_merged_summarizedexperiment": "output", + "versions": "updated_versions" + ] ) | setState ( @@ -50,7 +60,8 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment" + "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment", + "updated_versions": "versions" ) emit: