diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index d4f66e4..0ac2fb1 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,8 +1,8 @@ report_comment: > - This report has been generated by the + This report has been generated by the analysis pipeline. report_section_order: - "rnaseq.vsh-methods-description": + "rnaseq-methods-description": order: -1000 software_versions: order: -1001 @@ -10,6 +10,7 @@ report_section_order: order: -1002 export_plots: true +disable_version_detection: true # Run only these modules run_modules: @@ -19,7 +20,6 @@ run_modules: - fastp - sortmerna - star - # - hisat2 - rsem - salmon - kallisto @@ -64,17 +64,15 @@ table_columns_visible: fastqc: percent_duplicates: False -extra_fn_clean_exts: - - ".salmon_quant" - - ".mapping_quality" - - ".genome_sorted" - - ".MarkDuplicates" - - ".MarkDuplicates_flagstat" - - ".MarkDuplicates_stats" - - ".genome_sorted_MarkDuplicates" - - ".star_aligned" +extra_fn_clean_extn: + # - ".mapping_quality" + # - ".MarkDuplicates_flagstat.output.flagstat" + # - ".MarkDuplicates_idxstats.output.idxstats" + # - ".MarkDuplicates_stats.output.txt" + # - ".genome_sorted_MarkDuplicates.output.bam" + # - ".genome_sorted_MarkDuplicates" - ".read_1" - - ".read_2" + - ".read_2" # See https://github.com/ewels/MultiQC_TestData/blob/master/data/custom_content/with_config/table_headerconfig/multiqc_config.yaml custom_data: @@ -117,32 +115,31 @@ sp: fn: "*.fastqc.zip" cutadapt: - fn: "*.trimming_report.txt" + fn: "*.trimming_report*.txt" fastp: - fn: "*.fastp.json" + fn: "*.fastp_out.json" sortmerna: fn: "*sortmerna*.log" star: - fn: "*.star_aligned.log.final.out" + fn: "*.star_align_reads.log.txt" # hisat2: # fn: "*.hisat2.summary.log" - - salmon/meta: - fn: "*meta_info.json" + # salmon: + # fn: "*meta_info.json" preseq: fn: "*.lc_extrap.txt" samtools/stats: - fn: "*.stats" + fn: "*_stats.output.txt" samtools/flagstat: - fn: "*.flagstat" + fn: "*_flagstat.output.flagstat" samtools/idxstats: - fn: "*.idxstats*" + fn: "*_idxstats.output.idxstats" rseqc/bam_stat: fn: "*.mapping_quality.txt" diff --git a/src/cat_fastq/config.vsh.yaml b/src/cat_fastq/config.vsh.yaml index 7adc2ef..4f8b77b 100644 --- a/src/cat_fastq/config.vsh.yaml +++ b/src/cat_fastq/config.vsh.yaml @@ -25,13 +25,13 @@ argument_groups: - name: "--fastq_1" type: file direction: output - default: $id.read_1.merged.fastq + default: $id_r1.fastq description: Concatenated read 1 fastq - name: "--fastq_2" type: file direction: output must_exist: false - default: $id.read_2.merged.fastq + default: $id_r2.fastq description: Concatenated read 2 fastq resources: diff --git a/src/fastqc/script.sh b/src/fastqc/script.sh index 3b9461b..808d300 100644 --- a/src/fastqc/script.sh +++ b/src/fastqc/script.sh @@ -30,10 +30,12 @@ fastqc -o $tmpdir ${input[*]} file1=$(basename -- "${input[0]}") read1="${file1%.fastq*}" -file2=$(basename -- "${input[1]}") -read2="${file2%.fastq*}" - [[ -e "${tmpdir}/${read1}_fastqc.html" ]] && cp "${tmpdir}/${read1}_fastqc.html" $par_fastqc_html_1 -[[ -e "${tmpdir}/${read2}_fastqc.html" ]] && cp "${tmpdir}/${read2}_fastqc.html" $par_fastqc_html_2 [[ -e "${tmpdir}/${read1}_fastqc.zip" ]] && cp "${tmpdir}/${read1}_fastqc.zip" $par_fastqc_zip_1 -[[ -e "${tmpdir}/${read2}_fastqc.zip" ]] && cp "${tmpdir}/${read2}_fastqc.zip" $par_fastqc_zip_2 + +if $par_paired; then + file2=$(basename -- "${input[1]}") + read2="${file2%.fastq*}" + [[ -e "${tmpdir}/${read2}_fastqc.html" ]] && cp "${tmpdir}/${read2}_fastqc.html" $par_fastqc_html_2 + [[ -e "${tmpdir}/${read2}_fastqc.zip" ]] && cp "${tmpdir}/${read2}_fastqc.zip" $par_fastqc_zip_2 +fi \ No newline at end of file diff --git a/src/kallisto/kallisto_quant/script.sh b/src/kallisto/kallisto_quant/script.sh index 6f19015..cba09f4 100644 --- a/src/kallisto/kallisto_quant/script.sh +++ b/src/kallisto/kallisto_quant/script.sh @@ -23,16 +23,7 @@ if [[ "$par_extra_args" != *"--fr-stranded"* ]] && [[ "$par_extra_args" != *"--r fi mkdir -p $par_output -echo "kallisto quant \ - ${meta_cpus:+--threads $meta_cpus} \ - --index $par_index \ - ${par_gtf:+--gtf $par_gtf} \ - ${par_chromosomes:+--chromosomes $par_chromosomes} \ - $single_end_params \ - $strandedness \ - $par_extra_args \ - -o $par_output \ - ${input[*]} 2> >(tee -a ${par_output}/kallisto_quant.log >&2)" + kallisto quant \ ${meta_cpus:+--threads $meta_cpus} \ --index $par_index \ diff --git a/src/prepare_multiqc_input/script.sh b/src/prepare_multiqc_input/script.sh index fef1f73..daa63e2 100644 --- a/src/prepare_multiqc_input/script.sh +++ b/src/prepare_multiqc_input/script.sh @@ -24,6 +24,8 @@ IFS="," read -ra rsem_multiqc <<< $par_rsem_multiqc && for file in "${rsem_multi IFS="," read -ra salmon_multiqc <<< $par_salmon_multiqc && for file in "${salmon_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done +IFS="," read -ra pseudo_multiqc <<< $par_pseudo_multiqc && for file in "${pseudo_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done + IFS="," read -ra samtools_stats <<< $par_samtools_stats && for file in "${samtools_stats[@]}"; do [ -e "$file" ] && cp -r "$file" $par_output/; done IFS="," read -ra samtools_flagstat <<< $par_samtools_flagstat && for file in "${samtools_flagstat[@]}"; do [ -e "$file" ] && cp -r "$file" $par_output/; done @@ -32,12 +34,9 @@ IFS="," read -ra samtools_idxstats <<< $par_samtools_idxstats && for file in "${ IFS="," read -ra markduplicates_multiqc <<< $par_markduplicates_multiqc && for file in "${markduplicates_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done -IFS="," read -ra pseudo_multiqc <<< $par_pseudo_multiqc && for file in "${pseudo_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done - - IFS="," read -ra featurecounts_multiqc <<< $par_featurecounts_multiqc && for file in "${featurecounts_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done -IFS="," read -ra featurecounts_rrna_multiqc <<< $par_featurecounts_rrna_multiqc&& for file in "${featurecounts_rrna_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done +IFS="," read -ra featurecounts_rrna_multiqc <<< $par_featurecounts_rrna_multiqc && for file in "${featurecounts_rrna_multiqc[@]}"; do [ -e "$file" ] && cp -r "$file" "$par_output/"; done [ -e "$par_aligner_pca_multiqc" ] && cp -r "$par_aligner_pca_multiqc" "$par_output/" diff --git a/src/rsem/rsem_calculate_expression/config.vsh.yaml b/src/rsem/rsem_calculate_expression/config.vsh.yaml index b97997d..439404e 100644 --- a/src/rsem/rsem_calculate_expression/config.vsh.yaml +++ b/src/rsem/rsem_calculate_expression/config.vsh.yaml @@ -33,9 +33,6 @@ argument_groups: - name: "--extra_args" type: string description: Extra rsem-calculate-expression arguments in addition to the defaults. - - name: "--versions" - type: file - must_exist: false - name: "Output" arguments: diff --git a/src/rsem/rsem_calculate_expression/script.sh b/src/rsem/rsem_calculate_expression/script.sh index 27049a6..7b9e89b 100755 --- a/src/rsem/rsem_calculate_expression/script.sh +++ b/src/rsem/rsem_calculate_expression/script.sh @@ -19,10 +19,10 @@ fi IFS="," read -ra input <<< $par_input -INDEX=`find -L $meta_resources_dir/ -name "*.grp" | sed 's/\.grp$//'` +INDEX=`find -L $par_index/ -name "*.grp" | sed 's/\.grp$//'` rsem-calculate-expression \ - ${meta_cpus:+--num-theads $meta_cpus} \ + ${meta_cpus:+--num-threads $meta_cpus} \ $strandedness \ ${par_paired:+--paired-end} \ $par_extra_args \ @@ -30,3 +30,10 @@ rsem-calculate-expression \ $INDEX \ $par_id +[[ -e "${par_id}.genes.results" ]] && mv "${par_id}.genes.results" $par_counts_gene +[[ -e "${par_id}id.isoforms.results" ]] && mv "${par_id}id.isoforms.results" $par_counts_transcripts +[[ -e "${par_id}.stat" ]] && mv -r "${par_id}.stat" $par_stat +# [[ -e "${par_id}.log" ]] && mv "${par_id}.log" $par_logs +[[ -e "${par_id}.STAR.genome.bam" ]] && mv "${par_id}.STAR.genome.bam" $par_bam_star +[[ -e "${par_id}.genome.bam" ]] && mv "${par_id}.genome.bam" $par_bam_genome +[[ -e "${par_id}.transcript.bam" ]] && mv "${par_id}.transcript.bam" $par_bam_transcript \ No newline at end of file diff --git a/src/rsem/rsem_merge_counts/config.vsh.yaml b/src/rsem/rsem_merge_counts/config.vsh.yaml index 58b713a..a814662 100644 --- a/src/rsem/rsem_merge_counts/config.vsh.yaml +++ b/src/rsem/rsem_merge_counts/config.vsh.yaml @@ -18,9 +18,6 @@ argument_groups: - name: "--counts_transcripts" type: file description: Expression counts on transcript level (isoforms) - - name: "--versions" - type: file - must_exist: false - name: "Output" arguments: @@ -44,10 +41,6 @@ argument_groups: description: File containing transcript TPM across all samples. default: rsem.merged.transcript_tpm.tsv direction: output - - name: "--updated_versions" - type: file - default: versions.yml - direction: output resources: - type: bash_script diff --git a/src/trimgalore/config.vsh.yaml b/src/trimgalore/config.vsh.yaml index 0c4068d..6e405f0 100644 --- a/src/trimgalore/config.vsh.yaml +++ b/src/trimgalore/config.vsh.yaml @@ -232,13 +232,13 @@ argument_groups: required: false description: Output file for read 1. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists. direction: output - example: read_1.fastq + example: read_1.fastq.gz - name: --trimmed_r2 type: file required: false description: Output file for read 2. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists. direction: output - example: read_2.fastq + example: read_2.fastq.gz - name: --trimming_report_r1 type: file required: false diff --git a/src/workflows/genome_alignment_and_quant/config.vsh.yaml b/src/workflows/genome_alignment_and_quant/config.vsh.yaml index d93b916..7816d39 100644 --- a/src/workflows/genome_alignment_and_quant/config.vsh.yaml +++ b/src/workflows/genome_alignment_and_quant/config.vsh.yaml @@ -76,7 +76,7 @@ argument_groups: type: string default: 'gene_name' description: By default, the pipeline uses the gene_name field to obtain additional gene identifiers from the input GTF file when running Salmon. - - name: extra_rsem_calculate_expression_args + - name: --extra_rsem_calculate_expression_args type: string description: Extra arguments to pass to rsem-calculate-expression command in addition to defaults defined by the pipeline. - name: "--aligner" @@ -96,7 +96,7 @@ argument_groups: - name: "--star_multiqc" type: file direction: output - default: $id.star_align.log + default: $id_star.log - name: "--genome_bam_sorted" type: file direction: output @@ -145,7 +145,40 @@ argument_groups: type: file direction: output default: $id.quant.sf - + - name: "--salmon_multiqc" + type: file + direction: output + - name: "--rsem_counts_gene" + type: file + description: Expression counts on gene level + default: $id.genes.results + direction: output + - name: "--counts_transcripts" + type: file + description: Expression counts on transcript level + default: $id.isoforms.results + direction: output + - name: "--rsem_multiqc" + type: file + description: RSEM statistics + default: $id.stat + direction: output + - name: "--bam_star_rsem" + type: file + description: BAM file generated by STAR (optional) + default: $id.STAR.genome.bam + direction: output + - name: "--bam_genome_rsem" + type: file + description: Genome BAM file (optional) + default: $id.genome.bam + direction: output + - name: "--bam_transcript_rsem" + type: file + description: Transcript BAM file (optional) + default: $id.transcript.bam + direction: output + resources: - type: nextflow_script path: main.nf @@ -165,9 +198,11 @@ dependencies: - name: samtools/samtools_idxstats repository: biobox - name: umitools/umitools_dedup + # - name: umi_tools/umi_tools_dedup # repository: biobox - name: umitools_prepareforquant - # repository: biobox + # - name: umi_tools/umi_tools_prepareforquant + # repository: biobox - name: salmon/salmon_quant repository: biobox - name: rsem/rsem_calculate_expression diff --git a/src/workflows/genome_alignment_and_quant/main.nf b/src/workflows/genome_alignment_and_quant/main.nf index db456c4..4734670 100644 --- a/src/workflows/genome_alignment_and_quant/main.nf +++ b/src/workflows/genome_alignment_and_quant/main.nf @@ -280,6 +280,11 @@ workflow run_wf { ] ) + | map { id, state -> + def mod_state = (state.aligner == 'star_salmon') ? state + [salmon_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | rsem_calculate_expression.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, fromState: [ @@ -300,7 +305,7 @@ workflow run_wf { "bam_transcript_rsem": "bam_transcript" ] ) - + // RSEM_Star BAM | samtools_sort.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, @@ -357,6 +362,7 @@ workflow run_wf { [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -368,7 +374,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" ] + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) emit: diff --git a/src/workflows/genome_alignment_and_quant/test_run.sh b/src/workflows/genome_alignment_and_quant/test_run.sh index d0c8a2b..c48d707 100755 --- a/src/workflows/genome_alignment_and_quant/test_run.sh +++ b/src/workflows/genome_alignment_and_quant/test_run.sh @@ -1,25 +1,43 @@ #!/bin/bash -viash ns build --setup cb --parallel +# v;iash ns build --setup cb --parallel # Split error message from standard output # viash ns list > /dev/null -CURR=`pwd` +echo "> Preparing reference data files" +gunzip --keep testData/minimal_test/reference/genes.gtf.gz cat > testData/minimal_test/input_fastq/sample_sheet.csv << HERE id,fastq_1,fastq_2,strandedness WT_REP1,SRR6357070_1.fastq.gz,SRR6357070_2.fastq.gz,reverse -WT_REP2,SRR6357072_1.fastq.gz,SRR6357072_2.fastq.gz,reverse +RAP1_UNINDUCED_REP1,SRR6357073_1.fastq.gz,,reverse HERE +# echo "> Test 1: STAR Salmon" +# nextflow run target/nextflow/workflows/genome_alignment_and_quant/main.nf \ +# --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ +# --publish_dir test_results/genome_alignment_test1 \ +# --fasta testData/minimal_test/reference/genome.fasta \ +# --gtf testData/minimal_test/reference/genes.gtf \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --star_index test_results/output_test1/STAR_index \ +# --aligner star_salmon \ +# -profile docker \ +# -resume + +echo "> Test 2: STAR RSEM" nextflow run target/nextflow/workflows/genome_alignment_and_quant/main.nf \ --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ - --publish_dir "test_results/genome_alignment_test" \ + --publish_dir test_results/genome_alignment_test2 \ --fasta testData/minimal_test/reference/genome.fasta \ - --gtf testData/minimal_test/reference/genes.gtf.gz \ + --gtf testData/minimal_test/reference/genes.gtf \ --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ - --star_index testData/test_output/star_index \ - --aligner "star_rsem" \ + --rsem_index test_results/output_test1/RSEM_index \ + --aligner star_rsem \ + --extra_rsem_calculate_expression_args "--star --star-output-genome-bam --star-gzipped-read-file --estimate-rspd --seed 1" \ -profile docker \ - # -resume \ No newline at end of file + -resume + +echo "Removing reference data files" +rm testData/minimal_test/reference/genes.gtf diff --git a/src/workflows/post_processing/config.vsh.yaml b/src/workflows/post_processing/config.vsh.yaml index 50b52e9..40ca733 100644 --- a/src/workflows/post_processing/config.vsh.yaml +++ b/src/workflows/post_processing/config.vsh.yaml @@ -79,27 +79,27 @@ argument_groups: - name: "--processed_genome_bam" type: file direction: output - default: $id.markdup.sorted.bam + default: $id.genome.bam - name: "--genome_bam_index" type: file direction: output - default: $id.markdup.sorted.bam + default: $id.genome.bam.bai - name: "--genome_bam_stats" type: file direction: output - default: $id.markdup.sorted.bam.stats + default: $id.genome.stats - name: "--genome_bam_flagstat" type: file direction: output - default: $id.markdup.sorted.bam.flagstat + default: $id.genome.flagstat - name: "--genome_bam_idxstats" type: file direction: output - default: $id.markdup.sorted.bam.idxstats + default: $id.genome.idxstats - name: "--markduplicates_metrics" type: file direction: output - default: $id.markdup.sorted.MarkDuplicates.metrics.txt + default: $id.MarkDuplicates.metrics.txt - name: "--stringtie_transcript_gtf" type: file direction: output @@ -151,6 +151,8 @@ dependencies: - name: samtools/samtools_idxstats repository: biobox - name: stringtie + # - name: bedtools/bedtools_genomecov + # repository: biobox - name: bedtools_genomecov - name: ucsc/bedclip - name: ucsc/bedgraphtobigwig diff --git a/src/workflows/post_processing/main.nf b/src/workflows/post_processing/main.nf index 80b15e0..541ef71 100644 --- a/src/workflows/post_processing/main.nf +++ b/src/workflows/post_processing/main.nf @@ -16,20 +16,20 @@ workflow run_wf { "extra_picard_args": "extra_picard_args" ], toState: [ - "genome_bam": "output_bam", + "processed_genome_bam": "output_bam", "markduplicates_metrics": "metrics" ] ) | samtools_sort.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, - fromState: [ "input": "genome_bam" ], - toState: [ "genome_bam": "output" ], + fromState: [ "input": "processed_genome_bam" ], + toState: [ "processed_genome_bam": "output" ], key: "genome_sorted_MarkDuplicates" ) | samtools_index.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "csi": "bam_csi_index" ], toState: [ "genome_bam_index": "output" ], @@ -38,7 +38,7 @@ workflow run_wf { | samtools_stats.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_stats": "output" ], @@ -47,7 +47,7 @@ workflow run_wf { | samtools_flagstat.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_flagstat": "output" ], @@ -56,7 +56,7 @@ workflow run_wf { | samtools_idxstats.run( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_idxstats": "output" ], @@ -67,7 +67,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_stringtie }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "annotation_gtf": "gtf", "extra_stringtie_args": "extra_stringtie_args" ], @@ -85,7 +85,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "extra_bedtools_args": "extra_bedtools_args" ], toState: [ @@ -140,7 +140,7 @@ workflow run_wf { } | setState ( - "processed_genome_bam": "genome_bam", + "processed_genome_bam": "processed_genome_bam", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", "genome_bam_flagstat": "genome_bam_flagstat", diff --git a/src/workflows/post_processing/test_run.sh b/src/workflows/post_processing/test_run.sh index 8acd71d..d62aee2 100755 --- a/src/workflows/post_processing/test_run.sh +++ b/src/workflows/post_processing/test_run.sh @@ -1,6 +1,6 @@ #!/bin/bash -viash ns build --setup cb --parallel +# viash ns build --setup cb --parallel nextflow run target/nextflow/workflows/post_processing/main.nf \ --publish_dir "testData/paired_end_test" \ diff --git a/src/workflows/pre_processing/config.vsh.yaml b/src/workflows/pre_processing/config.vsh.yaml index b4868d1..b26fde6 100644 --- a/src/workflows/pre_processing/config.vsh.yaml +++ b/src/workflows/pre_processing/config.vsh.yaml @@ -139,13 +139,13 @@ argument_groups: - name: "Read filtering options" arguments: - name: "--skip_bbsplit" - type: boolean + type: boolean_true description: Skip BBSplit for removal of non-reference genome reads. - default: true + # default: true - name: "--remove_ribo_rna" - type: boolean + type: boolean_true description: Enable the removal of reads derived from ribosomal RNA using SortMeRNA. - default: false + # default: false - name: "Other options" arguments: @@ -162,14 +162,14 @@ argument_groups: required: false must_exist: false description: Path to output directory - default: $id.$key.read_1.fastq + default: $id.read_1.fastq - name: "--qc_output2" type: file direction: output required: false must_exist: false description: Path to output directory - default: $id.$key.read_2.fastq + default: $id.read_2.fastq - name: "--fastqc_html_1" type: file direction: output @@ -246,7 +246,20 @@ argument_groups: direction: output description: Results from Salmon quant default: $id.salmon_quant_output - + - name: --trim_json + type: file + description: The fastp json format report file name + default: $id.fastp_out.json + direction: output + - name: --trim_html + type: file + description: The fastp html format report file name + default: $id.fastp_out.html + direction: output + - name: --merged_out + type: file + description: File name to store merged fastp output. + direction: output resources: - type: nextflow_script path: main.nf @@ -256,14 +269,18 @@ dependencies: - name: fastqc # repository: biobox - name: umitools/umitools_extract - # repository: biobox + - name: umi_tools/umi_tools_extract + repository: biobox - name: trimgalore # repository: biobox - name: bbmap_bbsplit + # repository: biobox - name: sortmerna + # repository: biobox - name: fastp repository: biobox - name: fq_subsample + # repository: biobox - name: salmon/salmon_quant repository: biobox diff --git a/src/workflows/pre_processing/main.nf b/src/workflows/pre_processing/main.nf index caa9a42..6e54b3f 100644 --- a/src/workflows/pre_processing/main.nf +++ b/src/workflows/pre_processing/main.nf @@ -74,7 +74,8 @@ workflow run_wf { "trim_zip_2": "trimmed_fastqc_zip_2", "trim_html_1": "trimmed_fastqc_html_1", "trim_html_2": "trimmed_fastqc_html_2" - ] + ], + args: [gzip: true, fastqc: true] ) // Trim reads using fastp @@ -90,7 +91,7 @@ workflow run_wf { ], toState: [ "fastq_1": "out1", - // "fastq_2": "out2", + "fastq_2": "out2", "failed_trim": "failed_out", "failed_trim_unpaired1": "unpaired1", "failed_trim_unpaired2": "unpaired2", @@ -154,8 +155,10 @@ workflow run_wf { runIf: { id, state -> state.strandedness == 'auto' }, fromState: { id, state -> def input = state.paired ? [ state.fastq_1, state.fastq_2 ] : [ state.fastq_1 ] - [ input: input, - extra_args: state.extra_fq_subsample_args ] + [ + input: input, + extra_args: state.extra_fq_subsample_args + ] }, toState: [ "subsampled_fastq_1": "output_1", @@ -189,9 +192,8 @@ workflow run_wf { def mates1 = state.paired ? state.subsampled_fastq_1 : null def mates2 = state.paired ? state.subsampled_fastq_2 : null [ unmated_reads: unmated_reads, - mates1: state.fastq1, - mates2: state.fastq2, - targets: state.transcript_fasta, + mates1: mates1, + mates2: mates2, gene_map: state.gtf, index: state.salmon_index, lib_type: state.lib_type ] diff --git a/src/workflows/pre_processing/test_run.sh b/src/workflows/pre_processing/test_run.sh index 7c94e9b..60fe689 100755 --- a/src/workflows/pre_processing/test_run.sh +++ b/src/workflows/pre_processing/test_run.sh @@ -2,30 +2,55 @@ # viash ns build --parallel --setup cb -# nextflow run target/nextflow/workflows/pre_processing/main.nf \ -# --id RAP1_UNINDUCED_REP1 \ -# --input 'testData/minimal_test/input_fastq/SRR6357073_1.fastq.gz' \ -# --publish_dir "test_results/preprocessing_no_samplesheet" \ -# --umitools_bc_pattern "NNNN" \ -# -profile docker \ -# -resume +echo "> Preparing reference data files" +gunzip --keep testData/minimal_test/reference/genes.gtf.gz +mkdir -p testData/minimal_test/reference/salmon_index +tar -C testData/minimal_test/reference/salmon_index --strip-components 1 -xavf testData/minimal_test/reference/salmon.tar.gz --no-same-owner # Test paired-end data cat > testData/minimal_test/input_fastq/sample_sheet.csv << HERE id,fastq_1,fastq_2,strandedness -WT_REP2,SRR6357072_1.fastq.gz,SRR6357072_2.fastq.gz,reverse -RAP1_IAA_30M_REP1,SRR6357076_1.fastq.gz,SRR6357076_2.fastq.gz,reverse +WT_REP2,SRR6357072_1.fastq.gz,SRR6357072_2.fastq.gz,auto +RAP1_UNINDUCED_REP1,SRR6357073_1.fastq.gz,,reverse HERE +echo "> Test 1: Running workflow with trimgalore" nextflow run target/nextflow/workflows/pre_processing/main.nf \ --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ - --publish_dir "testData/paired_end_test" \ + --publish_dir "test_results/pre_processing_test1" \ --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ - --gtf testData/minimal_test/reference/gene_annotation.gtf \ - --salmon_index testData/minimal_test/reference/salmon.tar.gz \ + --gtf testData/minimal_test/reference/genes.gtf \ + --salmon_index testData/minimal_test/reference/salmon_index \ --skip_trimming false \ --trimmer trimgalore \ --remove_ribo_rna false \ + --ribo_database_manifest testData/minimal_test/reference/rrna-db-defaults.txt \ + --skip_bbsplit false \ + --bbsplit_index test_results/prepare_genome_test1/BBSplit_index \ -profile docker \ - -resume \ No newline at end of file + -resume + +# echo "> Test 2: Running workflow with fastp" +# nextflow run target/nextflow/workflows/pre_processing/main.nf \ +# --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ +# --publish_dir "test_results/pre_processing_test2" \ +# --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --gtf testData/minimal_test/reference/genes.gtf \ +# --salmon_index testData/minimal_test/reference/salmon_index \ +# --skip_trimming false \ +# --trimmer fastp \ +# --remove_ribo_rna false \ +# --ribo_database_manifest testData/minimal_test/reference/rrna-db-defaults.txt \ +# --skip_bbsplit false \ +# --bbsplit_index test_results/output_test1/BBSplit_index \ +# -profile docker \ +# -resume + +echo "Removing reference data files" +rm testData/minimal_test/reference/genes.gtf +rm -r testData/minimal_test/reference/salmon_index + +# TODO: Fix error while running sortmerna component +# docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown. \ No newline at end of file diff --git a/src/workflows/prepare_genome/config.vsh.yaml b/src/workflows/prepare_genome/config.vsh.yaml index 0d1816e..f50b6b5 100644 --- a/src/workflows/prepare_genome/config.vsh.yaml +++ b/src/workflows/prepare_genome/config.vsh.yaml @@ -163,6 +163,7 @@ dependencies: - name: salmon/salmon_index repository: biobox - name: kallisto/kallisto_index + # repository: biobox runners: - type: executable diff --git a/src/workflows/prepare_genome/main.nf b/src/workflows/prepare_genome/main.nf index bc2fa44..1f23a45 100644 --- a/src/workflows/prepare_genome/main.nf +++ b/src/workflows/prepare_genome/main.nf @@ -35,9 +35,15 @@ workflow run_wf { // gff to gtf | gffread.run ( runIf: {id, state -> !state.gtf && state.gff}, - fromState: [ "input": "annotation" ], + fromState: [ + "input": "gff", + "genome": "fasta" + ], toState: [ "gtf": "outfile" ], - args: [output: "gene_annotation.gtf"] + args: [ + outfile: "gene_annotation.gtf", + gtf_output: true + ] ) | gtf_filter.run( @@ -116,13 +122,19 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.transcript_fasta}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "transcript_fasta": "transcript_fasta" ], - key: "make_transcript_fasta", - args: [transcript_fasta: "transcriptome.fasta"] + toState: [ "make_transcript_fasta_output": "output" ], + key: "make_transcript_fasta",\ + args: [reference_name: "genome"] ) + | map { id, state -> + def transcript_fasta = (!state.transcript_fasta) ? + state.make_transcript_fasta_output.listFiles().find{it.name == "genome.transcripts.fa"} : + state.transcript_fasta + [ id, state + [transcript_fasta: transcript_fasta] ] + } // chromosome size and fai index | getchromsizes.run ( @@ -195,11 +207,12 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.rsem_index && state.aligner == 'star_rsem'}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "rsem_index": "rsem" ], + toState: [ "rsem_index": "output" ], key: "generate_rsem_index", + args: [reference_name: "genome"] ) // TODO: Uncompress HISAT2 index or generate from scratch if required @@ -229,10 +242,7 @@ workflow run_wf { // Uncompress Kallisto index or generate from scratch if required | untar.run ( runIf: {id, state -> state.kallisto_index}, - fromState: [ - "input": "kallisto_index", - "pseudo_aligner_kmer_size": "pseudo_aligner_kmer_size" - ], + fromState: [ "input": "kallisto_index" ], toState: [ "kallisto_index": "output" ], key: "untar_kallisto_index", args: [output: "Kallisto_index"] diff --git a/src/workflows/prepare_genome/test_run.sh b/src/workflows/prepare_genome/test_run.sh index ab3f7b3..4c274cd 100755 --- a/src/workflows/prepare_genome/test_run.sh +++ b/src/workflows/prepare_genome/test_run.sh @@ -1,26 +1,50 @@ #!/bin/bash -viash ns build --setup cb --parallel +# viash ns build --setup cb --parallel -q prepare_genome +# echo "Test 1: Annotation file format - GTF" +# nextflow run target/nextflow/workflows/prepare_genome/main.nf \ +# --id test1 \ +# --publish_dir "test_results/prepare_genome_test1" \ +# --fasta testData/minimal_test/reference/genome.fasta \ +# --gtf testData/minimal_test/reference/genes.gtf.gz \ +# --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --genotype false \ +# --biotype gene_biotype \ +# --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ +# --salmon_index testData/minimal_test/reference/salmon.tar.gz \ +# --rsem_index testData/minimal_test/reference/rsem.tar.gz \ +# -profile docker \ +# -resume + +# echo "Test 2: Annotation file format - GFF" +# nextflow run target/nextflow/workflows/prepare_genome/main.nf \ +# --id test2 \ +# --publish_dir "test_results/prepare_genome_test2" \ +# --fasta testData/minimal_test/reference/genome.fasta \ +# --gff testData/minimal_test/reference/genes.gff.gz \ +# --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --genotype false \ +# --biotype gene_biotype \ +# --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ +# --salmon_index testData/minimal_test/reference/salmon.tar.gz \ +# --rsem_index testData/minimal_test/reference/rsem.tar.gz \ +# -profile docker \ +# -resume + +echo "Test 3: Annotation file format - GTF; Generate indices; Generate transcripts fasta" nextflow run target/nextflow/workflows/prepare_genome/main.nf \ - --id ref \ - --publish_dir "testData/test_output" \ - --fasta testData/reference/genome.fasta \ - --gtf testData/reference/genes.gtf.gz \ - --additional_fasta testData/reference/gfp.fa.gz \ - --transcript_fasta testData/reference/transcriptome.fasta \ + --id test3 \ + --publish_dir "test_results/prepare_genome_test3" \ + --fasta testData/minimal_test/reference/genome.fasta \ + --gtf testData/minimal_test/reference/genes.gtf.gz \ + --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ --genotype false \ --biotype gene_biotype \ - --bbsplit_fasta_list testData/reference/bbsplit_fasta_list.txt \ - --salmon_index testData/reference/salmon.tar.gz \ - # -profile docker \ - # -resume - # --gff testData/reference/genes.gff.gz \ - # --prepare_tools_indices a,b,c \ - # --gene_bed "" \ - # --splicesites "" \ - # --star_index "" \ - # --bbsplit_index "" \ - # --rsem_index testData/reference/rsem.tar.gz \ - # --salmon_index testData/reference/salmon.tar.gz \ - # --hisat2_index testData/reference/hisat2.tar.gz \ + --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ + --pseudo_aligner kallisto \ + --aligner star_rsem \ + -profile docker \ + -resume diff --git a/src/workflows/pseudo_alignment_and_quant/config.vsh.yaml b/src/workflows/pseudo_alignment_and_quant/config.vsh.yaml index 7a67ba8..976bc06 100644 --- a/src/workflows/pseudo_alignment_and_quant/config.vsh.yaml +++ b/src/workflows/pseudo_alignment_and_quant/config.vsh.yaml @@ -59,11 +59,10 @@ argument_groups: - name: "--pseudo_multiqc" type: file direction: output - default: $id.quant.log - name: "--quant_out_dir" type: file direction: output - default: $id.salmon_quant + default: $id.quant - name: "--salmon_quant_results_file" type: file direction: output diff --git a/src/workflows/pseudo_alignment_and_quant/main.nf b/src/workflows/pseudo_alignment_and_quant/main.nf index 18dd755..e275962 100644 --- a/src/workflows/pseudo_alignment_and_quant/main.nf +++ b/src/workflows/pseudo_alignment_and_quant/main.nf @@ -46,11 +46,16 @@ workflow run_wf { lib_type: state.lib_type ] }, toState: [ - "quant_results_dir": "output", + "quant_out_dir": "output", "salmon_quant_results_file": "quant_results" ] ) + | map { id, state -> + def mod_state = (state.pseudo_aligner == 'salmon') ? state + [pseudo_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | kallisto_quant.run ( runIf: { id, state -> state.pseudo_aligner == 'kallisto'}, fromState: [ diff --git a/src/workflows/pseudo_alignment_and_quant/test_run.sh b/src/workflows/pseudo_alignment_and_quant/test_run.sh index ff0c09a..cdc2bd0 100755 --- a/src/workflows/pseudo_alignment_and_quant/test_run.sh +++ b/src/workflows/pseudo_alignment_and_quant/test_run.sh @@ -1,26 +1,45 @@ #!/bin/bash -viash ns build --setup cb -q pseudo_alignment_and_quant +# viash ns build --setup cb -q pseudo_alignment_and_quant # Split error message from standard output # viash ns list > /dev/null -CURR=`pwd` +echo "> Preparing reference data files" +gunzip --keep testData/minimal_test/reference/genes.gtf.gz +mkdir -p testData/minimal_test/reference/salmon_index +tar -C testData/minimal_test/reference/salmon_index --strip-components 1 -xavf testData/minimal_test/reference/salmon.tar.gz -# Test paired-end data cat > testData/minimal_test/input_fastq/sample_sheet.csv << HERE id,fastq_1,fastq_2,strandedness WT_REP1,SRR6357070_1.fastq.gz,SRR6357070_2.fastq.gz,reverse -WT_REP2,SRR6357072_1.fastq.gz,SRR6357072_2.fastq.gz,reverse +RAP1_UNINDUCED_REP1,SRR6357073_1.fastq.gz,,reverse HERE +echo "> Test 1: Salmon qunatification" nextflow run target/nextflow/workflows/pseudo_alignment_and_quant/main.nf \ --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ - --publish_dir "test_results/psudo_alignment_test" \ + --publish_dir "test_results/pseudo_alignment_test1" \ --fasta testData/minimal_test/reference/genome.fasta \ --gtf testData/minimal_test/reference/genes.gtf.gz \ --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ - --salmon_index testData/minimal_test/reference/salmon.tar.gz \ + --salmon_index testData/minimal_test/reference/salmon_index \ --pseudo_aligner salmon \ -profile docker \ - # -resume \ No newline at end of file + -resume + +# echo "> Test 2: Kallisto qunatification" +# nextflow run target/nextflow/workflows/pseudo_alignment_and_quant/main.nf \ +# --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ +# --publish_dir "test_results/pseudo_alignment_test2" \ +# --fasta testData/minimal_test/reference/genome.fasta \ +# --gtf testData/minimal_test/reference/genes.gtf.gz \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --kallisto_index test_results/prepare_genome_test3/Kallisto_index \ +# --pseudo_aligner kallisto \ +# -profile docker \ +# -resume + +echo "Removing reference data files" +rm testData/minimal_test/reference/genes.gtf +rm -r testData/minimal_test/reference/salmon_index diff --git a/src/workflows/quality_control/config.vsh.yaml b/src/workflows/quality_control/config.vsh.yaml index 072d347..63ccddb 100644 --- a/src/workflows/quality_control/config.vsh.yaml +++ b/src/workflows/quality_control/config.vsh.yaml @@ -41,10 +41,10 @@ argument_groups: description: By default, the pipeline uses the gene_name field to obtain additional gene identifiers from the input GTF file when running Salmon. - name: "--quant_out_dir" type: file - description: Directory containing quantification results. + description: Directory containing Salmon quantification results. - name: "--quant_results_file" type: file - description: Quantification file. + description: Salmon quantification file. - name: "--pseudo_quant_out_dir" type: file description: Directory containing quantification results for pseudo alignment. @@ -59,8 +59,14 @@ argument_groups: description: Method used for alognment and qqunatification. - name: "--pseudo_aligner" type: string - description: Method used for [seudo alignment and quantification. - + description: Method used for pseudo alignment and quantification. + - name: "--rsem_counts_gene" + type: file + description: Expression counts on gene level + - name: "--rsem_counts_transcripts" + type: file + description: Expression counts on transcript level + - name: "--skip_qc" type: boolean default: false @@ -258,11 +264,6 @@ argument_groups: type: string - name: "--multiqc_methods_description" type: file - - name: "--mqc_yml" - type: file - description: Software versions - - name: "--workflow_summary" - type: file - name: "--passed_trimmed_reads" type: boolean - name: "--num_trimmed_reads" @@ -297,8 +298,8 @@ argument_groups: must_exist: false # - name: "--hisat2_multiqc" # type: file - # - name: "--rsem_multiqc" - # type: file + - name: "--rsem_multiqc" + type: file - name: "--genome_bam_stats" type: file must_exist: false @@ -542,9 +543,6 @@ argument_groups: type: file direction: output default: multiqc_plots - - name: "--multiqc_versions" - type: file - direction: output # Biotype QC - name: "--featurecounts" @@ -600,27 +598,27 @@ argument_groups: - name: "--pseudo_tpm_gene" type: file direction: output - default: salmon.merged.pseudo_gene_tpm.tsv + default: pseudo_gene_tpm.tsv - name: "--pseudo_counts_gene" type: file direction: output - default: salmon.merged.pseudo_gene_counts.tsv + default: pseudo_gene_counts.tsv - name: "--pseudo_counts_gene_length_scaled" type: file direction: output - default: salmon.merged.pseudo_gene_counts_length_scaled.tsv + default: pseudo_gene_counts_length_scaled.tsv - name: "--pseudo_counts_gene_scaled" type: file direction: output - default: salmon.merged.pseudo_gene_counts_scaled.tsv + default: pseudo_gene_counts_scaled.tsv - name: "--pseudo_tpm_transcript" type: file direction: output - default: salmon.merged.pseudo_transcript_tpm.tsv + default: pseudo_transcript_tpm.tsv - name: "--pseudo_counts_transcript" type: file direction: output - default: salmon.merged.pseudo_transcript_counts.tsv + default: pseudo_transcript_counts.tsv - name: "--pseudo_quant_merged_summarizedexperiment" type: file direction: output @@ -642,6 +640,8 @@ dependencies: - name: rseqc/rseqc_tin - name: dupradar - name: qualimap + # - name: qualimap/qualimap_rnaseq + # repository: biobox - name: preseq_lcextrap - name: featurecounts repository: biobox @@ -650,6 +650,7 @@ dependencies: - name: prepare_multiqc_input - name: multiqc repository: biobox + - name: rsem/rsem_merge_counts - name: workflows/merge_quant_results runners: diff --git a/src/workflows/quality_control/main.nf b/src/workflows/quality_control/main.nf index 0032061..c142272 100644 --- a/src/workflows/quality_control/main.nf +++ b/src/workflows/quality_control/main.nf @@ -55,7 +55,7 @@ workflow run_wf { "input": "genome_bam", "extra_preseq_args": "extra_preseq_args" ], - toState: [ "preseq_output": "output" ], + toState: [ "preseq_output": "output" ] ) | rseqc_bamstat.run ( @@ -214,10 +214,49 @@ workflow run_wf { merged_ch = qc_ch | toSortedList - | map { list -> def ids = list.collect { id, state -> state.id } def strandedness = list.collect { id, state -> state.strandedness } + def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + def passed_mapping = list.collect { id, state -> state.passed_mapping } + def percent_mapped = list.collect { id, state -> state.percent_mapped } + def inferred_strand = list.collect { id, state -> state.inferred_strand } + def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + def gtf = list.collect { id, state -> state.gtf }.unique()[0] + def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + def aligner = list.collect { id, state -> state.aligner }.unique()[0] + def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + def quant_results = list.collect { id, state -> + (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + state.quant_results_file : + null } + def rsem_counts_gene = list.collect { id, state -> + (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + state.rsem_counts_gene : + null } + def rsem_counts_transcripts = list.collect { id, state -> + (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + state.rsem_counts_transcripts : + null } + def pseudo_salmon_quant_results = list.collect { id, state -> + (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + state.pseudo_salmon_quant_results_file : + null } + def pseudo_kallisto_quant_results = list.collect { id, state -> + (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + state.pseudo_kallisto_quant_results_file : + null } def fastqc_zip_1 = list.collect { id, state -> (state.fastqc_zip_1 instanceof java.nio.file.Path && state.fastqc_zip_1.exists()) ? state.fastqc_zip_1 : @@ -242,26 +281,14 @@ workflow run_wf { (state.trim_log_2 instanceof java.nio.file.Path && state.trim_log_2.exists()) ? state.trim_log_2 : null } - def sortmerna_log = list.collect { id, state -> - (state.sortmerna_log instanceof java.nio.file.Path && state.sortmerna_log.exists()) ? - state.sortmerna_log : + def sortmerna_multiqc = list.collect { id, state -> + (state.sortmerna_multiqc instanceof java.nio.file.Path && state.sortmerna_multiqc.exists()) ? + state.sortmerna_multiqc : null } def star_multiqc = list.collect { id, state -> (state.star_multiqc instanceof java.nio.file.Path && state.star_multiqc.exists()) ? state.star_multiqc : null } - def quant_results = list.collect { id, state -> - (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? - state.quant_results_file : - null } - def pseudo_salmon_quant_results = list.collect { id, state -> - (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? - state.pseudo_salmon_quant_results_file : - null } - def pseudo_kallisto_quant_results = list.collect { id, state -> - (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? - state.pseudo_kallisto_quant_results_file : - null } def genome_bam_stats = list.collect { id, state -> (state.genome_bam_stats instanceof java.nio.file.Path && state.genome_bam_stats.exists()) ? state.genome_bam_stats : @@ -278,6 +305,14 @@ workflow run_wf { (state.markduplicates_multiqc instanceof java.nio.file.Path && state.markduplicates_multiqc.exists()) ? state.markduplicates_multiqc : null } + def salmon_multiqc = list.collect { id, state -> + (state.salmon_multiqc instanceof java.nio.file.Path && state.salmon_multiqc.exists()) ? + state.salmon_multiqc : + null } + def rsem_multiqc = list.collect { id, state -> + (state.rsem_multiqc instanceof java.nio.file.Path && state.rsem_multiqc.exists()) ? + state.rsem_multiqc : + null } def pseudo_multiqc = list.collect { id, state -> (state.pseudo_multiqc instanceof java.nio.file.Path && state.pseudo_multiqc.exists()) ? state.pseudo_multiqc : @@ -338,40 +373,45 @@ workflow run_wf { (state.tin_output_summary instanceof java.nio.file.Path && state.tin_output_summary.exists()) ? state.tin_output_summary : null } - def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } - def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } - def passed_mapping = list.collect { id, state -> state.passed_mapping } - def percent_mapped = list.collect { id, state -> state.percent_mapped } - def inferred_strand = list.collect { id, state -> state.inferred_strand } - def passed_strand_check = list.collect { id, state -> state.passed_strand_check } - def gtf = list.collect { id, state -> state.gtf }.unique()[0] - def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] - def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] - def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] - def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc } .unique()[0] - def aligner = list.collect { id, state -> state.aligner } .unique()[0] - def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner } .unique()[0] - def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] - 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 multiqc_custom_config = list.collect { id, state -> state.multiqc_custom_config }.unique()[0] - def skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] - def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] - def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] ["merged", [ ids: ids, strandedness: strandedness, + num_trimmed_reads: num_trimmed_reads, + passed_trimmed_reads: passed_trimmed_reads, + passed_mapping: passed_mapping, + percent_mapped: percent_mapped, + inferred_strand: inferred_strand, + passed_strand_check: passed_strand_check, + skip_align: skip_align, + skip_pseudo_align: skip_pseudo_align, + quant_results: quant_results, + rsem_counts_gene: rsem_counts_gene, + rsem_counts_transcripts: rsem_counts_transcripts, + pseudo_salmon_quant_results: pseudo_salmon_quant_results, + pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + gtf: gtf, + gtf_extra_attributes: gtf_extra_attributes, + gtf_group_features: gtf_group_features, + pca_header_multiqc: pca_header_multiqc, + clustering_header_multiqc: clustering_header_multiqc, + aligner: aligner, + pseudo_aligner: pseudo_aligner, + deseq2_vst: deseq2_vst, + extra_deseq2_args: extra_deseq2_args, + extra_deseq2_args2: extra_deseq2_args2, + skip_deseq2_qc: skip_deseq2_qc, fastqc_zip: fastqc_zip_1 + fastqc_zip_2, trim_zip: trim_zip_1 + trim_zip_2, trim_log: trim_log_1 + trim_log_2, - sortmerna_log: sortmerna_log, + sortmerna_multiqc: sortmerna_multiqc, star_multiqc: star_multiqc, - salmon_multiqc: quant_results, genome_bam_stats: genome_bam_stats, genome_bam_flagstat: genome_bam_flagstat, genome_bam_idxstats: genome_bam_idxstats, markduplicates_multiqc: markduplicates_multiqc, + salmon_multiqc: salmon_multiqc, + rsem_multiqc: rsem_multiqc, pseudo_multiqc: pseudo_multiqc, featurecounts_multiqc: featurecounts_multiqc, featurecounts_rrna_multiqc: featurecounts_rrna_multiqc, @@ -387,32 +427,114 @@ workflow run_wf { read_distribution_output: read_distribution_output, read_duplication_output_duplication_rate_mapping: read_duplication_output_duplication_rate_mapping, tin_output_summary: tin_output_summary, - quant_results: quant_results, - pseudo_salmon_quant_results: pseudo_salmon_quant_results, - pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, - gtf: gtf, - gtf_extra_attributes: gtf_extra_attributes, - gtf_group_features: gtf_group_features, - pca_header_multiqc: pca_header_multiqc, - clustering_header_multiqc: clustering_header_multiqc, - aligner: aligner, - pseudo_aligner: pseudo_aligner, - deseq2_vst: deseq2_vst, - extra_deseq2_args: extra_deseq2_args, - extra_deseq2_args2: extra_deseq2_args2, - skip_deseq2_qc: skip_deseq2_qc, - num_trimmed_reads: num_trimmed_reads, - passed_trimmed_reads: passed_trimmed_reads, - passed_mapping: passed_mapping, - percent_mapped: percent_mapped, - inferred_strand: inferred_strand, - passed_strand_check: passed_strand_check, - multiqc_custom_config: multiqc_custom_config, - skip_align: skip_align, - skip_pseudo_align: skip_pseudo_align + multiqc_custom_config: multiqc_custom_config ] ] } - + + // | map { list -> + // def ids = list.collect { id, state -> state.id } + // def strandedness = list.collect { id, state -> state.strandedness } + // def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + // def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + // def passed_mapping = list.collect { id, state -> state.passed_mapping } + // def percent_mapped = list.collect { id, state -> state.percent_mapped } + // def inferred_strand = list.collect { id, state -> state.inferred_strand } + // def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + // def gtf = list.collect { id, state -> state.gtf }.unique()[0] + // def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + // def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + // def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + // def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + // def aligner = list.collect { id, state -> state.aligner }.unique()[0] + // def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + // def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + // 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + // def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + // def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + // def quant_results = list.collect { id, state -> + // (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + // state.quant_results_file : + // null } + // def rsem_counts_gene = list.collect { id, state -> + // (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + // state.rsem_counts_gene : + // null } + // def rsem_counts_transcripts = list.collect { id, state -> + // (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + // state.rsem_counts_transcripts : + // null } + // def pseudo_salmon_quant_results = list.collect { id, state -> + // (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + // state.pseudo_salmon_quant_results_file : + // null } + // def pseudo_kallisto_quant_results = list.collect { id, state -> + // (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + // state.pseudo_kallisto_quant_results_file : + // null } + // def fastqc_zip_1_dirs = list.collect{it[1].fastqc_zip_1.getParent()} + // def fastqc_zip_2_dirs = list.collect{it[1].fastqc_zip_2.getParent()} + // def trim_zip_1_dirs = list.collect{it[1].trim_zip_1.getParent()} + // def trim_zip_2_dirs = list.collect{it[1].trim_zip_2.getParent()} + // def trim_log_1_dirs = list.collect{it[1].trim_log_1.getParent()} + // def trim_log_2_dirs = list.collect{it[1].trim_log_2.getParent()} + // def sortmerna_multiqc_dirs = list.collect{it[1].sortmerna_multiqc.getParent()} + // def star_multiqc_dirs = list.collect{it[1].star_multiqc.getParent()} + // def genome_bam_stats_dirs = list.collect{it[1].genome_bam_stats.getParent()} + // def genome_bam_flagstat_dirs = list.collect{it[1].genome_bam_flagstat.getParent()} + // def genome_bam_idxstats_dirs = list.collect{it[1].genome_bam_idxstats} + // def markduplicates_multiqc_dirs = list.collect{it[1].markduplicates_multiqc.getParent()} + // def salmon_multiqc_dirs = list.collect{it[1].salmon_multiqc} + // def rsem_multiqc_dirs = list.collect{it[1].rsem_multiqc.getParent()} + // def pseudo_multiqc_dirs = list.collect{it[1].pseudo_multiqc.getParent()} + // def featurecounts_multiqc_dirs = list.collect{it[1].featurecounts_multiqc.getParent()} + // def featurecounts_rrna_multiqc_dirs = list.collect{it[1].featurecounts_rrna_multiqc.getParent()} + // def preseq_output_dirs = list.collect{it[1].preseq_output.getParent()} + // def qualimap_output_dirs = list.collect{it[1].qualimap_output_dir} + // def dupradar_output_dup_intercept_mqc_dirs = list.collect{it[1].dupradar_output_dup_intercept_mqc.getParent()} + // def dupradar_output_duprate_exp_denscurve_mqc_dirs = list.collect{it[1].dupradar_output_duprate_exp_denscurve_mqc.getParent()} + // def bamstat_output_dirs = list.collect{it[1].bamstat_output.getParent()} + // def strandedness_output_dirs = list.collect{it[1].strandedness_output.getParent()} + // def inner_dist_output_freq_dirs = list.collect{it[1].inner_dist_output_freq.getParent()} + // def junction_annotation_output_log_dirs = list.collect{it[1].junction_annotation_output_log.getParent()} + // def junction_saturation_output_plot_r_dirs = list.collect{it[1].junction_saturation_output_plot_r.getParent()} + // def read_distribution_output_dirs = list.collect{it[1].read_distribution_output.getParent()} + // def read_duplication_output_duplication_rate_mapping_dirs = list.collect{it[1].read_duplication_output_duplication_rate_mapping.getParent()} + // def tin_output_summary_dirs = list.collect{it[1].tin_output_summary.getParent()} + // def multiqc_custom_config_dirs = list.collect{it[1].multiqc_custom_config.getParent()} + // ["merged", [ + // ids: ids, + // strandedness: strandedness, + // num_trimmed_reads: num_trimmed_reads, + // passed_trimmed_reads: passed_trimmed_reads, + // passed_mapping: passed_mapping, + // percent_mapped: percent_mapped, + // inferred_strand: inferred_strand, + // passed_strand_check: passed_strand_check, + // skip_align: skip_align, + // skip_pseudo_align: skip_pseudo_align, + // quant_results: quant_results, + // rsem_counts_gene: rsem_counts_gene, + // rsem_counts_transcripts: rsem_counts_transcripts, + // pseudo_salmon_quant_results: pseudo_salmon_quant_results, + // pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + // gtf: gtf, + // gtf_extra_attributes: gtf_extra_attributes, + // gtf_group_features: gtf_group_features, + // pca_header_multiqc: pca_header_multiqc, + // clustering_header_multiqc: clustering_header_multiqc, + // aligner: aligner, + // pseudo_aligner: pseudo_aligner, + // deseq2_vst: deseq2_vst, + // extra_deseq2_args: extra_deseq2_args, + // extra_deseq2_args2: extra_deseq2_args2, + // skip_deseq2_qc: skip_deseq2_qc, + // multiqc_input: fastqc_zip_1_dirs + fastqc_zip_2_dirs + trim_zip_1_dirs + trim_zip_2_dirs + trim_log_1_dirs + trim_log_2_dirs + sortmerna_multiqc_dirs + star_multiqc_dirs + genome_bam_stats_dirs + genome_bam_flagstat_dirs + genome_bam_idxstats_dirs + markduplicates_multiqc_dirs + salmon_multiqc_dirs + rsem_multiqc_dirs + pseudo_multiqc_dirs + featurecounts_multiqc_dirs + featurecounts_rrna_multiqc_dirs + preseq_output_dirs + qualimap_output_dirs + dupradar_output_dup_intercept_mqc_dirs + dupradar_output_duprate_exp_denscurve_mqc_dirs + bamstat_output_dirs + strandedness_output_dirs + inner_dist_output_freq_dirs + junction_annotation_output_log_dirs + junction_saturation_output_plot_r_dirs + read_distribution_output_dirs + read_duplication_output_duplication_rate_mapping_dirs + tin_output_summary_dirs + multiqc_custom_config_dirs + // ] ] + // } + // Merge quantification results of alignment | merge_quant_results.run ( runIf: { id, state -> !state.skip_align && state.aligner == 'star_salmon' }, @@ -434,19 +556,36 @@ workflow run_wf { "lengths_transcript": "lengths_transcript", "quant_merged_summarizedexperiment": "quant_merged_summarizedexperiment" ], - key: "merge_qunat_results" + key: "merge_quant_results" + ) + + | rsem_merge_counts.run ( + runIf: { id, state -> state.aligner == 'star_rsem' }, + fromState: [ + "counts_gene": "rsem_counts_gene", + "counts_transcripts": "rsem_counts_transcripts" + ], + toState: [ + "tpm_gene": "merged_gene_tpm", + "counts_gene": "merged_gene_counts", + "tpm_transcript": "merged_transcript_tpm", + "counts_transcript": "merged_transcript_counts" + ] ) | deseq2_qc.run ( runIf: { id, state -> !state.skip_qc && !state.skip_deseq2_qc && !state.skip_align }, - fromState: [ - "counts": "counts_gene_length_scaled", - "pca_header_multiqc": "pca_header_multiqc", - "clustering_header_multiqc": "clustering_header_multiqc", - "deseq2_vst": "deseq2_vst", - "extra_deseq2_args": "extra_deseq2_args", - "extra_deseq2_args2": "extra_deseq2_args2" - ], + fromState: { id, state -> + def counts = (state.aligner == "star_rsem") ? state.counts_gene : state.counts_gene_length_scaled + [ + counts: counts, + pca_header_multiqc: state.pca_header_multiqc, + clustering_header_multiqc: state.clustering_header_multiqc, + deseq2_vst: state.deseq2_vst, + extra_deseq2_args: state.extra_deseq2_args, + extra_deseq2_args2: state.extra_deseq2_args2 + ] + }, toState: [ "deseq2_output": "deseq2_output", "deseq2_pca_multiqc": "pca_multiqc", @@ -547,14 +686,15 @@ workflow run_wf { "fastqc_raw_multiqc": "fastqc_zip", "fastqc_trim_multiqc": "trim_zip", "trim_log_multiqc": "trim_log", - "sortmerna_multiqc": "sortmerna_log", + "sortmerna_multiqc": "sortmerna_multiqc", "star_multiqc": "star_multiqc", "salmon_multiqc": "salmon_multiqc", + "rsem_multiqc": "rsem_multiqc", + "pseudo_multiqc": "pseudo_multiqc", "samtools_stats": "genome_bam_stats", "samtools_flagstat": "genome_bam_flagstat", "samtools_idxstats": "genome_bam_idxstats", - "markduplicates_multiqc": "markduplicates_multiqc", - "pseudo_multiqc": "pseudo_multiqc", + "markduplicates_multiqc": "markduplicates_multiqc", "featurecounts_multiqc": "featurecounts_multiqc", "featurecounts_rrna_multiqc": "featurecounts_rrna_multiqc", "aligner_pca_multiqc": "deseq2_pca_multiqc", @@ -583,10 +723,11 @@ workflow run_wf { "title": "multiqc_title", "input": "multiqc_input", ], + args: [exclude_modules: "general_stats"], toState: [ "multiqc_report": "output_report", "multiqc_data": "output_data", - "multiqc_plots": "output_plots", + "multiqc_plots": "output_plots" ] ) @@ -688,8 +829,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) @@ -749,3 +889,5 @@ def getInferexperimentStrandedness(inferexperiment_file, cutoff=30) { return [ strandedness, sense, antisense, undetermined ] } + + diff --git a/src/workflows/rnaseq/config.vsh.yaml b/src/workflows/rnaseq/config.vsh.yaml index f8a6029..0060fda 100644 --- a/src/workflows/rnaseq/config.vsh.yaml +++ b/src/workflows/rnaseq/config.vsh.yaml @@ -233,11 +233,7 @@ argument_groups: - name: "--skip_pseudo_alignment" type: boolean_true description: Skip all of the pseudo-alignment-based processes within the pipeline. - - name: extra_rsem_prepare_reference_args - type: string - description: Extra arguments to pass to rsem-prepare-reference command in addition to defaults defined by the pipeline. - default: '--star' - - name: extra_rsem_calculate_expression_args + - name: --extra_rsem_calculate_expression_args type: string description: Extra arguments to pass to rsem-calculate-expression command in addition to defaults defined by the pipeline. default: '--star --star-output-genome-bam --star-gzipped-read-file --estimate-rspd --seed 1' @@ -349,42 +345,45 @@ argument_groups: - name: Output arguments: + # Reference files - name: "--output_fasta" type: file direction: output - default: genome/reference_genome.fasta + default: reference/genome.fasta - name: "--output_gtf" type: file direction: output - default: genome/gene_annotation.gtf + default: reference/gene_annotation.gtf - name: "--output_transcript_fasta" type: file direction: output - default: genome/transcriptome.fasta + default: reference/transcriptome.fasta - name: "--output_gene_bed" type: file direction: output - default: genome/gene_annotation.bed + default: reference/gene_annotation.bed - name: "--output_star_index" type: file direction: output description: Path to STAR index. - default: genome/index/STAR + default: reference/index/STAR - name: "--output_salmon_index" type: file direction: output description: Path to Salmon index. - default: genome/index/Salmon + default: reference/index/Salmon - name: "--output_bbsplit_index" type: file direction: output description: Path to BBSplit index. - default: genome/index/BBSplit + default: reference/index/BBSplit - name: "--output_kallisto_index" type: file direction: output description: Path to Kallisto index. - default: genome/index/Kallisto + default: reference/index/Kallisto + + # fastq - name: "--output_fastq_1" type: file direction: output @@ -399,6 +398,8 @@ argument_groups: must_exist: false description: Path to output directory default: fastq/$id.read_2.fastq + + # FastQC - name: "--fastqc_html_1" type: file direction: output @@ -427,18 +428,6 @@ argument_groups: required: false must_exist: false default: fastqc_raw/$id.read_2.fastqc.zip - - name: "--trim_log_1" - type: file - direction: output - required: false - must_exist: false - default: trimgalore/$id.read_1.trimming_report.txt - - name: "--trim_log_2" - type: file - direction: output - required: false - must_exist: false - default: trimgalore/$id.read_2.trimming_report.txt - name: "--trim_html_1" type: file direction: output @@ -463,6 +452,34 @@ argument_groups: required: false must_exist: false default: fastqc_trim/$id.read_2.trimmed_fastqc.zip + + # TrimGalore + - name: "--trim_log_1" + type: file + direction: output + required: false + must_exist: false + default: trimgalore/$id.read_1.trimming_report.txt + - name: "--trim_log_2" + type: file + direction: output + required: false + must_exist: false + default: trimgalore/$id.read_2.trimming_report.txt + + # fastp + - name: --fastp_trim_json + type: file + description: The fastp json format report file name + default: fastp/$id_out.json + direction: output + - name: --fastp_trim_html + type: file + description: The fastp html format report file name + default: fastp/$id_out.html + direction: output + + # SortMeRNA - name: "--sortmerna_log" type: file direction: output @@ -470,18 +487,30 @@ argument_groups: required: false must_exist: false description: Sortmerna log file. + + # STAR - name: "--star_alignment" type: file direction: output - default: STAR_alignment/$id + default: STAR/$id - name: "--genome_bam_sorted" type: file direction: output - default: STAR_alignment/genome_processed/$id.genome.bam + default: STAR/genome_processed/$id.genome.bam - name: "--genome_bam_index" type: file direction: output - default: STAR_alignment/genome_processed/$id.genome.bam.bai + default: STAR/genome_processed/$id.genome.bam.bai + - name: "--transcriptome_bam" + type: file + direction: output + default: STAR/transcriptome_processed/$id.transcriptome.bam + - name: "--transcriptome_bam_index" + type: file + direction: output + default: STAR/transcriptome_processed/$id.transcriptome.bam.bai + + # samtools - name: "--genome_bam_stats" type: file direction: output @@ -494,14 +523,6 @@ argument_groups: type: file direction: output default: samtools_stats/$id.genome.idxstats - - name: "--transcriptome_bam" - type: file - direction: output - default: STAR_alignment/transcriptome_processed/$id.transcriptome.bam - - name: "--transcriptome_bam_index" - type: file - direction: output - default: STAR_alignment/transcriptome_processed/$id.transcriptome.bam.bai - name: "--transcriptome_bam_stats" type: file direction: output @@ -514,42 +535,85 @@ argument_groups: type: file direction: output default: samtools_stats/$id.transcriptome.idxstats + + # Transcript quantification - name: "--salmon_quant_results" type: file direction: output - default: salmon/$id + default: STAR_Salmon/$id + - name: "--salmon_quant_results_file" + type: file + direction: output + default: STAR_Salmon/$id/quant.sf + - name: "--pseudo_quant_results" + type: file + direction: output + default: Pseudo_align_quant/$id + + # RSEM + - name: "--rsem_counts_gene" + type: file + description: Expression counts on gene level + default: RSEM/$id.genes.results + direction: output + - name: "--rsem_counts_transcripts" + type: file + description: Expression counts on transcript level + default: RSEM/$id.isoforms.results + direction: output + - name: "--bam_star_rsem" + type: file + description: BAM file generated by STAR (from RSEM) + default: RSEM/$id.STAR.genome.bam + direction: output + - name: "--bam_genome_rsem" + type: file + description: Genome BAM file (from RSEM) + default: RSEM/$id.genome.bam + direction: output + - name: "--bam_transcript_rsem" + type: file + description: Transcript BAM file (from RSEM) + default: RSEM/$id.transcript.bam + direction: output + + # Quantification (alignment) - name: "--tpm_gene" type: file direction: output - default: salmon/gene_tpm.tsv + default: transcript_quantification/gene_tpm.tsv - name: "--counts_gene" type: file direction: output - default: salmon/gene_counts.tsv + default: transcript_quantification/gene_counts.tsv - name: "--counts_gene_length_scaled" type: file direction: output - default: salmon/gene_counts_length_scaled.tsv + default: transcript_quantification/gene_counts_length_scaled.tsv - name: "--counts_gene_scaled" type: file direction: output - default: salmon/gene_counts_scaled.tsv + default: transcript_quantification/gene_counts_scaled.tsv - name: "--tpm_transcript" type: file direction: output - default: salmon/transcript_tpm.tsv + default: transcript_quantification/transcript_tpm.tsv - name: "--counts_transcript" type: file direction: output - default: salmon/transcript_counts.tsv - - name: "--salmon_merged_summarizedexperiment" + default: transcript_quantification/transcript_counts.tsv + - name: "--quant_merged_summarizedexperiment" type: file direction: output - default: salmon/summarizedexperiment + default: transcript_quantification/summarizedexperiment + + # MarkDuplicates - name: "--markduplicates_metrics" type: file direction: output - default: picard/$id.sorted.MarkDuplicates.metrics.txt + default: picard/$id.MarkDuplicates.metrics.txt + + # StringTie - name: "--stringtie_transcript_gtf" type: file direction: output @@ -566,6 +630,8 @@ argument_groups: type: file direction: output default: stringtie/$id.ballgown + + # featureCounts - name: "--featurecounts" type: file direction: output @@ -584,6 +650,8 @@ argument_groups: direction: output must_exist: false default: featurecounts/$id.featureCounts_rrna_mqc.tsv + + # bedGraph - name: "--bedgraph_forward" type: file direction: output @@ -592,6 +660,8 @@ argument_groups: type: file direction: output default: bedgraph/$id.reverse.bedgraph + + # bigWig - name: "--bigwig_forward" type: file direction: output @@ -600,10 +670,14 @@ argument_groups: type: file direction: output default: bigwig/$id.reverse.bigwig + + # preseq lc_extrap - name: "--preseq_output" type: file direction: output default: preseq/$id.lc_extrap.txt + + # RSeQC - name: "--bamstat_output" type: file direction: output @@ -742,6 +816,8 @@ argument_groups: required: false default: RSeQC/tin/xls/$id.tin.xls description: file with TIN metrics (xls) + + # DupRadar - name: "--dupradar_output_dupmatrix" type: file direction: output @@ -783,6 +859,8 @@ argument_groups: direction: output required: false default: dupradar/intercept_slope/$id.intercept_slope.txt + + # Qualimap - name: "--qualimap_output_pdf" type: file direction: output @@ -794,10 +872,14 @@ argument_groups: direction: output required: false default: qualimap/$id + + # DESeq2 - name: "--deseq2_output" type: file direction: output default: deseq2_qc + + # MultiQC - name: "--multiqc_report" type: file direction: output @@ -813,11 +895,33 @@ argument_groups: - name: "--multiqc_versions" type: file direction: output - - name: "--versions" + + # Quantification (pseudo alignment) + - name: "--pseudo_counts_gene" type: file - must_exist: false direction: output - + default: pseudo_alignment_quantification/gene_counts.tsv + - name: "--pseudo_counts_gene_length_scaled" + type: file + direction: output + default: pseudo_alignment_quantification/gene_counts_length_scaled.tsv + - name: "--pseudo_counts_gene_scaled" + type: file + direction: output + default: pseudo_alignment_quantification/gene_counts_scaled.tsv + - name: "--pseudo_tpm_transcript" + type: file + direction: output + default: pseudo_alignment_quantification/transcript_tpm.tsv + - name: "--pseudo_counts_transcript" + type: file + direction: output + default: pseudo_alignment_quantification/transcript_counts.tsv + - name: "--pseudo_quant_merged_summarizedexperiment" + type: file + direction: output + default: pseudo_alignment_quantification/quant_merged_summarizedexperiment + resources: - type: nextflow_script path: main.nf diff --git a/src/workflows/rnaseq/main.nf b/src/workflows/rnaseq/main.nf index b13a5d7..001cb86 100644 --- a/src/workflows/rnaseq/main.nf +++ b/src/workflows/rnaseq/main.nf @@ -22,27 +22,27 @@ workflow run_wf { | map { list -> [ "ref", - [ fasta: list[1][-1].fasta, - gtf: list[1][-1].gtf, - gff: list[1][-1].gff, - additional_fasta: list[1][-1].additional_fasta, - transcript_fasta: list[1][-1].transcript_fasta, - gene_bed: list[1][-1].gene_bed, - bbsplit_fasta_list: list[1][-1].bbsplit_fasta_list, - aligner: list[1][-1].aligner, - pseudo_aligner: list[1][-1].pseudo_aligner, - star_index: list[1][-1].star_index, - rsem_index: list[1][-1].rsem_index, - salmon_index: list[1][-1].salmon_index, - kallisto_index: list[1][-1].kallisto_index, - // splicesites: list[1][-1].splicesites, - // hisat2_index: list[1][-1].hisat2_index, - bbsplit_index: list[1][-1].bbsplit_index, - skip_bbsplit: list[1][-1].skip_bbsplit, - gencode: list[1][-1].gencode, - biotype: list[1][-1].biotype, - filter_gtf: list[1][-1].filter_gtf, - pseudo_aligner_kmer_size: list[1][-1].pseudo_aligner_kmer_size ] + [ fasta: list.collect { id, state -> state.fasta }.unique()[0], + gtf: list.collect { id, state -> state.gtf }.unique()[0], + gff: list.collect { id, state -> state.gff }.unique()[0], + additional_fasta: list.collect { id, state -> state.additional_fasta }.unique()[0], + transcript_fasta:list.collect { id, state -> state.transcript_fasta }.unique()[0], + gene_bed: list.collect { id, state -> state.gene_bed }.unique()[0], + bbsplit_fasta_list: list.collect { id, state -> state.bbsplit_fasta_list }.unique()[0], + aligner: list.collect { id, state -> state.aligner }.unique()[0], + pseudo_aligner: list.collect { id, state -> state.pseudo_aligner }.unique()[0], + star_index: list.collect { id, state -> state.star_index }.unique()[0], + rsem_index: list.collect { id, state -> state.rsem_index }.unique()[0], + salmon_index: list.collect { id, state -> state.salmon_index }.unique()[0], + kallisto_index: list.collect { id, state -> state.kallisto_index }.unique()[0], + // splicesites: list.collect { id, state -> state.splicesites }.unique()[0], + // hisat2_index: list.collect { id, state -> state.hisat2_index }.unique()[0], + bbsplit_index: list.collect { id, state -> state.bbsplit_index }.unique()[0], + skip_bbsplit: list.collect { id, state -> state.skip_bbsplit }.unique()[0], + gencode: list.collect { id, state -> state.gencode }.unique()[0], + biotype: list.collect { id, state -> state.biotype }.unique()[0], + filter_gtf: list.collect { id, state -> state.filter_gtf }.unique()[0], + pseudo_aligner_kmer_size: list.collect { id, state -> state.pseudo_aligner_kmer_size }.unique()[0] ] ] } @@ -213,11 +213,14 @@ workflow run_wf { "gtf_group_features": "gtf_group_features", "gtf_extra_attributes": "gtf_extra_attributes", "salmon_quant_libtype": "salmon_quant_libtype", - "salmon_index": "salmon_index" + "salmon_index": "salmon_index", + "extra_rsem_calculate_expression_args": "extra_rsem_calculate_expression_args" ], toState: [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", + "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -229,7 +232,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) @@ -239,7 +246,7 @@ workflow run_wf { def passed_mapping = (percent_mapped >= state.min_mapped_reads) ? true : false [ id, state + [percent_mapped: percent_mapped, passed_mapping: passed_mapping] ] } - + // Pseudo-alignment and quantification | pseudo_alignment_and_quant.run ( runIf: { id, state -> !state.skip_pseudo_alignment && state.passed_trimmed_reads }, @@ -331,16 +338,23 @@ workflow run_wf { "skip_align": "skip_alignment", "skip_pseudo_align": "skip_pseudo_alignment", "gtf": "gtf", + "num_trimmed_reads": "num_trimmed_reads", + "passed_trimmed_reads": "passed_trimmed_reads", + "passed_mapping": "passed_mapping", + "percent_mapped": "percent_mapped", "genome_bam": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "quant_out_dir": "quant_out_dir", + "salmon_multiqc": "salmon_multiqc", "quant_results_file": "quant_results_file", + "rsem_multiqc": "rsem_multiqc", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "pseudo_multiqc": "pseudo_multiqc", "pseudo_quant_out_dir": "pseudo_quant_out_dir", "pseudo_salmon_quant_results_file": "pseudo_salmon_quant_results_file", "pseudo_kallisto_quant_results_file": "pseudo_kallisto_quant_results_file", "aligner": "aligner", "pseudo_aligner": "pseudo_aligner", - "pseudo_multiqc": "pseudo_multiqc", "gene_bed": "gene_bed", "extra_preseq_args": "extra_preseq_args", "extra_featurecounts_args": "extra_featurecounts_args", @@ -368,11 +382,7 @@ workflow run_wf { "genome_bam_flagstat": "genome_bam_flagstat", "genome_bam_idxstats": "genome_bam_idxstats", "markduplicates_multiqc": "markduplicates_metrics", - "rseqc_modules": "rseqc_modules", - "num_trimmed_reads": "num_trimmed_reads", - "passed_trimmed_reads": "passed_trimmed_reads", - "passed_mapping": "passed_mapping", - "percent_mapped": "percent_mapped" + "rseqc_modules": "rseqc_modules" ], toState: [ "preseq_output": "preseq_output", @@ -418,7 +428,7 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment", + "qunat_merged_summarizedexperiment": "quant_merged_summarizedexperiment", "deseq2_output": "deseq2_output", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", @@ -457,15 +467,17 @@ workflow run_wf { "star_alignment": "star_alignment", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "genome_bam_stats": "samtools_stats", - "genome_bam_flagstat": "samtools_flagstat", - "genome_bam_idxstats": "samtools_idxstats", + "genome_bam_stats": "genome_bam_stats", + "genome_bam_flagstat": "genome_bam_flagstat", + "genome_bam_idxstats": "genome_bam_idxstats", "transcriptome_bam": "transcriptome_bam", "transcriptome_bam_index": "transcriptome_bam_index", "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": "quant_out_dir", + "pseudo_quant_results": "pseudo_quant_out_dir", + "markduplicates_metrics": "markduplicates_metrics", "stringtie_transcript_gtf": "stringtie_transcript_gtf", "stringtie_coverage_gtf": "stringtie_coverage_gtf", "stringtie_abundance": "stringtie_abundance", @@ -531,8 +543,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) @@ -611,7 +622,7 @@ def getFastpReadsAfterFiltering(json_file) { } // -// Function that parses and returns the alignment rate from the STAR log output +// Function that parses and returns the alignment rate from the STAR log outputs // def getStarPercentMapped(align_log) { def percent_aligned = 0 diff --git a/src/workflows/rnaseq/test_run.sh b/src/workflows/rnaseq/test_run.sh index 364d2ec..ed9ed02 100755 --- a/src/workflows/rnaseq/test_run.sh +++ b/src/workflows/rnaseq/test_run.sh @@ -1,30 +1,34 @@ #!/bin/bash -viash ns build --setup cb --parallel +# viash ns build --setup cb --parallel cat > testData/minimal_test/input_fastq/sample_sheet.csv << HERE id,fastq_1,fastq_2,strandedness WT_REP1,SRR6357070_1.fastq.gz;SRR6357071_1.fastq.gz,SRR6357070_2.fastq.gz;SRR6357071_2.fastq.gz,reverse +WT_REP2,SRR6357072_1.fastq.gz,SRR6357072_2.fastq.gz,reverse +RAP1_IAA_30M_REP1,SRR6357076_1.fastq.gz,SRR6357076_2.fastq.gz,reverse RAP1_UNINDUCED_REP1,SRR6357073_1.fastq.gz,,reverse +RAP1_UNINDUCED_REP2,SRR6357074_1.fastq.gz;SRR6357075_1.fastq.gz,,reverse HERE echo ">> Test 1: Trimming reads with Trim galore; alignment with STAR and quantification with Salmon" nextflow run target/nextflow/workflows/rnaseq/main.nf \ --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ - --publish_dir "test_results/full_pipeline_test1" \ + --publish_dir test_results/full_pipeline_test1 \ --fasta testData/minimal_test/reference/genome.fasta \ --gtf testData/minimal_test/reference/genes.gtf.gz \ --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ --skip_pseudo_alignment \ - -profile docker --resume + -profile docker \ + --resume # echo ">> Test 2: Trimming reads with Trim galore; alignment with STAR and quantification with Salmon; pseudo-alignment and quantification with Kallisto" # nextflow run target/nextflow/workflows/rnaseq/main.nf \ # --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ -# --publish_dir "test_results/full_pipeline_test2" \ +# --publish_dir test_results/full_pipeline_test2 \ # --fasta testData/minimal_test/reference/genome.fasta \ # --gtf testData/minimal_test/reference/genes.gtf.gz \ # --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ @@ -35,10 +39,11 @@ nextflow run target/nextflow/workflows/rnaseq/main.nf \ # --kallisto_quant_fragment_length_sd 10 \ # -profile docker --resume + # echo ">> Test 3: Trimming reads with fastp; skip alignment; pseudo alignment and quantification with Salmon" # nextflow run target/nextflow/workflows/rnaseq/main.nf \ # --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ -# --publish_dir "test_results/full_pipeline_test3" \ +# --publish_dir test_results/full_pipeline_test3 \ # --fasta testData/minimal_test/reference/genome.fasta \ # --gtf testData/minimal_test/reference/genes.gtf.gz \ # --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ @@ -46,4 +51,19 @@ nextflow run target/nextflow/workflows/rnaseq/main.nf \ # --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ # --trimmer fastp \ # --skip_alignment \ -# -profile docker --resume \ No newline at end of file +# -profile docker --resume + + +# echo ">> Test 4: Trimming reads with Trim galore; alignment and quantification with RSEM (STAR)" +# nextflow run target/nextflow/workflows/rnaseq/main.nf \ +# --param_list testData/minimal_test/input_fastq/sample_sheet.csv \ +# --publish_dir test_results/full_pipeline_test4 \ +# --fasta testData/minimal_test/reference/genome.fasta \ +# --gtf testData/minimal_test/reference/genes.gtf.gz \ +# --additional_fasta testData/minimal_test/reference/gfp.fa.gz \ +# --transcript_fasta testData/minimal_test/reference/transcriptome.fasta \ +# --bbsplit_fasta_list testData/minimal_test/reference/bbsplit_fasta_list.txt \ +# --aligner star_rsem \ +# --skip_pseudo_alignment \ +# -profile docker \ +# --resume diff --git a/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/.config.vsh.yaml b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/.config.vsh.yaml new file mode 100644 index 0000000..ef8d1db --- /dev/null +++ b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/.config.vsh.yaml @@ -0,0 +1,475 @@ +name: "umi_tools_extract" +namespace: "umi_tools" +version: "v0.2.0" +argument_groups: +- name: "Input" + arguments: + - type: "file" + name: "--input" + description: "File containing the input data." + info: null + example: + - "sample.fastq" + must_exist: true + create_parent: true + required: true + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--read2_in" + description: "File containing the input data for the R2 reads (if paired). If\ + \ provided, a need to be provided." + info: null + example: + - "sample_R2.fastq" + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--bc_pattern" + alternatives: + - "-p" + description: "The UMI barcode pattern to use e.g. 'NNNNNN' indicates that the\ + \ first 6 nucleotides \nof the read are from the UMI.\n" + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--bc_pattern2" + description: "The UMI barcode pattern to use for read 2." + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" +- name: "Output" + arguments: + - type: "file" + name: "--output" + description: "Output file for read 1." + info: null + must_exist: true + create_parent: true + required: true + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--read2_out" + description: "Output file for read 2." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--filtered_out" + description: "Write out reads not matching regex pattern or cell barcode whitelist\ + \ to this file.\n" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--filtered_out2" + description: "Write out read pairs not matching regex pattern or cell barcode\ + \ whitelist to this file.\n" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" +- name: "Extract Options" + arguments: + - type: "string" + name: "--extract_method" + description: "UMI pattern to use. Default: `string`.\n" + info: null + example: + - "string" + required: false + choices: + - "string" + - "regex" + direction: "input" + multiple: false + multiple_sep: ";" + - type: "boolean_true" + name: "--error_correct_cell" + description: "Error correct cell barcodes to the whitelist." + info: null + direction: "input" + - type: "file" + name: "--whitelist" + description: "Whitelist of accepted cell barcodes tab-separated format, where\ + \ column 1 is the whitelisted\ncell barcodes and column 2 is the list (comma-separated)\ + \ of other cell barcodes which should \nbe corrected to the barcode in column\ + \ 1. If the --error_correct_cell option is not used, this\ncolumn will be ignored.\n" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--blacklist" + description: "BlackWhitelist of cell barcodes to discard." + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "integer" + name: "--subset_reads" + description: "Only parse the first N reads." + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "integer" + name: "--quality_filter_threshold" + description: "Remove reads where any UMI base quality score falls below this threshold." + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--quality_filter_mask" + description: "If a UMI base has a quality below this threshold, replace the base\ + \ with 'N'.\n" + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--quality_encoding" + description: "Quality score encoding. Choose from:\n * phred33 [33-77]\n * phred64\ + \ [64-106]\n * solexa [59-106]\n" + info: null + required: false + choices: + - "phred33" + - "phred64" + - "solexa" + direction: "input" + multiple: false + multiple_sep: ";" + - type: "boolean_true" + name: "--reconcile_pairs" + description: "Allow read 2 infile to contain reads not in read 1 infile. This\ + \ enables support for upstream protocols\nwhere read one contains cell barcodes,\ + \ and the read pairs have been filtered and corrected without regard\nto the\ + \ read2.\n" + info: null + direction: "input" + - type: "boolean_true" + name: "--three_prime" + alternatives: + - "--3prime" + description: "By default the barcode is assumed to be on the 5' end of the read,\ + \ but use this option to sepecify that it is\non the 3' end instead. This option\ + \ only works with --extract_method=string since 3' encoding can be specified\n\ + explicitly with a regex, e.g `.*(?P.{5})$`.\n" + info: null + direction: "input" + - type: "boolean_true" + name: "--ignore_read_pair_suffixes" + description: "Ignore \"/1\" and \"/2\" read name suffixes. Note that this options\ + \ is required if the suffixes are not whitespace\nseparated from the rest of\ + \ the read name.\narguments:\n" + info: null + direction: "input" + - type: "string" + name: "--umi_separator" + description: "The character that separates the UMI in the read name. Most likely\ + \ a colon if you skipped the extraction with\nUMI-tools and used other software.\ + \ Default: `_`\n" + info: null + example: + - "_" + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--grouping_method" + description: "Method to use to determine read groups by subsuming those with similar\ + \ UMIs. All methods start by identifying\nthe reads with the same mapping position,\ + \ but treat similar yet nonidentical UMIs differently. Default: `directional`\n" + info: null + example: + - "directional" + required: false + choices: + - "unique" + - "percentile" + - "cluster" + - "adjacency" + - "directional" + direction: "input" + multiple: false + multiple_sep: ";" + - type: "integer" + name: "--umi_discard_read" + description: "After UMI barcode extraction discard either R1 or R2 by setting\ + \ this parameter to 1 or 2, respectively. Default: `0`\n" + info: null + example: + - 0 + required: false + choices: + - 0 + - 1 + - 2 + direction: "input" + multiple: false + multiple_sep: ";" +- name: "Common Options" + arguments: + - type: "file" + name: "--log" + description: "File with logging information." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "boolean_true" + name: "--log2stderr" + description: "Send logging information to stderr." + info: null + direction: "output" + - type: "integer" + name: "--verbose" + description: "Log level. The higher, the more output." + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--error" + description: "File with error information." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--temp_dir" + description: "Directory for temporary files. If not set, the bash environmental\ + \ variable TMPDIR is used.\n" + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "integer" + name: "--compresslevel" + description: "Level of Gzip compression to use. Default=6 matches GNU gzip rather\ + \ than python gzip default (which is 9).\nDefault `6`.\n" + info: null + example: + - 6 + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--timeit" + description: "Store timing information in file." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "string" + name: "--timeit_name" + description: "Name in timing file for this class of jobs." + info: null + default: + - "all" + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "boolean_true" + name: "--timeit_header" + description: "Add header for timing information." + info: null + direction: "input" + - type: "integer" + name: "--random_seed" + description: "Random seed to initialize number generator with." + info: null + required: false + direction: "input" + multiple: false + multiple_sep: ";" +resources: +- type: "bash_script" + path: "script.sh" + is_executable: true +description: "Flexible removal of UMI sequences from fastq reads.\nUMIs are removed\ + \ and appended to the read name. Any other barcode, for example a library barcode,\n\ + is left on the read. Can also filter reads by quality or against a whitelist.\n" +test_resources: +- type: "bash_script" + path: "test.sh" + is_executable: true +- type: "file" + path: "test_data" +info: null +status: "enabled" +requirements: + commands: + - "ps" +keywords: +- "extract" +- "umi-tools" +- "umi" +- "fastq" +license: "MIT" +references: + doi: + - "10.1101/gr.209601.116" +links: + repository: "https://github.com/CGATOxford/UMI-tools" + homepage: "https://umi-tools.readthedocs.io/en/latest/" + documentation: "https://umi-tools.readthedocs.io/en/latest/reference/extract.html" +runners: +- type: "executable" + id: "executable" + docker_setup_strategy: "ifneedbepullelsecachedbuild" +- type: "nextflow" + id: "nextflow" + directives: + tag: "$id" + auto: + simplifyInput: true + simplifyOutput: false + transcript: false + publish: false + config: + labels: + mem1gb: "memory = 1000000000.B" + mem2gb: "memory = 2000000000.B" + mem5gb: "memory = 5000000000.B" + mem10gb: "memory = 10000000000.B" + mem20gb: "memory = 20000000000.B" + mem50gb: "memory = 50000000000.B" + mem100gb: "memory = 100000000000.B" + mem200gb: "memory = 200000000000.B" + mem500gb: "memory = 500000000000.B" + mem1tb: "memory = 1000000000000.B" + mem2tb: "memory = 2000000000000.B" + mem5tb: "memory = 5000000000000.B" + mem10tb: "memory = 10000000000000.B" + mem20tb: "memory = 20000000000000.B" + mem50tb: "memory = 50000000000000.B" + mem100tb: "memory = 100000000000000.B" + mem200tb: "memory = 200000000000000.B" + mem500tb: "memory = 500000000000000.B" + mem1gib: "memory = 1073741824.B" + mem2gib: "memory = 2147483648.B" + mem4gib: "memory = 4294967296.B" + mem8gib: "memory = 8589934592.B" + mem16gib: "memory = 17179869184.B" + mem32gib: "memory = 34359738368.B" + mem64gib: "memory = 68719476736.B" + mem128gib: "memory = 137438953472.B" + mem256gib: "memory = 274877906944.B" + mem512gib: "memory = 549755813888.B" + mem1tib: "memory = 1099511627776.B" + mem2tib: "memory = 2199023255552.B" + mem4tib: "memory = 4398046511104.B" + mem8tib: "memory = 8796093022208.B" + mem16tib: "memory = 17592186044416.B" + mem32tib: "memory = 35184372088832.B" + mem64tib: "memory = 70368744177664.B" + mem128tib: "memory = 140737488355328.B" + mem256tib: "memory = 281474976710656.B" + mem512tib: "memory = 562949953421312.B" + cpu1: "cpus = 1" + cpu2: "cpus = 2" + cpu5: "cpus = 5" + cpu10: "cpus = 10" + cpu20: "cpus = 20" + cpu50: "cpus = 50" + cpu100: "cpus = 100" + cpu200: "cpus = 200" + cpu500: "cpus = 500" + cpu1000: "cpus = 1000" + debug: false + container: "docker" +engines: +- type: "docker" + id: "docker" + image: "quay.io/biocontainers/umi_tools:1.1.4--py310h4b81fae_2" + target_registry: "images.viash-hub.com" + target_tag: "v0.2.0" + namespace_separator: "/" + setup: + - type: "docker" + run: + - "umi_tools -v | sed 's/ version//g' > /var/software_versions.txt\n" + entrypoint: [] + cmd: null +- type: "native" + id: "native" +build_info: + config: "src/umi_tools/umi_tools_extract/config.vsh.yaml" + runner: "nextflow" + engine: "docker|native" + output: "target/nextflow/umi_tools/umi_tools_extract" + executable: "target/nextflow/umi_tools/umi_tools_extract/main.nf" + viash_version: "0.9.0" + git_commit: "7e530218844c373048bc33de58f021b6460642e5" + git_remote: "https://x-access-token:ghs_kiUBq39QrAlnG6IaeAcTcXhllzqpOV4LDB3e@github.com/viash-hub/biobox" +package_config: + name: "biobox" + version: "v0.2.0" + description: "A collection of bioinformatics tools for working with sequence data.\n" + info: null + viash_version: "0.9.0" + source: "src" + target: "target" + config_mods: + - ".requirements.commands := ['ps']\n" + - ".engines += { type: \"native\" }" + - ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'" + - ".engines[.type == 'docker'].target_tag := 'v0.2.0'" + keywords: + - "bioinformatics" + - "modules" + - "sequencing" + license: "MIT" + organization: "vsh" + links: + repository: "https://github.com/viash-hub/biobox" + issue_tracker: "https://github.com/viash-hub/biobox/issues" diff --git a/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/main.nf b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/main.nf new file mode 100644 index 0000000..6fc55be --- /dev/null +++ b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/main.nf @@ -0,0 +1,3983 @@ +// umi_tools_extract v0.2.0 +// +// This wrapper script is auto-generated by viash 0.9.0 and is thus a derivative +// work thereof. This software comes with ABSOLUTELY NO WARRANTY from Data +// Intuitive. +// +// The component may contain files which fall under a different license. The +// authors of this component should specify the license in the header of such +// files, or include a separate license file detailing the licenses of all included +// files. + +//////////////////////////// +// VDSL3 helper functions // +//////////////////////////// + +// helper file: 'src/main/resources/io/viash/runners/nextflow/arguments/_checkArgumentType.nf' +class UnexpectedArgumentTypeException extends Exception { + String errorIdentifier + String stage + String plainName + String expectedClass + String foundClass + + // ${key ? " in module '$key'" : ""}${id ? " id '$id'" : ""} + UnexpectedArgumentTypeException(String errorIdentifier, String stage, String plainName, String expectedClass, String foundClass) { + super("Error${errorIdentifier ? " $errorIdentifier" : ""}:${stage ? " $stage" : "" } argument '${plainName}' has the wrong type. " + + "Expected type: ${expectedClass}. Found type: ${foundClass}") + this.errorIdentifier = errorIdentifier + this.stage = stage + this.plainName = plainName + this.expectedClass = expectedClass + this.foundClass = foundClass + } +} + +/** + * Checks if the given value is of the expected type. If not, an exception is thrown. + * + * @param stage The stage of the argument (input or output) + * @param par The parameter definition + * @param value The value to check + * @param errorIdentifier The identifier to use in the error message + * @return The value, if it is of the expected type + * @throws UnexpectedArgumentTypeException If the value is not of the expected type +*/ +def _checkArgumentType(String stage, Map par, Object value, String errorIdentifier) { + // expectedClass will only be != null if value is not of the expected type + def expectedClass = null + def foundClass = null + + // todo: split if need be + + if (!par.required && value == null) { + expectedClass = null + } else if (par.multiple) { + if (value !instanceof Collection) { + value = [value] + } + + // split strings + value = value.collectMany{ val -> + if (val instanceof String) { + // collect() to ensure that the result is a List and not simply an array + val.split(par.multiple_sep).collect() + } else { + [val] + } + } + + // process globs + if (par.type == "file" && par.direction == "input") { + value = value.collect{ it instanceof String ? file(it, hidden: true) : it }.flatten() + } + + // check types of elements in list + try { + value = value.collect { listVal -> + _checkArgumentType(stage, par + [multiple: false], listVal, errorIdentifier) + } + } catch (UnexpectedArgumentTypeException e) { + expectedClass = "List[${e.expectedClass}]" + foundClass = "List[${e.foundClass}]" + } + } else if (par.type == "string") { + // cast to string if need be + if (value instanceof GString) { + value = value.toString() + } + expectedClass = value instanceof String ? null : "String" + } else if (par.type == "integer") { + // cast to integer if need be + if (value instanceof String) { + try { + value = value.toInteger() + } catch (NumberFormatException e) { + // do nothing + } + } + if (value instanceof java.math.BigInteger) { + value = value.intValue() + } + expectedClass = value instanceof Integer ? null : "Integer" + } else if (par.type == "long") { + // cast to long if need be + if (value instanceof String) { + try { + value = value.toLong() + } catch (NumberFormatException e) { + // do nothing + } + } + if (value instanceof Integer) { + value = value.toLong() + } + expectedClass = value instanceof Long ? null : "Long" + } else if (par.type == "double") { + // cast to double if need be + if (value instanceof String) { + try { + value = value.toDouble() + } catch (NumberFormatException e) { + // do nothing + } + } + if (value instanceof java.math.BigDecimal) { + value = value.doubleValue() + } + if (value instanceof Float) { + value = value.toDouble() + } + expectedClass = value instanceof Double ? null : "Double" + } else if (par.type == "boolean" | par.type == "boolean_true" | par.type == "boolean_false") { + // cast to boolean if need be + if (value instanceof String) { + def valueLower = value.toLowerCase() + if (valueLower == "true") { + value = true + } else if (valueLower == "false") { + value = false + } + } + expectedClass = value instanceof Boolean ? null : "Boolean" + } else if (par.type == "file" && (par.direction == "input" || stage == "output")) { + // cast to path if need be + if (value instanceof String) { + value = file(value, hidden: true) + } + if (value instanceof File) { + value = value.toPath() + } + expectedClass = value instanceof Path ? null : "Path" + } else if (par.type == "file" && stage == "input" && par.direction == "output") { + // cast to string if need be + if (value instanceof GString) { + value = value.toString() + } + expectedClass = value instanceof String ? null : "String" + } else { + // didn't find a match for par.type + expectedClass = par.type + } + + if (expectedClass != null) { + if (foundClass == null) { + foundClass = value.getClass().getName() + } + throw new UnexpectedArgumentTypeException(errorIdentifier, stage, par.plainName, expectedClass, foundClass) + } + + return value +} +// helper file: 'src/main/resources/io/viash/runners/nextflow/arguments/_processInputValues.nf' +Map _processInputValues(Map inputs, Map config, String id, String key) { + if (!workflow.stubRun) { + config.allArguments.each { arg -> + if (arg.required) { + assert inputs.containsKey(arg.plainName) && inputs.get(arg.plainName) != null : + "Error in module '${key}' id '${id}': required input argument '${arg.plainName}' is missing" + } + } + + inputs = inputs.collectEntries { name, value -> + def par = config.allArguments.find { it.plainName == name && (it.direction == "input" || it.type == "file") } + assert par != null : "Error in module '${key}' id '${id}': '${name}' is not a valid input argument" + + value = _checkArgumentType("input", par, value, "in module '$key' id '$id'") + + [ name, value ] + } + } + return inputs +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/arguments/_processOutputValues.nf' +Map _processOutputValues(Map outputs, Map config, String id, String key) { + if (!workflow.stubRun) { + config.allArguments.each { arg -> + if (arg.direction == "output" && arg.required) { + assert outputs.containsKey(arg.plainName) && outputs.get(arg.plainName) != null : + "Error in module '${key}' id '${id}': required output argument '${arg.plainName}' is missing" + } + } + + outputs = outputs.collectEntries { name, value -> + def par = config.allArguments.find { it.plainName == name && it.direction == "output" } + assert par != null : "Error in module '${key}' id '${id}': '${name}' is not a valid output argument" + + value = _checkArgumentType("output", par, value, "in module '$key' id '$id'") + + [ name, value ] + } + } + return outputs +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/IDChecker.nf' +class IDChecker { + final def items = [] as Set + + @groovy.transform.WithWriteLock + boolean observe(String item) { + if (items.contains(item)) { + return false + } else { + items << item + return true + } + } + + @groovy.transform.WithReadLock + boolean contains(String item) { + return items.contains(item) + } + + @groovy.transform.WithReadLock + Set getItems() { + return items.clone() + } +} +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/_checkUniqueIds.nf' + +/** + * Check if the ids are unique across parameter sets + * + * @param parameterSets a list of parameter sets. + */ +private void _checkUniqueIds(List>> parameterSets) { + def ppIds = parameterSets.collect{it[0]} + assert ppIds.size() == ppIds.unique().size() : "All argument sets should have unique ids. Detected ids: $ppIds" +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/_getChild.nf' + +// helper functions for reading params from file // +def _getChild(parent, child) { + if (child.contains("://") || java.nio.file.Paths.get(child).isAbsolute()) { + child + } else { + def parentAbsolute = java.nio.file.Paths.get(parent).toAbsolutePath().toString() + parentAbsolute.replaceAll('/[^/]*$', "/") + child + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/_parseParamList.nf' +/** + * Figure out the param list format based on the file extension + * + * @param param_list A String containing the path to the parameter list file. + * + * @return A String containing the format of the parameter list file. + */ +def _paramListGuessFormat(param_list) { + if (param_list !instanceof String) { + "asis" + } else if (param_list.endsWith(".csv")) { + "csv" + } else if (param_list.endsWith(".json") || param_list.endsWith(".jsn")) { + "json" + } else if (param_list.endsWith(".yaml") || param_list.endsWith(".yml")) { + "yaml" + } else { + "yaml_blob" + } +} + + +/** + * Read the param list + * + * @param param_list One of the following: + * - A String containing the path to the parameter list file (csv, json or yaml), + * - A yaml blob of a list of maps (yaml_blob), + * - Or a groovy list of maps (asis). + * @param config A Map of the Viash configuration. + * + * @return A List of Maps containing the parameters. + */ +def _parseParamList(param_list, Map config) { + // first determine format by extension + def paramListFormat = _paramListGuessFormat(param_list) + + def paramListPath = (paramListFormat != "asis" && paramListFormat != "yaml_blob") ? + file(param_list, hidden: true) : + null + + // get the correct parser function for the detected params_list format + def paramSets = [] + if (paramListFormat == "asis") { + paramSets = param_list + } else if (paramListFormat == "yaml_blob") { + paramSets = readYamlBlob(param_list) + } else if (paramListFormat == "yaml") { + paramSets = readYaml(paramListPath) + } else if (paramListFormat == "json") { + paramSets = readJson(paramListPath) + } else if (paramListFormat == "csv") { + paramSets = readCsv(paramListPath) + } else { + error "Format of provided --param_list not recognised.\n" + + "Found: '$paramListFormat'.\n" + + "Expected: a csv file, a json file, a yaml file,\n" + + "a yaml blob or a groovy list of maps." + } + + // data checks + assert paramSets instanceof List: "--param_list should contain a list of maps" + for (value in paramSets) { + assert value instanceof Map: "--param_list should contain a list of maps" + } + + // id is argument + def idIsArgument = config.allArguments.any{it.plainName == "id"} + + // Reformat from List to List> by adding the ID as first element of a Tuple2 + paramSets = paramSets.collect({ data -> + def id = data.id + if (!idIsArgument) { + data = data.findAll{k, v -> k != "id"} + } + [id, data] + }) + + // Split parameters with 'multiple: true' + paramSets = paramSets.collect({ id, data -> + data = _splitParams(data, config) + [id, data] + }) + + // The paths of input files inside a param_list file may have been specified relatively to the + // location of the param_list file. These paths must be made absolute. + if (paramListPath) { + paramSets = paramSets.collect({ id, data -> + def new_data = data.collectEntries{ parName, parValue -> + def par = config.allArguments.find{it.plainName == parName} + if (par && par.type == "file" && par.direction == "input") { + if (parValue instanceof Collection) { + parValue = parValue.collectMany{path -> + def x = _resolveSiblingIfNotAbsolute(path, paramListPath) + x instanceof Collection ? x : [x] + } + } else { + parValue = _resolveSiblingIfNotAbsolute(parValue, paramListPath) + } + } + [parName, parValue] + } + [id, new_data] + }) + } + + return paramSets +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/_splitParams.nf' +/** + * Split parameters for arguments that accept multiple values using their separator + * + * @param paramList A Map containing parameters to split. + * @param config A Map of the Viash configuration. This Map can be generated from the config file + * using the readConfig() function. + * + * @return A Map of parameters where the parameter values have been split into a list using + * their seperator. + */ +Map _splitParams(Map parValues, Map config){ + def parsedParamValues = parValues.collectEntries { parName, parValue -> + def parameterSettings = config.allArguments.find({it.plainName == parName}) + + if (!parameterSettings) { + // if argument is not found, do not alter + return [parName, parValue] + } + if (parameterSettings.multiple) { // Check if parameter can accept multiple values + if (parValue instanceof Collection) { + parValue = parValue.collect{it instanceof String ? it.split(parameterSettings.multiple_sep) : it } + } else if (parValue instanceof String) { + parValue = parValue.split(parameterSettings.multiple_sep) + } else if (parValue == null) { + parValue = [] + } else { + parValue = [ parValue ] + } + parValue = parValue.flatten() + } + // For all parameters check if multiple values are only passed for + // arguments that allow it. Quietly simplify lists of length 1. + if (!parameterSettings.multiple && parValue instanceof Collection) { + assert parValue.size() == 1 : + "Error: argument ${parName} has too many values.\n" + + " Expected amount: 1. Found: ${parValue.size()}" + parValue = parValue[0] + } + [parName, parValue] + } + return parsedParamValues +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/channelFromParams.nf' +/** + * Parse nextflow parameters based on settings defined in a viash config. + * Return a list of parameter sets, each parameter set corresponding to + * an event in a nextflow channel. The output from this function can be used + * with Channel.fromList to create a nextflow channel with Vdsl3 formatted + * events. + * + * This function performs: + * - A filtering of the params which can be found in the config file. + * - Process the params_list argument which allows a user to to initialise + * a Vsdl3 channel with multiple parameter sets. Possible formats are + * csv, json, yaml, or simply a yaml_blob. A csv should have column names + * which correspond to the different arguments of this pipeline. A json or a yaml + * file should be a list of maps, each of which has keys corresponding to the + * arguments of the pipeline. A yaml blob can also be passed directly as a parameter. + * When passing a csv, json or yaml, relative path names are relativized to the + * location of the parameter file. + * - Combine the parameter sets into a vdsl3 Channel. + * + * @param params Input parameters. Can optionaly contain a 'param_list' key that + * provides a list of arguments that can be split up into multiple events + * in the output channel possible formats of param_lists are: a csv file, + * json file, a yaml file or a yaml blob. Each parameters set (event) must + * have a unique ID. + * @param config A Map of the Viash configuration. This Map can be generated from the config file + * using the readConfig() function. + * + * @return A list of parameters with the first element of the event being + * the event ID and the second element containing a map of the parsed parameters. + */ + +private List>> _paramsToParamSets(Map params, Map config){ + // todo: fetch key from run args + def key_ = config.name + + /* parse regular parameters (not in param_list) */ + /*************************************************/ + def globalParams = config.allArguments + .findAll { params.containsKey(it.plainName) } + .collectEntries { [ it.plainName, params[it.plainName] ] } + def globalID = params.get("id", null) + + /* process params_list arguments */ + /*********************************/ + def paramList = params.containsKey("param_list") && params.param_list != null ? + params.param_list : [] + // if (paramList instanceof String) { + // paramList = [paramList] + // } + // def paramSets = paramList.collectMany{ _parseParamList(it, config) } + // TODO: be able to process param_list when it is a list of strings + def paramSets = _parseParamList(paramList, config) + if (paramSets.isEmpty()) { + paramSets = [[null, [:]]] + } + + /* combine arguments into channel */ + /**********************************/ + def processedParams = paramSets.indexed().collect{ index, tup -> + // Process ID + def id = tup[0] ?: globalID + + if (workflow.stubRun && !id) { + // if stub run, explicitly add an id if missing + id = "stub${index}" + } + assert id != null: "Each parameter set should have at least an 'id'" + + // Process params + def parValues = globalParams + tup[1] + // // Remove parameters which are null, if the default is also null + // parValues = parValues.collectEntries{paramName, paramValue -> + // parameterSettings = config.functionality.allArguments.find({it.plainName == paramName}) + // if ( paramValue != null || parameterSettings.get("default", null) != null ) { + // [paramName, paramValue] + // } + // } + parValues = parValues.collectEntries { name, value -> + def par = config.allArguments.find { it.plainName == name && (it.direction == "input" || it.type == "file") } + assert par != null : "Error in module '${key_}' id '${id}': '${name}' is not a valid input argument" + + if (par == null) { + return [:] + } + value = _checkArgumentType("input", par, value, "in module '$key_' id '$id'") + + [ name, value ] + } + + [id, parValues] + } + + // Check if ids (first element of each list) is unique + _checkUniqueIds(processedParams) + return processedParams +} + +/** + * Parse nextflow parameters based on settings defined in a viash config + * and return a nextflow channel. + * + * @param params Input parameters. Can optionaly contain a 'param_list' key that + * provides a list of arguments that can be split up into multiple events + * in the output channel possible formats of param_lists are: a csv file, + * json file, a yaml file or a yaml blob. Each parameters set (event) must + * have a unique ID. + * @param config A Map of the Viash configuration. This Map can be generated from the config file + * using the readConfig() function. + * + * @return A nextflow Channel with events. Events are formatted as a tuple that contains + * first contains the ID of the event and as second element holds a parameter map. + * + * + */ +def channelFromParams(Map params, Map config) { + def processedParams = _paramsToParamSets(params, config) + return Channel.fromList(processedParams) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/checkUniqueIds.nf' +def checkUniqueIds(Map args) { + def stopOnError = args.stopOnError == null ? args.stopOnError : true + + def idChecker = new IDChecker() + + return filter { tup -> + if (!idChecker.observe(tup[0])) { + if (stopOnError) { + error "Duplicate id: ${tup[0]}" + } else { + log.warn "Duplicate id: ${tup[0]}, removing duplicate entry" + return false + } + } + return true + } +} +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/preprocessInputs.nf' +// This helper file will be deprecated soon +preprocessInputsDeprecationWarningPrinted = false + +def preprocessInputsDeprecationWarning() { + if (!preprocessInputsDeprecationWarningPrinted) { + preprocessInputsDeprecationWarningPrinted = true + System.err.println("Warning: preprocessInputs() is deprecated and will be removed in Viash 0.9.0.") + } +} + +/** + * Generate a nextflow Workflow that allows processing a channel of + * Vdsl3 formatted events and apply a Viash config to them: + * - Gather default parameters from the Viash config and make + * sure that they are correctly formatted (see applyConfig method). + * - Format the input parameters (also using the applyConfig method). + * - Apply the default parameter to the input parameters. + * - Do some assertions: + * ~ Check if the event IDs in the channel are unique. + * + * The events in the channel are formatted as tuples, with the + * first element of the tuples being a unique id of the parameter set, + * and the second element containg the the parameters themselves. + * Optional extra elements of the tuples will be passed to the output as is. + * + * @param args A map that must contain a 'config' key that points + * to a parsed config (see readConfig()). Optionally, a + * 'key' key can be provided which can be used to create a unique + * name for the workflow process. + * + * @return A workflow that allows processing a channel of Vdsl3 formatted events + * and apply a Viash config to them. + */ +def preprocessInputs(Map args) { + preprocessInputsDeprecationWarning() + + def config = args.config + assert config instanceof Map : + "Error in preprocessInputs: config must be a map. " + + "Expected class: Map. Found: config.getClass() is ${config.getClass()}" + def key_ = args.key ?: config.name + + // Get different parameter types (used throughout this function) + def defaultArgs = config.allArguments + .findAll { it.containsKey("default") } + .collectEntries { [ it.plainName, it.default ] } + + map { tup -> + def id = tup[0] + def data = tup[1] + def passthrough = tup.drop(2) + + def new_data = (defaultArgs + data).collectEntries { name, value -> + def par = config.allArguments.find { it.plainName == name && (it.direction == "input" || it.type == "file") } + + if (par != null) { + value = _checkArgumentType("input", par, value, "in module '$key_' id '$id'") + } + + [ name, value ] + } + + [ id, new_data ] + passthrough + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/runComponents.nf' +/** + * Run a list of components on a stream of data. + * + * @param components: list of Viash VDSL3 modules to run + * @param fromState: a closure, a map or a list of keys to extract from the input data. + * If a closure, it will be called with the id, the data and the component config. + * @param toState: a closure, a map or a list of keys to extract from the output data + * If a closure, it will be called with the id, the output data, the old state and the component config. + * @param filter: filter function to apply to the input. + * It will be called with the id, the data and the component config. + * @param id: id to use for the output data + * If a closure, it will be called with the id, the data and the component config. + * @param auto: auto options to pass to the components + * + * @return: a workflow that runs the components + **/ +def runComponents(Map args) { + log.warn("runComponents is deprecated, use runEach instead") + assert args.components: "runComponents should be passed a list of components to run" + + def components_ = args.components + if (components_ !instanceof List) { + components_ = [ components_ ] + } + assert components_.size() > 0: "pass at least one component to runComponents" + + def fromState_ = args.fromState + def toState_ = args.toState + def filter_ = args.filter + def id_ = args.id + + workflow runComponentsWf { + take: input_ch + main: + + // generate one channel per method + out_chs = components_.collect{ comp_ -> + def comp_config = comp_.config + + def filter_ch = filter_ + ? input_ch | filter{tup -> + filter_(tup[0], tup[1], comp_config) + } + : input_ch + def id_ch = id_ + ? filter_ch | map{tup -> + // def new_id = id_(tup[0], tup[1], comp_config) + def new_id = tup[0] + if (id_ instanceof String) { + new_id = id_ + } else if (id_ instanceof Closure) { + new_id = id_(new_id, tup[1], comp_config) + } + [new_id] + tup.drop(1) + } + : filter_ch + def data_ch = id_ch | map{tup -> + def new_data = tup[1] + if (fromState_ instanceof Map) { + new_data = fromState_.collectEntries{ key0, key1 -> + [key0, new_data[key1]] + } + } else if (fromState_ instanceof List) { + new_data = fromState_.collectEntries{ key -> + [key, new_data[key]] + } + } else if (fromState_ instanceof Closure) { + new_data = fromState_(tup[0], new_data, comp_config) + } + tup.take(1) + [new_data] + tup.drop(1) + } + def out_ch = data_ch + | comp_.run( + auto: (args.auto ?: [:]) + [simplifyInput: false, simplifyOutput: false] + ) + def post_ch = toState_ + ? out_ch | map{tup -> + def output = tup[1] + def old_state = tup[2] + def new_state = null + if (toState_ instanceof Map) { + new_state = old_state + toState_.collectEntries{ key0, key1 -> + [key0, output[key1]] + } + } else if (toState_ instanceof List) { + new_state = old_state + toState_.collectEntries{ key -> + [key, output[key]] + } + } else if (toState_ instanceof Closure) { + new_state = toState_(tup[0], output, old_state, comp_config) + } + [tup[0], new_state] + tup.drop(3) + } + : out_ch + + post_ch + } + + // mix all results + output_ch = + (out_chs.size == 1) + ? out_chs[0] + : out_chs[0].mix(*out_chs.drop(1)) + + emit: output_ch + } + + return runComponentsWf +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/runEach.nf' +/** + * Run a list of components on a stream of data. + * + * @param components: list of Viash VDSL3 modules to run + * @param fromState: a closure, a map or a list of keys to extract from the input data. + * If a closure, it will be called with the id, the data and the component itself. + * @param toState: a closure, a map or a list of keys to extract from the output data + * If a closure, it will be called with the id, the output data, the old state and the component itself. + * @param filter: filter function to apply to the input. + * It will be called with the id, the data and the component itself. + * @param id: id to use for the output data + * If a closure, it will be called with the id, the data and the component itself. + * @param auto: auto options to pass to the components + * + * @return: a workflow that runs the components + **/ +def runEach(Map args) { + assert args.components: "runEach should be passed a list of components to run" + + def components_ = args.components + if (components_ !instanceof List) { + components_ = [ components_ ] + } + assert components_.size() > 0: "pass at least one component to runEach" + + def fromState_ = args.fromState + def toState_ = args.toState + def filter_ = args.filter + def runIf_ = args.runIf + def id_ = args.id + + assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf." + + workflow runEachWf { + take: input_ch + main: + + // generate one channel per method + out_chs = components_.collect{ comp_ -> + def filter_ch = filter_ + ? input_ch | filter{tup -> + filter_(tup[0], tup[1], comp_) + } + : input_ch + def id_ch = id_ + ? filter_ch | map{tup -> + def new_id = id_ + if (new_id instanceof Closure) { + new_id = new_id(tup[0], tup[1], comp_) + } + assert new_id instanceof String : "Error in runEach: id should be a String or a Closure that returns a String. Expected: id instanceof String. Found: ${new_id.getClass()}" + [new_id] + tup.drop(1) + } + : filter_ch + def chPassthrough = null + def chRun = null + if (runIf_) { + def idRunIfBranch = id_ch.branch{ tup -> + run: runIf_(tup[0], tup[1], comp_) + passthrough: true + } + chPassthrough = idRunIfBranch.passthrough + chRun = idRunIfBranch.run + } else { + chRun = id_ch + chPassthrough = Channel.empty() + } + def data_ch = chRun | map{tup -> + def new_data = tup[1] + if (fromState_ instanceof Map) { + new_data = fromState_.collectEntries{ key0, key1 -> + [key0, new_data[key1]] + } + } else if (fromState_ instanceof List) { + new_data = fromState_.collectEntries{ key -> + [key, new_data[key]] + } + } else if (fromState_ instanceof Closure) { + new_data = fromState_(tup[0], new_data, comp_) + } + tup.take(1) + [new_data] + tup.drop(1) + } + def out_ch = data_ch + | comp_.run( + auto: (args.auto ?: [:]) + [simplifyInput: false, simplifyOutput: false] + ) + def post_ch = toState_ + ? out_ch | map{tup -> + def output = tup[1] + def old_state = tup[2] + def new_state = null + if (toState_ instanceof Map) { + new_state = old_state + toState_.collectEntries{ key0, key1 -> + [key0, output[key1]] + } + } else if (toState_ instanceof List) { + new_state = old_state + toState_.collectEntries{ key -> + [key, output[key]] + } + } else if (toState_ instanceof Closure) { + new_state = toState_(tup[0], output, old_state, comp_) + } + [tup[0], new_state] + tup.drop(3) + } + : out_ch + + def return_ch = post_ch + | concat(chPassthrough) + + return_ch + } + + // mix all results + output_ch = + (out_chs.size == 1) + ? out_chs[0] + : out_chs[0].mix(*out_chs.drop(1)) + + emit: output_ch + } + + return runEachWf +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/channel/safeJoin.nf' +/** + * Join sourceChannel to targetChannel + * + * This function joins the sourceChannel to the targetChannel. + * However, each id in the targetChannel must be present in the + * sourceChannel. If _meta.join_id exists in the targetChannel, that is + * used as an id instead. If the id doesn't match any id in the sourceChannel, + * an error is thrown. + */ + +def safeJoin(targetChannel, sourceChannel, key) { + def sourceIDs = new IDChecker() + + def sourceCheck = sourceChannel + | map { tup -> + sourceIDs.observe(tup[0]) + tup + } + def targetCheck = targetChannel + | map { tup -> + def id = tup[0] + + if (!sourceIDs.contains(id)) { + error ( + "Error in module '${key}' when merging output with original state.\n" + + " Reason: output with id '${id}' could not be joined with source channel.\n" + + " If the IDs in the output channel differ from the input channel,\n" + + " please set `tup[1]._meta.join_id to the original ID.\n" + + " Original IDs in input channel: ['${sourceIDs.getItems().join("', '")}'].\n" + + " Unexpected ID in the output channel: '${id}'.\n" + + " Example input event: [\"id\", [input: file(...)]],\n" + + " Example output event: [\"newid\", [output: file(...), _meta: [join_id: \"id\"]]]" + ) + } + // TODO: add link to our documentation on how to fix this + + tup + } + + sourceCheck.cross(targetChannel) + | map{ left, right -> + right + left.drop(1) + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/config/_processArgument.nf' +def _processArgument(arg) { + arg.multiple = arg.multiple != null ? arg.multiple : false + arg.required = arg.required != null ? arg.required : false + arg.direction = arg.direction != null ? arg.direction : "input" + arg.multiple_sep = arg.multiple_sep != null ? arg.multiple_sep : ";" + arg.plainName = arg.name.replaceAll("^-*", "") + + if (arg.type == "file") { + arg.must_exist = arg.must_exist != null ? arg.must_exist : true + arg.create_parent = arg.create_parent != null ? arg.create_parent : true + } + + // add default values to output files which haven't already got a default + if (arg.type == "file" && arg.direction == "output" && arg.default == null) { + def mult = arg.multiple ? "_*" : "" + def extSearch = "" + if (arg.default != null) { + extSearch = arg.default + } else if (arg.example != null) { + extSearch = arg.example + } + if (extSearch instanceof List) { + extSearch = extSearch[0] + } + def extSearchResult = extSearch.find("\\.[^\\.]+\$") + def ext = extSearchResult != null ? extSearchResult : "" + arg.default = "\$id.\$key.${arg.plainName}${mult}${ext}" + if (arg.multiple) { + arg.default = [arg.default] + } + } + + if (!arg.multiple) { + if (arg.default != null && arg.default instanceof List) { + arg.default = arg.default[0] + } + if (arg.example != null && arg.example instanceof List) { + arg.example = arg.example[0] + } + } + + if (arg.type == "boolean_true") { + arg.default = false + } + if (arg.type == "boolean_false") { + arg.default = true + } + + arg +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/config/addGlobalParams.nf' +def addGlobalArguments(config) { + def localConfig = [ + "argument_groups": [ + [ + "name": "Nextflow input-output arguments", + "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.", + "arguments" : [ + [ + 'name': '--publish_dir', + 'required': true, + 'type': 'string', + 'description': 'Path to an output directory.', + 'example': 'output/', + 'multiple': false + ], + [ + 'name': '--param_list', + 'required': false, + 'type': 'string', + 'description': '''Allows inputting multiple parameter sets to initialise a Nextflow channel. A `param_list` can either be a list of maps, a csv file, a json file, a yaml file, or simply a yaml blob. + | + |* A list of maps (as-is) where the keys of each map corresponds to the arguments of the pipeline. Example: in a `nextflow.config` file: `param_list: [ ['id': 'foo', 'input': 'foo.txt'], ['id': 'bar', 'input': 'bar.txt'] ]`. + |* A csv file should have column names which correspond to the different arguments of this pipeline. Example: `--param_list data.csv` with columns `id,input`. + |* A json or a yaml file should be a list of maps, each of which has keys corresponding to the arguments of the pipeline. Example: `--param_list data.json` with contents `[ {'id': 'foo', 'input': 'foo.txt'}, {'id': 'bar', 'input': 'bar.txt'} ]`. + |* A yaml blob can also be passed directly as a string. Example: `--param_list "[ {'id': 'foo', 'input': 'foo.txt'}, {'id': 'bar', 'input': 'bar.txt'} ]"`. + | + |When passing a csv, json or yaml file, relative path names are relativized to the location of the parameter file. No relativation is performed when `param_list` is a list of maps (as-is) or a yaml blob.'''.stripMargin(), + 'example': 'my_params.yaml', + 'multiple': false, + 'hidden': true + ] + // TODO: allow multiple: true in param_list? + // TODO: allow to specify a --param_list_regex to filter the param_list? + // TODO: allow to specify a --param_list_from_state to remap entries in the param_list? + ] + ] + ] + ] + + return processConfig(_mergeMap(config, localConfig)) +} + +def _mergeMap(Map lhs, Map rhs) { + return rhs.inject(lhs.clone()) { map, entry -> + if (map[entry.key] instanceof Map && entry.value instanceof Map) { + map[entry.key] = _mergeMap(map[entry.key], entry.value) + } else if (map[entry.key] instanceof Collection && entry.value instanceof Collection) { + map[entry.key] += entry.value + } else { + map[entry.key] = entry.value + } + return map + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/config/generateHelp.nf' +def _generateArgumentHelp(param) { + // alternatives are not supported + // def names = param.alternatives ::: List(param.name) + + def unnamedProps = [ + ["required parameter", param.required], + ["multiple values allowed", param.multiple], + ["output", param.direction.toLowerCase() == "output"], + ["file must exist", param.type == "file" && param.must_exist] + ].findAll{it[1]}.collect{it[0]} + + def dflt = null + if (param.default != null) { + if (param.default instanceof List) { + dflt = param.default.join(param.multiple_sep != null ? param.multiple_sep : ", ") + } else { + dflt = param.default.toString() + } + } + def example = null + if (param.example != null) { + if (param.example instanceof List) { + example = param.example.join(param.multiple_sep != null ? param.multiple_sep : ", ") + } else { + example = param.example.toString() + } + } + def min = param.min?.toString() + def max = param.max?.toString() + + def escapeChoice = { choice -> + def s1 = choice.replaceAll("\\n", "\\\\n") + def s2 = s1.replaceAll("\"", """\\\"""") + s2.contains(",") || s2 != choice ? "\"" + s2 + "\"" : s2 + } + def choices = param.choices == null ? + null : + "[ " + param.choices.collect{escapeChoice(it.toString())}.join(", ") + " ]" + + def namedPropsStr = [ + ["type", ([param.type] + unnamedProps).join(", ")], + ["default", dflt], + ["example", example], + ["choices", choices], + ["min", min], + ["max", max] + ] + .findAll{it[1]} + .collect{"\n " + it[0] + ": " + it[1].replaceAll("\n", "\\n")} + .join("") + + def descStr = param.description == null ? + "" : + _paragraphWrap("\n" + param.description.trim(), 80 - 8).join("\n ") + + "\n --" + param.plainName + + namedPropsStr + + descStr +} + +// Based on Helper.generateHelp() in Helper.scala +def _generateHelp(config) { + def fun = config + + // PART 1: NAME AND VERSION + def nameStr = fun.name + + (fun.version == null ? "" : " " + fun.version) + + // PART 2: DESCRIPTION + def descrStr = fun.description == null ? + "" : + "\n\n" + _paragraphWrap(fun.description.trim(), 80).join("\n") + + // PART 3: Usage + def usageStr = fun.usage == null ? + "" : + "\n\nUsage:\n" + fun.usage.trim() + + // PART 4: Options + def argGroupStrs = fun.allArgumentGroups.collect{argGroup -> + def name = argGroup.name + def descriptionStr = argGroup.description == null ? + "" : + "\n " + _paragraphWrap(argGroup.description.trim(), 80-4).join("\n ") + "\n" + def arguments = argGroup.arguments.collect{arg -> + arg instanceof String ? fun.allArguments.find{it.plainName == arg} : arg + }.findAll{it != null} + def argumentStrs = arguments.collect{param -> _generateArgumentHelp(param)} + + "\n\n$name:" + + descriptionStr + + argumentStrs.join("\n") + } + + // FINAL: combine + def out = nameStr + + descrStr + + usageStr + + argGroupStrs.join("") + + return out +} + +// based on Format._paragraphWrap +def _paragraphWrap(str, maxLength) { + def outLines = [] + str.split("\n").each{par -> + def words = par.split("\\s").toList() + + def word = null + def line = words.pop() + while(!words.isEmpty()) { + word = words.pop() + if (line.length() + word.length() + 1 <= maxLength) { + line = line + " " + word + } else { + outLines.add(line) + line = word + } + } + if (words.isEmpty()) { + outLines.add(line) + } + } + return outLines +} + +def helpMessage(config) { + if (params.containsKey("help") && params.help) { + def mergedConfig = addGlobalArguments(config) + def helpStr = _generateHelp(mergedConfig) + println(helpStr) + exit 0 + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/config/processConfig.nf' +def processConfig(config) { + // set defaults for arguments + config.arguments = + (config.arguments ?: []).collect{_processArgument(it)} + + // set defaults for argument_group arguments + config.argument_groups = + (config.argument_groups ?: []).collect{grp -> + grp.arguments = (grp.arguments ?: []).collect{_processArgument(it)} + grp + } + + // create combined arguments list + config.allArguments = + config.arguments + + config.argument_groups.collectMany{it.arguments} + + // add missing argument groups (based on Functionality::allArgumentGroups()) + def argGroups = config.argument_groups + if (argGroups.any{it.name.toLowerCase() == "arguments"}) { + argGroups = argGroups.collect{ grp -> + if (grp.name.toLowerCase() == "arguments") { + grp = grp + [ + arguments: grp.arguments + config.arguments + ] + } + grp + } + } else { + argGroups = argGroups + [ + name: "Arguments", + arguments: config.arguments + ] + } + config.allArgumentGroups = argGroups + + config +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/config/readConfig.nf' + +def readConfig(file) { + def config = readYaml(file ?: moduleDir.resolve("config.vsh.yaml")) + processConfig(config) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/_resolveSiblingIfNotAbsolute.nf' +/** + * Resolve a path relative to the current file. + * + * @param str The path to resolve, as a String. + * @param parentPath The path to resolve relative to, as a Path. + * + * @return The path that may have been resovled, as a Path. + */ +def _resolveSiblingIfNotAbsolute(str, parentPath) { + if (str !instanceof String) { + return str + } + if (!_stringIsAbsolutePath(str)) { + return parentPath.resolveSibling(str) + } else { + return file(str, hidden: true) + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/_stringIsAbsolutePath.nf' +/** + * Check whether a path as a string is absolute. + * + * In the past, we tried using `file(., relative: true).isAbsolute()`, + * but the 'relative' option was added in 22.10.0. + * + * @param path The path to check, as a String. + * + * @return Whether the path is absolute, as a boolean. + */ +def _stringIsAbsolutePath(path) { + def _resolve_URL_PROTOCOL = ~/^([a-zA-Z][a-zA-Z0-9]*:)?\\/.+/ + + assert path instanceof String + return _resolve_URL_PROTOCOL.matcher(path).matches() +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/collectTraces.nf' +class CustomTraceObserver implements nextflow.trace.TraceObserver { + List traces + + CustomTraceObserver(List traces) { + this.traces = traces + } + + @Override + void onProcessComplete(nextflow.processor.TaskHandler handler, nextflow.trace.TraceRecord trace) { + def trace2 = trace.store.clone() + trace2.script = null + traces.add(trace2) + } + + @Override + void onProcessCached(nextflow.processor.TaskHandler handler, nextflow.trace.TraceRecord trace) { + def trace2 = trace.store.clone() + trace2.script = null + traces.add(trace2) + } +} + +def collectTraces() { + def traces = Collections.synchronizedList([]) + + // add custom trace observer which stores traces in the traces object + session.observers.add(new CustomTraceObserver(traces)) + + traces +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/deepClone.nf' +/** + * Performs a deep clone of the given object. + * @param x an object + */ +def deepClone(x) { + iterateMap(x, {it instanceof Cloneable ? it.clone() : it}) +} +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/getPublishDir.nf' +def getPublishDir() { + return params.containsKey("publish_dir") ? params.publish_dir : + params.containsKey("publishDir") ? params.publishDir : + null +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/getRootDir.nf' + +// Recurse upwards until we find a '.build.yaml' file +def _findBuildYamlFile(pathPossiblySymlink) { + def path = pathPossiblySymlink.toRealPath() + def child = path.resolve(".build.yaml") + if (java.nio.file.Files.isDirectory(path) && java.nio.file.Files.exists(child)) { + return child + } else { + def parent = path.getParent() + if (parent == null) { + return null + } else { + return _findBuildYamlFile(parent) + } + } +} + +// get the root of the target folder +def getRootDir() { + def dir = _findBuildYamlFile(meta.resources_dir) + assert dir != null: "Could not find .build.yaml in the folder structure" + dir.getParent() +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/iterateMap.nf' +/** + * Recursively apply a function over the leaves of an object. + * @param obj The object to iterate over. + * @param fun The function to apply to each value. + * @return The object with the function applied to each value. + */ +def iterateMap(obj, fun) { + if (obj instanceof List && obj !instanceof String) { + return obj.collect{item -> + iterateMap(item, fun) + } + } else if (obj instanceof Map) { + return obj.collectEntries{key, item -> + [key.toString(), iterateMap(item, fun)] + } + } else { + return fun(obj) + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/functions/niceView.nf' +/** + * A view for printing the event of each channel as a YAML blob. + * This is useful for debugging. + */ +def niceView() { + workflow niceViewWf { + take: input + main: + output = input + | view{toYamlBlob(it)} + emit: output + } + return niceViewWf +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readCsv.nf' + +def readCsv(file_path) { + def output = [] + def inputFile = file_path !instanceof Path ? file(file_path, hidden: true) : file_path + + // todo: allow escaped quotes in string + // todo: allow single quotes? + def splitRegex = java.util.regex.Pattern.compile(''',(?=(?:[^"]*"[^"]*")*[^"]*$)''') + def removeQuote = java.util.regex.Pattern.compile('''"(.*)"''') + + def br = java.nio.file.Files.newBufferedReader(inputFile) + + def row = -1 + def header = null + while (br.ready() && header == null) { + def line = br.readLine() + row++ + if (!line.startsWith("#")) { + header = splitRegex.split(line, -1).collect{field -> + m = removeQuote.matcher(field) + m.find() ? m.replaceFirst('$1') : field + } + } + } + assert header != null: "CSV file should contain a header" + + while (br.ready()) { + def line = br.readLine() + row++ + if (line == null) { + br.close() + break + } + + if (!line.startsWith("#")) { + def predata = splitRegex.split(line, -1) + def data = predata.collect{field -> + if (field == "") { + return null + } + def m = removeQuote.matcher(field) + if (m.find()) { + return m.replaceFirst('$1') + } else { + return field + } + } + assert header.size() == data.size(): "Row $row should contain the same number as fields as the header" + + def dataMap = [header, data].transpose().collectEntries().findAll{it.value != null} + output.add(dataMap) + } + } + + output +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readJson.nf' +def readJson(file_path) { + def inputFile = file_path !instanceof Path ? file(file_path, hidden: true) : file_path + def jsonSlurper = new groovy.json.JsonSlurper() + jsonSlurper.parse(inputFile) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readJsonBlob.nf' +def readJsonBlob(str) { + def jsonSlurper = new groovy.json.JsonSlurper() + jsonSlurper.parseText(str) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readTaggedYaml.nf' +// Custom constructor to modify how certain objects are parsed from YAML +class CustomConstructor extends org.yaml.snakeyaml.constructor.Constructor { + Path root + + class ConstructPath extends org.yaml.snakeyaml.constructor.AbstractConstruct { + public Object construct(org.yaml.snakeyaml.nodes.Node node) { + String filename = (String) constructScalar(node); + if (root != null) { + return root.resolve(filename); + } + return java.nio.file.Paths.get(filename); + } + } + + CustomConstructor(org.yaml.snakeyaml.LoaderOptions options, Path root) { + super(options) + this.root = root + // Handling !file tag and parse it back to a File type + this.yamlConstructors.put(new org.yaml.snakeyaml.nodes.Tag("!file"), new ConstructPath()) + } +} + +def readTaggedYaml(Path path) { + def options = new org.yaml.snakeyaml.LoaderOptions() + def constructor = new CustomConstructor(options, path.getParent()) + def yaml = new org.yaml.snakeyaml.Yaml(constructor) + return yaml.load(path.text) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readYaml.nf' +def readYaml(file_path) { + def inputFile = file_path !instanceof Path ? file(file_path, hidden: true) : file_path + def yamlSlurper = new org.yaml.snakeyaml.Yaml() + yamlSlurper.load(inputFile) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/readYamlBlob.nf' +def readYamlBlob(str) { + def yamlSlurper = new org.yaml.snakeyaml.Yaml() + yamlSlurper.load(str) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/toJsonBlob.nf' +String toJsonBlob(data) { + return groovy.json.JsonOutput.toJson(data) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/toTaggedYamlBlob.nf' +// Custom representer to modify how certain objects are represented in YAML +class CustomRepresenter extends org.yaml.snakeyaml.representer.Representer { + Path relativizer + + class RepresentPath implements org.yaml.snakeyaml.representer.Represent { + public String getFileName(Object obj) { + if (obj instanceof File) { + obj = ((File) obj).toPath(); + } + if (obj !instanceof Path) { + throw new IllegalArgumentException("Object: " + obj + " is not a Path or File"); + } + def path = (Path) obj; + + if (relativizer != null) { + return relativizer.relativize(path).toString() + } else { + return path.toString() + } + } + + public org.yaml.snakeyaml.nodes.Node representData(Object data) { + String filename = getFileName(data); + def tag = new org.yaml.snakeyaml.nodes.Tag("!file"); + return representScalar(tag, filename); + } + } + CustomRepresenter(org.yaml.snakeyaml.DumperOptions options, Path relativizer) { + super(options) + this.relativizer = relativizer + this.representers.put(sun.nio.fs.UnixPath, new RepresentPath()) + this.representers.put(Path, new RepresentPath()) + this.representers.put(File, new RepresentPath()) + } +} + +String toTaggedYamlBlob(data) { + return toRelativeTaggedYamlBlob(data, null) +} +String toRelativeTaggedYamlBlob(data, Path relativizer) { + def options = new org.yaml.snakeyaml.DumperOptions() + options.setDefaultFlowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle.BLOCK) + def representer = new CustomRepresenter(options, relativizer) + def yaml = new org.yaml.snakeyaml.Yaml(representer, options) + return yaml.dump(data) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/toYamlBlob.nf' +String toYamlBlob(data) { + def options = new org.yaml.snakeyaml.DumperOptions() + options.setDefaultFlowStyle(org.yaml.snakeyaml.DumperOptions.FlowStyle.BLOCK) + options.setPrettyFlow(true) + def yaml = new org.yaml.snakeyaml.Yaml(options) + def cleanData = iterateMap(data, { it instanceof Path ? it.toString() : it }) + return yaml.dump(cleanData) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/writeJson.nf' +void writeJson(data, file) { + assert data: "writeJson: data should not be null" + assert file: "writeJson: file should not be null" + file.write(toJsonBlob(data)) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/readwrite/writeYaml.nf' +void writeYaml(data, file) { + assert data: "writeYaml: data should not be null" + assert file: "writeYaml: file should not be null" + file.write(toYamlBlob(data)) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/states/findStates.nf' +def findStates(Map params, Map config) { + def auto_config = deepClone(config) + def auto_params = deepClone(params) + + auto_config = auto_config.clone() + // override arguments + auto_config.argument_groups = [] + auto_config.arguments = [ + [ + type: "string", + name: "--id", + description: "A dummy identifier", + required: false + ], + [ + type: "file", + name: "--input_states", + example: "/path/to/input/directory/**/state.yaml", + description: "Path to input directory containing the datasets to be integrated.", + required: true, + multiple: true, + multiple_sep: ";" + ], + [ + type: "string", + name: "--filter", + example: "foo/.*/state.yaml", + description: "Regex to filter state files by path.", + required: false + ], + // to do: make this a yaml blob? + [ + type: "string", + name: "--rename_keys", + example: ["newKey1:oldKey1", "newKey2:oldKey2"], + description: "Rename keys in the detected input files. This is useful if the input files do not match the set of input arguments of the workflow.", + required: false, + multiple: true, + multiple_sep: ";" + ], + [ + type: "string", + name: "--settings", + example: '{"output_dataset": "dataset.h5ad", "k": 10}', + description: "Global arguments as a JSON glob to be passed to all components.", + required: false + ] + ] + if (!(auto_params.containsKey("id"))) { + auto_params["id"] = "auto" + } + + // run auto config through processConfig once more + auto_config = processConfig(auto_config) + + workflow findStatesWf { + helpMessage(auto_config) + + output_ch = + channelFromParams(auto_params, auto_config) + | flatMap { autoId, args -> + + def globalSettings = args.settings ? readYamlBlob(args.settings) : [:] + + // look for state files in input dir + def stateFiles = args.input_states + + // filter state files by regex + if (args.filter) { + stateFiles = stateFiles.findAll{ stateFile -> + def stateFileStr = stateFile.toString() + def matcher = stateFileStr =~ args.filter + matcher.matches()} + } + + // read in states + def states = stateFiles.collect { stateFile -> + def state_ = readTaggedYaml(stateFile) + [state_.id, state_] + } + + // construct renameMap + if (args.rename_keys) { + def renameMap = args.rename_keys.collectEntries{renameString -> + def split = renameString.split(":") + assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values" + split + } + + // rename keys in state, only let states through which have all keys + // also add global settings + states = states.collectMany{id, state -> + def newState = [:] + + for (key in renameMap.keySet()) { + def origKey = renameMap[key] + if (!(state.containsKey(origKey))) { + return [] + } + newState[key] = state[origKey] + } + + [[id, globalSettings + newState]] + } + } + + states + } + emit: + output_ch + } + + return findStatesWf +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/states/joinStates.nf' +def joinStates(Closure apply_) { + workflow joinStatesWf { + take: input_ch + main: + output_ch = input_ch + | toSortedList + | filter{ it.size() > 0 } + | map{ tups -> + def ids = tups.collect{it[0]} + def states = tups.collect{it[1]} + apply_(ids, states) + } + + emit: output_ch + } + return joinStatesWf +} +// helper file: 'src/main/resources/io/viash/runners/nextflow/states/publishStates.nf' +def collectFiles(obj) { + if (obj instanceof java.io.File || obj instanceof Path) { + return [obj] + } else if (obj instanceof List && obj !instanceof String) { + return obj.collectMany{item -> + collectFiles(item) + } + } else if (obj instanceof Map) { + return obj.collectMany{key, item -> + collectFiles(item) + } + } else { + return [] + } +} + +/** + * Recurse through a state and collect all input files and their target output filenames. + * @param obj The state to recurse through. + * @param prefix The prefix to prepend to the output filenames. + */ +def collectInputOutputPaths(obj, prefix) { + if (obj instanceof File || obj instanceof Path) { + def path = obj instanceof Path ? obj : obj.toPath() + def ext = path.getFileName().toString().find("\\.[^\\.]+\$") ?: "" + def newFilename = prefix + ext + return [[obj, newFilename]] + } else if (obj instanceof List && obj !instanceof String) { + return obj.withIndex().collectMany{item, ix -> + collectInputOutputPaths(item, prefix + "_" + ix) + } + } else if (obj instanceof Map) { + return obj.collectMany{key, item -> + collectInputOutputPaths(item, prefix + "." + key) + } + } else { + return [] + } +} + +def publishStates(Map args) { + def key_ = args.get("key") + def yamlTemplate_ = args.get("output_state", args.get("outputState", '$id.$key.state.yaml')) + + assert key_ != null : "publishStates: key must be specified" + + workflow publishStatesWf { + take: input_ch + main: + input_ch + | map { tup -> + def id_ = tup[0] + def state_ = tup[1] + + // the input files and the target output filenames + def inputoutputFilenames_ = collectInputOutputPaths(state_, id_ + "." + key_).transpose() + def inputFiles_ = inputoutputFilenames_[0] + def outputFilenames_ = inputoutputFilenames_[1] + + def yamlFilename = yamlTemplate_ + .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) + .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) + + // TODO: do the pathnames in state_ match up with the outputFilenames_? + + // convert state to yaml blob + def yamlBlob_ = toRelativeTaggedYamlBlob([id: id_] + state_, java.nio.file.Paths.get(yamlFilename)) + + [id_, yamlBlob_, yamlFilename, inputFiles_, outputFilenames_] + } + | publishStatesProc + emit: input_ch + } + return publishStatesWf +} +process publishStatesProc { + // todo: check publishpath? + publishDir path: "${getPublishDir()}/", mode: "copy" + tag "$id" + input: + tuple val(id), val(yamlBlob), val(yamlFile), path(inputFiles, stageAs: "_inputfile?/*"), val(outputFiles) + output: + tuple val(id), path{[yamlFile] + outputFiles} + script: + def copyCommands = [ + inputFiles instanceof List ? inputFiles : [inputFiles], + outputFiles instanceof List ? outputFiles : [outputFiles] + ] + .transpose() + .collectMany{infile, outfile -> + if (infile.toString() != outfile.toString()) { + [ + "[ -d \"\$(dirname '${outfile.toString()}')\" ] || mkdir -p \"\$(dirname '${outfile.toString()}')\"", + "cp -r '${infile.toString()}' '${outfile.toString()}'" + ] + } else { + // no need to copy if infile is the same as outfile + [] + } + } + """ +mkdir -p "\$(dirname '${yamlFile}')" +echo "Storing state as yaml" +echo '${yamlBlob}' > '${yamlFile}' +echo "Copying output files to destination folder" +${copyCommands.join("\n ")} +""" +} + + +// this assumes that the state contains no other values other than those specified in the config +def publishStatesByConfig(Map args) { + def config = args.get("config") + assert config != null : "publishStatesByConfig: config must be specified" + + def key_ = args.get("key", config.name) + assert key_ != null : "publishStatesByConfig: key must be specified" + + workflow publishStatesSimpleWf { + take: input_ch + main: + input_ch + | map { tup -> + def id_ = tup[0] + def state_ = tup[1] // e.g. [output: new File("myoutput.h5ad"), k: 10] + def origState_ = tup[2] // e.g. [output: '$id.$key.foo.h5ad'] + + // TODO: allow overriding the state.yaml template + // TODO TODO: if auto.publish == "state", add output_state as an argument + def yamlTemplate = params.containsKey("output_state") ? params.output_state : '$id.$key.state.yaml' + def yamlFilename = yamlTemplate + .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) + .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) + def yamlDir = java.nio.file.Paths.get(yamlFilename).getParent() + + // the processed state is a list of [key, value, inputPath, outputFilename] tuples, where + // - key is a String + // - value is any object that can be serialized to a Yaml (so a String/Integer/Long/Double/Boolean, a List, a Map, or a Path) + // - inputPath is a List[Path] + // - outputFilename is a List[String] + // - (key, value) are the tuples that will be saved to the state.yaml file + // - (inputPath, outputFilename) are the files that will be copied from src to dest (relative to the state.yaml) + def processedState = + config.allArguments + .findAll { it.direction == "output" } + .collectMany { par -> + def plainName_ = par.plainName + // if the state does not contain the key, it's an + // optional argument for which the component did + // not generate any output + if (!state_.containsKey(plainName_)) { + return [] + } + def value = state_[plainName_] + // if the parameter is not a file, it should be stored + // in the state as-is, but is not something that needs + // to be copied from the source path to the dest path + if (par.type != "file") { + return [[key: plainName_, value: value, inputPath: [], outputFilename: []]] + } + // if the orig state does not contain this filename, + // it's an optional argument for which the user specified + // that it should not be returned as a state + if (!origState_.containsKey(plainName_)) { + return [] + } + def filenameTemplate = origState_[plainName_] + // if the pararameter is multiple: true, fetch the template + if (par.multiple && filenameTemplate instanceof List) { + filenameTemplate = filenameTemplate[0] + } + // instantiate the template + def filename = filenameTemplate + .replaceAll('\\$id', id_) + .replaceAll('\\$\\{id\\}', id_) + .replaceAll('\\$key', key_) + .replaceAll('\\$\\{key\\}', key_) + if (par.multiple) { + // if the parameter is multiple: true, the filename + // should contain a wildcard '*' that is replaced with + // the index of the file + assert filename.contains("*") : "Module '${key_}' id '${id_}': Multiple output files specified, but no wildcard '*' in the filename: ${filename}" + def outputPerFile = value.withIndex().collect{ val, ix -> + def filename_ix = filename.replace("*", ix.toString()) + def value_ = java.nio.file.Paths.get(filename_ix) + // if id contains a slash + if (yamlDir != null) { + value_ = yamlDir.relativize(value_) + } + def inputPath = val instanceof File ? val.toPath() : val + [value: value_, inputPath: inputPath, outputFilename: filename_ix] + } + def transposedOutputs = ["value", "inputPath", "outputFilename"].collectEntries{ key -> + [key, outputPerFile.collect{dic -> dic[key]}] + } + return [[key: plainName_] + transposedOutputs] + } else { + def value_ = java.nio.file.Paths.get(filename) + // if id contains a slash + if (yamlDir != null) { + value_ = yamlDir.relativize(value_) + } + def inputPath = value instanceof File ? value.toPath() : value + return [[key: plainName_, value: value_, inputPath: [inputPath], outputFilename: [filename]]] + } + } + + def updatedState_ = processedState.collectEntries{[it.key, it.value]} + def inputPaths = processedState.collectMany{it.inputPath} + def outputFilenames = processedState.collectMany{it.outputFilename} + + // convert state to yaml blob + def yamlBlob_ = toTaggedYamlBlob([id: id_] + updatedState_) + + [id_, yamlBlob_, yamlFilename, inputPaths, outputFilenames] + } + | publishStatesProc + emit: input_ch + } + return publishStatesSimpleWf +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/states/setState.nf' +def setState(fun) { + assert fun instanceof Closure || fun instanceof Map || fun instanceof List : + "Error in setState: Expected process argument to be a Closure, a Map, or a List. Found: class ${fun.getClass()}" + + // if fun is a List, convert to map + if (fun instanceof List) { + // check whether fun is a list[string] + assert fun.every{it instanceof CharSequence} : "Error in setState: argument is a List, but not all elements are Strings" + fun = fun.collectEntries{[it, it]} + } + + // if fun is a map, convert to closure + if (fun instanceof Map) { + // check whether fun is a map[string, string] + assert fun.values().every{it instanceof CharSequence} : "Error in setState: argument is a Map, but not all values are Strings" + assert fun.keySet().every{it instanceof CharSequence} : "Error in setState: argument is a Map, but not all keys are Strings" + def funMap = fun.clone() + // turn the map into a closure to be used later on + fun = { id_, state_ -> + assert state_ instanceof Map : "Error in setState: the state is not a Map" + funMap.collectMany{newkey, origkey -> + if (state_.containsKey(origkey)) { + [[newkey, state_[origkey]]] + } else { + [] + } + }.collectEntries() + } + } + + map { tup -> + def id = tup[0] + def state = tup[1] + def unfilteredState = fun(id, state) + def newState = unfilteredState.findAll{key, val -> val != null} + [id, newState] + tup.drop(2) + } +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/workflowFactory/processAuto.nf' +// TODO: unit test processAuto +def processAuto(Map auto) { + // remove null values + auto = auto.findAll{k, v -> v != null} + + // check for unexpected keys + def expectedKeys = ["simplifyInput", "simplifyOutput", "transcript", "publish"] + def unexpectedKeys = auto.keySet() - expectedKeys + assert unexpectedKeys.isEmpty(), "unexpected keys in auto: '${unexpectedKeys.join("', '")}'" + + // check auto.simplifyInput + assert auto.simplifyInput instanceof Boolean, "auto.simplifyInput must be a boolean" + + // check auto.simplifyOutput + assert auto.simplifyOutput instanceof Boolean, "auto.simplifyOutput must be a boolean" + + // check auto.transcript + assert auto.transcript instanceof Boolean, "auto.transcript must be a boolean" + + // check auto.publish + assert auto.publish instanceof Boolean || auto.publish == "state", "auto.publish must be a boolean or 'state'" + + return auto.subMap(expectedKeys) +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/workflowFactory/processDirectives.nf' +def assertMapKeys(map, expectedKeys, requiredKeys, mapName) { + assert map instanceof Map : "Expected argument '$mapName' to be a Map. Found: class ${map.getClass()}" + map.forEach { key, val -> + assert key in expectedKeys : "Unexpected key '$key' in ${mapName ? mapName + " " : ""}map" + } + requiredKeys.forEach { requiredKey -> + assert map.containsKey(requiredKey) : "Missing required key '$key' in ${mapName ? mapName + " " : ""}map" + } +} + +// TODO: unit test processDirectives +def processDirectives(Map drctv) { + // remove null values + drctv = drctv.findAll{k, v -> v != null} + + // check for unexpected keys + def expectedKeys = [ + "accelerator", "afterScript", "beforeScript", "cache", "conda", "container", "containerOptions", "cpus", "disk", "echo", "errorStrategy", "executor", "machineType", "maxErrors", "maxForks", "maxRetries", "memory", "module", "penv", "pod", "publishDir", "queue", "label", "scratch", "storeDir", "stageInMode", "stageOutMode", "tag", "time" + ] + def unexpectedKeys = drctv.keySet() - expectedKeys + assert unexpectedKeys.isEmpty() : "Unexpected keys in process directive: '${unexpectedKeys.join("', '")}'" + + /* DIRECTIVE accelerator + accepted examples: + - [ limit: 4, type: "nvidia-tesla-k80" ] + */ + if (drctv.containsKey("accelerator")) { + assertMapKeys(drctv["accelerator"], ["type", "limit", "request", "runtime"], [], "accelerator") + } + + /* DIRECTIVE afterScript + accepted examples: + - "source /cluster/bin/cleanup" + */ + if (drctv.containsKey("afterScript")) { + assert drctv["afterScript"] instanceof CharSequence + } + + /* DIRECTIVE beforeScript + accepted examples: + - "source /cluster/bin/setup" + */ + if (drctv.containsKey("beforeScript")) { + assert drctv["beforeScript"] instanceof CharSequence + } + + /* DIRECTIVE cache + accepted examples: + - true + - false + - "deep" + - "lenient" + */ + if (drctv.containsKey("cache")) { + assert drctv["cache"] instanceof CharSequence || drctv["cache"] instanceof Boolean + if (drctv["cache"] instanceof CharSequence) { + assert drctv["cache"] in ["deep", "lenient"] : "Unexpected value for cache" + } + } + + /* DIRECTIVE conda + accepted examples: + - "bwa=0.7.15" + - "bwa=0.7.15 fastqc=0.11.5" + - ["bwa=0.7.15", "fastqc=0.11.5"] + */ + if (drctv.containsKey("conda")) { + if (drctv["conda"] instanceof List) { + drctv["conda"] = drctv["conda"].join(" ") + } + assert drctv["conda"] instanceof CharSequence + } + + /* DIRECTIVE container + accepted examples: + - "foo/bar:tag" + - [ registry: "reg", image: "im", tag: "ta" ] + is transformed to "reg/im:ta" + - [ image: "im" ] + is transformed to "im:latest" + */ + if (drctv.containsKey("container")) { + assert drctv["container"] instanceof Map || drctv["container"] instanceof CharSequence + if (drctv["container"] instanceof Map) { + def m = drctv["container"] + assertMapKeys(m, [ "registry", "image", "tag" ], ["image"], "container") + def part1 = + System.getenv('OVERRIDE_CONTAINER_REGISTRY') ? System.getenv('OVERRIDE_CONTAINER_REGISTRY') + "/" : + params.containsKey("override_container_registry") ? params["override_container_registry"] + "/" : // todo: remove? + m.registry ? m.registry + "/" : + "" + def part2 = m.image + def part3 = m.tag ? ":" + m.tag : ":latest" + drctv["container"] = part1 + part2 + part3 + } + } + + /* DIRECTIVE containerOptions + accepted examples: + - "--foo bar" + - ["--foo bar", "-f b"] + */ + if (drctv.containsKey("containerOptions")) { + if (drctv["containerOptions"] instanceof List) { + drctv["containerOptions"] = drctv["containerOptions"].join(" ") + } + assert drctv["containerOptions"] instanceof CharSequence + } + + /* DIRECTIVE cpus + accepted examples: + - 1 + - 10 + */ + if (drctv.containsKey("cpus")) { + assert drctv["cpus"] instanceof Integer + } + + /* DIRECTIVE disk + accepted examples: + - "1 GB" + - "2TB" + - "3.2KB" + - "10.B" + */ + if (drctv.containsKey("disk")) { + assert drctv["disk"] instanceof CharSequence + // assert drctv["disk"].matches("[0-9]+(\\.[0-9]*)? *[KMGTPEZY]?B") + // ^ does not allow closures + } + + /* DIRECTIVE echo + accepted examples: + - true + - false + */ + if (drctv.containsKey("echo")) { + assert drctv["echo"] instanceof Boolean + } + + /* DIRECTIVE errorStrategy + accepted examples: + - "terminate" + - "finish" + */ + if (drctv.containsKey("errorStrategy")) { + assert drctv["errorStrategy"] instanceof CharSequence + assert drctv["errorStrategy"] in ["terminate", "finish", "ignore", "retry"] : "Unexpected value for errorStrategy" + } + + /* DIRECTIVE executor + accepted examples: + - "local" + - "sge" + */ + if (drctv.containsKey("executor")) { + assert drctv["executor"] instanceof CharSequence + assert drctv["executor"] in ["local", "sge", "uge", "lsf", "slurm", "pbs", "pbspro", "moab", "condor", "nqsii", "ignite", "k8s", "awsbatch", "google-pipelines"] : "Unexpected value for executor" + } + + /* DIRECTIVE machineType + accepted examples: + - "n1-highmem-8" + */ + if (drctv.containsKey("machineType")) { + assert drctv["machineType"] instanceof CharSequence + } + + /* DIRECTIVE maxErrors + accepted examples: + - 1 + - 3 + */ + if (drctv.containsKey("maxErrors")) { + assert drctv["maxErrors"] instanceof Integer + } + + /* DIRECTIVE maxForks + accepted examples: + - 1 + - 3 + */ + if (drctv.containsKey("maxForks")) { + assert drctv["maxForks"] instanceof Integer + } + + /* DIRECTIVE maxRetries + accepted examples: + - 1 + - 3 + */ + if (drctv.containsKey("maxRetries")) { + assert drctv["maxRetries"] instanceof Integer + } + + /* DIRECTIVE memory + accepted examples: + - "1 GB" + - "2TB" + - "3.2KB" + - "10.B" + */ + if (drctv.containsKey("memory")) { + assert drctv["memory"] instanceof CharSequence + // assert drctv["memory"].matches("[0-9]+(\\.[0-9]*)? *[KMGTPEZY]?B") + // ^ does not allow closures + } + + /* DIRECTIVE module + accepted examples: + - "ncbi-blast/2.2.27" + - "ncbi-blast/2.2.27:t_coffee/10.0" + - ["ncbi-blast/2.2.27", "t_coffee/10.0"] + */ + if (drctv.containsKey("module")) { + if (drctv["module"] instanceof List) { + drctv["module"] = drctv["module"].join(":") + } + assert drctv["module"] instanceof CharSequence + } + + /* DIRECTIVE penv + accepted examples: + - "smp" + */ + if (drctv.containsKey("penv")) { + assert drctv["penv"] instanceof CharSequence + } + + /* DIRECTIVE pod + accepted examples: + - [ label: "key", value: "val" ] + - [ annotation: "key", value: "val" ] + - [ env: "key", value: "val" ] + - [ [label: "l", value: "v"], [env: "e", value: "v"]] + */ + if (drctv.containsKey("pod")) { + if (drctv["pod"] instanceof Map) { + drctv["pod"] = [ drctv["pod"] ] + } + assert drctv["pod"] instanceof List + drctv["pod"].forEach { pod -> + assert pod instanceof Map + // TODO: should more checks be added? + // See https://www.nextflow.io/docs/latest/process.html?highlight=directives#pod + // e.g. does it contain 'label' and 'value', or 'annotation' and 'value', or ...? + } + } + + /* DIRECTIVE publishDir + accepted examples: + - [] + - [ [ path: "foo", enabled: true ], [ path: "bar", enabled: false ] ] + - "/path/to/dir" + is transformed to [[ path: "/path/to/dir" ]] + - [ path: "/path/to/dir", mode: "cache" ] + is transformed to [[ path: "/path/to/dir", mode: "cache" ]] + */ + // TODO: should we also look at params["publishDir"]? + if (drctv.containsKey("publishDir")) { + def pblsh = drctv["publishDir"] + + // check different options + assert pblsh instanceof List || pblsh instanceof Map || pblsh instanceof CharSequence + + // turn into list if not already so + // for some reason, 'if (!pblsh instanceof List) pblsh = [ pblsh ]' doesn't work. + pblsh = pblsh instanceof List ? pblsh : [ pblsh ] + + // check elements of publishDir + pblsh = pblsh.collect{ elem -> + // turn into map if not already so + elem = elem instanceof CharSequence ? [ path: elem ] : elem + + // check types and keys + assert elem instanceof Map : "Expected publish argument '$elem' to be a String or a Map. Found: class ${elem.getClass()}" + assertMapKeys(elem, [ "path", "mode", "overwrite", "pattern", "saveAs", "enabled" ], ["path"], "publishDir") + + // check elements in map + assert elem.containsKey("path") + assert elem["path"] instanceof CharSequence + if (elem.containsKey("mode")) { + assert elem["mode"] instanceof CharSequence + assert elem["mode"] in [ "symlink", "rellink", "link", "copy", "copyNoFollow", "move" ] + } + if (elem.containsKey("overwrite")) { + assert elem["overwrite"] instanceof Boolean + } + if (elem.containsKey("pattern")) { + assert elem["pattern"] instanceof CharSequence + } + if (elem.containsKey("saveAs")) { + assert elem["saveAs"] instanceof CharSequence //: "saveAs as a Closure is currently not supported. Surround your closure with single quotes to get the desired effect. Example: '\{ foo \}'" + } + if (elem.containsKey("enabled")) { + assert elem["enabled"] instanceof Boolean + } + + // return final result + elem + } + // store final directive + drctv["publishDir"] = pblsh + } + + /* DIRECTIVE queue + accepted examples: + - "long" + - "short,long" + - ["short", "long"] + */ + if (drctv.containsKey("queue")) { + if (drctv["queue"] instanceof List) { + drctv["queue"] = drctv["queue"].join(",") + } + assert drctv["queue"] instanceof CharSequence + } + + /* DIRECTIVE label + accepted examples: + - "big_mem" + - "big_cpu" + - ["big_mem", "big_cpu"] + */ + if (drctv.containsKey("label")) { + if (drctv["label"] instanceof CharSequence) { + drctv["label"] = [ drctv["label"] ] + } + assert drctv["label"] instanceof List + drctv["label"].forEach { label -> + assert label instanceof CharSequence + // assert label.matches("[a-zA-Z0-9]([a-zA-Z0-9_]*[a-zA-Z0-9])?") + // ^ does not allow closures + } + } + + /* DIRECTIVE scratch + accepted examples: + - true + - "/path/to/scratch" + - '$MY_PATH_TO_SCRATCH' + - "ram-disk" + */ + if (drctv.containsKey("scratch")) { + assert drctv["scratch"] == true || drctv["scratch"] instanceof CharSequence + } + + /* DIRECTIVE storeDir + accepted examples: + - "/path/to/storeDir" + */ + if (drctv.containsKey("storeDir")) { + assert drctv["storeDir"] instanceof CharSequence + } + + /* DIRECTIVE stageInMode + accepted examples: + - "copy" + - "link" + */ + if (drctv.containsKey("stageInMode")) { + assert drctv["stageInMode"] instanceof CharSequence + assert drctv["stageInMode"] in ["copy", "link", "symlink", "rellink"] + } + + /* DIRECTIVE stageOutMode + accepted examples: + - "copy" + - "link" + */ + if (drctv.containsKey("stageOutMode")) { + assert drctv["stageOutMode"] instanceof CharSequence + assert drctv["stageOutMode"] in ["copy", "move", "rsync"] + } + + /* DIRECTIVE tag + accepted examples: + - "foo" + - '$id' + */ + if (drctv.containsKey("tag")) { + assert drctv["tag"] instanceof CharSequence + } + + /* DIRECTIVE time + accepted examples: + - "1h" + - "2days" + - "1day 6hours 3minutes 30seconds" + */ + if (drctv.containsKey("time")) { + assert drctv["time"] instanceof CharSequence + // todo: validation regex? + } + + return drctv +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/workflowFactory/processWorkflowArgs.nf' +def processWorkflowArgs(Map args, Map defaultWfArgs, Map meta) { + // override defaults with args + def workflowArgs = defaultWfArgs + args + + // check whether 'key' exists + assert workflowArgs.containsKey("key") : "Error in module '${meta.config.name}': key is a required argument" + + // if 'key' is a closure, apply it to the original key + if (workflowArgs["key"] instanceof Closure) { + workflowArgs["key"] = workflowArgs["key"](meta.config.name) + } + def key = workflowArgs["key"] + assert key instanceof CharSequence : "Expected process argument 'key' to be a String. Found: class ${key.getClass()}" + assert key ==~ /^[a-zA-Z_]\w*$/ : "Error in module '$key': Expected process argument 'key' to consist of only letters, digits or underscores. Found: ${key}" + + // check for any unexpected keys + def expectedKeys = ["key", "directives", "auto", "map", "mapId", "mapData", "mapPassthrough", "filter", "runIf", "fromState", "toState", "args", "renameKeys", "debug"] + def unexpectedKeys = workflowArgs.keySet() - expectedKeys + assert unexpectedKeys.isEmpty() : "Error in module '$key': unexpected arguments to the '.run()' function: '${unexpectedKeys.join("', '")}'" + + // check whether directives exists and apply defaults + assert workflowArgs.containsKey("directives") : "Error in module '$key': directives is a required argument" + assert workflowArgs["directives"] instanceof Map : "Error in module '$key': Expected process argument 'directives' to be a Map. Found: class ${workflowArgs['directives'].getClass()}" + workflowArgs["directives"] = processDirectives(defaultWfArgs.directives + workflowArgs["directives"]) + + // check whether directives exists and apply defaults + assert workflowArgs.containsKey("auto") : "Error in module '$key': auto is a required argument" + assert workflowArgs["auto"] instanceof Map : "Error in module '$key': Expected process argument 'auto' to be a Map. Found: class ${workflowArgs['auto'].getClass()}" + workflowArgs["auto"] = processAuto(defaultWfArgs.auto + workflowArgs["auto"]) + + // auto define publish, if so desired + if (workflowArgs.auto.publish == true && (workflowArgs.directives.publishDir != null ? workflowArgs.directives.publishDir : [:]).isEmpty()) { + // can't assert at this level thanks to the no_publish profile + // assert params.containsKey("publishDir") || params.containsKey("publish_dir") : + // "Error in module '${workflowArgs['key']}': if auto.publish is true, params.publish_dir needs to be defined.\n" + + // " Example: params.publish_dir = \"./output/\"" + def publishDir = getPublishDir() + + if (publishDir != null) { + workflowArgs.directives.publishDir = [[ + path: publishDir, + saveAs: "{ it.startsWith('.') ? null : it }", // don't publish hidden files, by default + mode: "copy" + ]] + } + } + + // auto define transcript, if so desired + if (workflowArgs.auto.transcript == true) { + // can't assert at this level thanks to the no_publish profile + // assert params.containsKey("transcriptsDir") || params.containsKey("transcripts_dir") || params.containsKey("publishDir") || params.containsKey("publish_dir") : + // "Error in module '${workflowArgs['key']}': if auto.transcript is true, either params.transcripts_dir or params.publish_dir needs to be defined.\n" + + // " Example: params.transcripts_dir = \"./transcripts/\"" + def transcriptsDir = + params.containsKey("transcripts_dir") ? params.transcripts_dir : + params.containsKey("transcriptsDir") ? params.transcriptsDir : + params.containsKey("publish_dir") ? params.publish_dir + "/_transcripts" : + params.containsKey("publishDir") ? params.publishDir + "/_transcripts" : + null + if (transcriptsDir != null) { + def timestamp = nextflow.Nextflow.getSession().getWorkflowMetadata().start.format('yyyy-MM-dd_HH-mm-ss') + def transcriptsPublishDir = [ + path: "$transcriptsDir/$timestamp/\${task.process.replaceAll(':', '-')}/\${id}/", + saveAs: "{ it.startsWith('.') ? it.replaceAll('^.', '') : null }", + mode: "copy" + ] + def publishDirs = workflowArgs.directives.publishDir != null ? workflowArgs.directives.publishDir : null ? workflowArgs.directives.publishDir : [] + workflowArgs.directives.publishDir = publishDirs + transcriptsPublishDir + } + } + + // if this is a stubrun, remove certain directives? + if (workflow.stubRun) { + workflowArgs.directives.keySet().removeAll(["publishDir", "cpus", "memory", "label"]) + } + + for (nam in ["map", "mapId", "mapData", "mapPassthrough", "filter", "runIf"]) { + if (workflowArgs.containsKey(nam) && workflowArgs[nam]) { + assert workflowArgs[nam] instanceof Closure : "Error in module '$key': Expected process argument '$nam' to be null or a Closure. Found: class ${workflowArgs[nam].getClass()}" + } + } + + // TODO: should functions like 'map', 'mapId', 'mapData', 'mapPassthrough' be deprecated as well? + for (nam in ["map", "mapData", "mapPassthrough", "renameKeys"]) { + if (workflowArgs.containsKey(nam) && workflowArgs[nam] != null) { + log.warn "module '$key': workflow argument '$nam' is deprecated and will be removed in Viash 0.9.0. Please use 'fromState' and 'toState' instead." + } + } + + // check fromState + workflowArgs["fromState"] = _processFromState(workflowArgs.get("fromState"), key, meta.config) + + // check toState + workflowArgs["toState"] = _processToState(workflowArgs.get("toState"), key, meta.config) + + // return output + return workflowArgs +} + +def _processFromState(fromState, key_, config_) { + assert fromState == null || fromState instanceof Closure || fromState instanceof Map || fromState instanceof List : + "Error in module '$key_': Expected process argument 'fromState' to be null, a Closure, a Map, or a List. Found: class ${fromState.getClass()}" + if (fromState == null) { + return null + } + + // if fromState is a List, convert to map + if (fromState instanceof List) { + // check whether fromstate is a list[string] + assert fromState.every{it instanceof CharSequence} : "Error in module '$key_': fromState is a List, but not all elements are Strings" + fromState = fromState.collectEntries{[it, it]} + } + + // if fromState is a map, convert to closure + if (fromState instanceof Map) { + // check whether fromstate is a map[string, string] + assert fromState.values().every{it instanceof CharSequence} : "Error in module '$key_': fromState is a Map, but not all values are Strings" + assert fromState.keySet().every{it instanceof CharSequence} : "Error in module '$key_': fromState is a Map, but not all keys are Strings" + def fromStateMap = fromState.clone() + def requiredInputNames = meta.config.allArguments.findAll{it.required && it.direction == "Input"}.collect{it.plainName} + // turn the map into a closure to be used later on + fromState = { it -> + def state = it[1] + assert state instanceof Map : "Error in module '$key_': the state is not a Map" + def data = fromStateMap.collectMany{newkey, origkey -> + // check whether newkey corresponds to a required argument + if (state.containsKey(origkey)) { + [[newkey, state[origkey]]] + } else if (!requiredInputNames.contains(origkey)) { + [] + } else { + throw new Exception("Error in module '$key_': fromState key '$origkey' not found in current state") + } + }.collectEntries() + data + } + } + + return fromState +} + +def _processToState(toState, key_, config_) { + if (toState == null) { + toState = { tup -> tup[1] } + } + + // toState should be a closure, map[string, string], or list[string] + assert toState instanceof Closure || toState instanceof Map || toState instanceof List : + "Error in module '$key_': Expected process argument 'toState' to be a Closure, a Map, or a List. Found: class ${toState.getClass()}" + + // if toState is a List, convert to map + if (toState instanceof List) { + // check whether toState is a list[string] + assert toState.every{it instanceof CharSequence} : "Error in module '$key_': toState is a List, but not all elements are Strings" + toState = toState.collectEntries{[it, it]} + } + + // if toState is a map, convert to closure + if (toState instanceof Map) { + // check whether toState is a map[string, string] + assert toState.values().every{it instanceof CharSequence} : "Error in module '$key_': toState is a Map, but not all values are Strings" + assert toState.keySet().every{it instanceof CharSequence} : "Error in module '$key_': toState is a Map, but not all keys are Strings" + def toStateMap = toState.clone() + def requiredOutputNames = config_.allArguments.findAll{it.required && it.direction == "Output"}.collect{it.plainName} + // turn the map into a closure to be used later on + toState = { it -> + def output = it[1] + def state = it[2] + assert output instanceof Map : "Error in module '$key_': the output is not a Map" + assert state instanceof Map : "Error in module '$key_': the state is not a Map" + def extraEntries = toStateMap.collectMany{newkey, origkey -> + // check whether newkey corresponds to a required argument + if (output.containsKey(origkey)) { + [[newkey, output[origkey]]] + } else if (!requiredOutputNames.contains(origkey)) { + [] + } else { + throw new Exception("Error in module '$key_': toState key '$origkey' not found in current output") + } + }.collectEntries() + state + extraEntries + } + } + + return toState +} + +// helper file: 'src/main/resources/io/viash/runners/nextflow/workflowFactory/workflowFactory.nf' +def _debug(workflowArgs, debugKey) { + if (workflowArgs.debug) { + view { "process '${workflowArgs.key}' $debugKey tuple: $it" } + } else { + map { it } + } +} + +// depends on: innerWorkflowFactory +def workflowFactory(Map args, Map defaultWfArgs, Map meta) { + def workflowArgs = processWorkflowArgs(args, defaultWfArgs, meta) + def key_ = workflowArgs["key"] + + workflow workflowInstance { + take: input_ + + main: + def chModified = input_ + | checkUniqueIds([:]) + | _debug(workflowArgs, "input") + | map { tuple -> + tuple = deepClone(tuple) + + if (workflowArgs.map) { + tuple = workflowArgs.map(tuple) + } + if (workflowArgs.mapId) { + tuple[0] = workflowArgs.mapId(tuple[0]) + } + if (workflowArgs.mapData) { + tuple[1] = workflowArgs.mapData(tuple[1]) + } + if (workflowArgs.mapPassthrough) { + tuple = tuple.take(2) + workflowArgs.mapPassthrough(tuple.drop(2)) + } + + // check tuple + assert tuple instanceof List : + "Error in module '${key_}': element in channel should be a tuple [id, data, ...otherargs...]\n" + + " Example: [\"id\", [input: file('foo.txt'), arg: 10]].\n" + + " Expected class: List. Found: tuple.getClass() is ${tuple.getClass()}" + assert tuple.size() >= 2 : + "Error in module '${key_}': expected length of tuple in input channel to be two or greater.\n" + + " Example: [\"id\", [input: file('foo.txt'), arg: 10]].\n" + + " Found: tuple.size() == ${tuple.size()}" + + // check id field + if (tuple[0] instanceof GString) { + tuple[0] = tuple[0].toString() + } + assert tuple[0] instanceof CharSequence : + "Error in module '${key_}': first element of tuple in channel should be a String\n" + + " Example: [\"id\", [input: file('foo.txt'), arg: 10]].\n" + + " Found: ${tuple[0]}" + + // match file to input file + if (workflowArgs.auto.simplifyInput && (tuple[1] instanceof Path || tuple[1] instanceof List)) { + def inputFiles = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "input" } + + assert inputFiles.size() == 1 : + "Error in module '${key_}' id '${tuple[0]}'.\n" + + " Anonymous file inputs are only allowed when the process has exactly one file input.\n" + + " Expected: inputFiles.size() == 1. Found: inputFiles.size() is ${inputFiles.size()}" + + tuple[1] = [[ inputFiles[0].plainName, tuple[1] ]].collectEntries() + } + + // check data field + assert tuple[1] instanceof Map : + "Error in module '${key_}' id '${tuple[0]}': second element of tuple in channel should be a Map\n" + + " Example: [\"id\", [input: file('foo.txt'), arg: 10]].\n" + + " Expected class: Map. Found: tuple[1].getClass() is ${tuple[1].getClass()}" + + // rename keys of data field in tuple + if (workflowArgs.renameKeys) { + assert workflowArgs.renameKeys instanceof Map : + "Error renaming data keys in module '${key_}' id '${tuple[0]}'.\n" + + " Example: renameKeys: ['new_key': 'old_key'].\n" + + " Expected class: Map. Found: renameKeys.getClass() is ${workflowArgs.renameKeys.getClass()}" + assert tuple[1] instanceof Map : + "Error renaming data keys in module '${key_}' id '${tuple[0]}'.\n" + + " Expected class: Map. Found: tuple[1].getClass() is ${tuple[1].getClass()}" + + // TODO: allow renameKeys to be a function? + workflowArgs.renameKeys.each { newKey, oldKey -> + assert newKey instanceof CharSequence : + "Error renaming data keys in module '${key_}' id '${tuple[0]}'.\n" + + " Example: renameKeys: ['new_key': 'old_key'].\n" + + " Expected class of newKey: String. Found: newKey.getClass() is ${newKey.getClass()}" + assert oldKey instanceof CharSequence : + "Error renaming data keys in module '${key_}' id '${tuple[0]}'.\n" + + " Example: renameKeys: ['new_key': 'old_key'].\n" + + " Expected class of oldKey: String. Found: oldKey.getClass() is ${oldKey.getClass()}" + assert tuple[1].containsKey(oldKey) : + "Error renaming data keys in module '${key}' id '${tuple[0]}'.\n" + + " Key '$oldKey' is missing in the data map. tuple[1].keySet() is '${tuple[1].keySet()}'" + tuple[1].put(newKey, tuple[1][oldKey]) + } + tuple[1].keySet().removeAll(workflowArgs.renameKeys.collect{ newKey, oldKey -> oldKey }) + } + tuple + } + + + def chRun = null + def chPassthrough = null + if (workflowArgs.runIf) { + def runIfBranch = chModified.branch{ tup -> + run: workflowArgs.runIf(tup[0], tup[1]) + passthrough: true + } + chRun = runIfBranch.run + chPassthrough = runIfBranch.passthrough + } else { + chRun = chModified + chPassthrough = Channel.empty() + } + + def chRunFiltered = workflowArgs.filter ? + chRun | filter{workflowArgs.filter(it)} : + chRun + + def chArgs = workflowArgs.fromState ? + chRunFiltered | map{ + def new_data = workflowArgs.fromState(it.take(2)) + [it[0], new_data] + } : + chRunFiltered | map {tup -> tup.take(2)} + + // fill in defaults + def chArgsWithDefaults = chArgs + | map { tuple -> + def id_ = tuple[0] + def data_ = tuple[1] + + // TODO: could move fromState to here + + // fetch default params from functionality + def defaultArgs = meta.config.allArguments + .findAll { it.containsKey("default") } + .collectEntries { [ it.plainName, it.default ] } + + // fetch overrides in params + def paramArgs = meta.config.allArguments + .findAll { par -> + def argKey = key_ + "__" + par.plainName + params.containsKey(argKey) + } + .collectEntries { [ it.plainName, params[key_ + "__" + it.plainName] ] } + + // fetch overrides in data + def dataArgs = meta.config.allArguments + .findAll { data_.containsKey(it.plainName) } + .collectEntries { [ it.plainName, data_[it.plainName] ] } + + // combine params + def combinedArgs = defaultArgs + paramArgs + workflowArgs.args + dataArgs + + // remove arguments with explicit null values + combinedArgs + .removeAll{_, val -> val == null || val == "viash_no_value" || val == "force_null"} + + combinedArgs = _processInputValues(combinedArgs, meta.config, id_, key_) + + [id_, combinedArgs] + tuple.drop(2) + } + + // TODO: move some of the _meta.join_id wrangling to the safeJoin() function. + def chInitialOutput = chArgsWithDefaults + | _debug(workflowArgs, "processed") + // run workflow + | innerWorkflowFactory(workflowArgs) + // check output tuple + | map { id_, output_ -> + + // see if output map contains metadata + def meta_ = + output_ instanceof Map && output_.containsKey("_meta") ? + output_["_meta"] : + [:] + def join_id = meta_.join_id ?: id_ + + // remove metadata + output_ = output_.findAll{k, v -> k != "_meta"} + + // check value types + output_ = _processOutputValues(output_, meta.config, id_, key_) + + // simplify output if need be + if (workflowArgs.auto.simplifyOutput && output_.size() == 1) { + output_ = output_.values()[0] + } + + [join_id, id_, output_] + } + // | view{"chInitialOutput: ${it.take(3)}"} + + // join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...] + def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_) + // input tuple format: [join_id, id, output, prev_state, ...] + // output tuple format: [join_id, id, new_state, ...] + | map{ tup -> + def new_state = workflowArgs.toState(tup.drop(1).take(3)) + tup.take(2) + [new_state] + tup.drop(4) + } + + if (workflowArgs.auto.publish == "state") { + def chPublish = chNewState + // input tuple format: [join_id, id, new_state, ...] + // output tuple format: [join_id, id, new_state] + | map{ tup -> + tup.take(3) + } + + safeJoin(chPublish, chArgsWithDefaults, key_) + // input tuple format: [join_id, id, new_state, orig_state, ...] + // output tuple format: [id, new_state, orig_state] + | map { tup -> + tup.drop(1).take(3) + } + | publishStatesByConfig(key: key_, config: meta.config) + } + + // remove join_id and meta + chReturn = chNewState + | map { tup -> + // input tuple format: [join_id, id, new_state, ...] + // output tuple format: [id, new_state, ...] + tup.drop(1) + } + | _debug(workflowArgs, "output") + | concat(chPassthrough) + + emit: chReturn + } + + def wf = workflowInstance.cloneWithName(key_) + + // add factory function + wf.metaClass.run = { runArgs -> + workflowFactory(runArgs, workflowArgs, meta) + } + // add config to module for later introspection + wf.metaClass.config = meta.config + + return wf +} + +nextflow.enable.dsl=2 + +// START COMPONENT-SPECIFIC CODE + +// create meta object +meta = [ + "resources_dir": moduleDir.toRealPath().normalize(), + "config": processConfig(readJsonBlob('''{ + "name" : "umi_tools_extract", + "namespace" : "umi_tools", + "version" : "v0.2.0", + "argument_groups" : [ + { + "name" : "Input", + "arguments" : [ + { + "type" : "file", + "name" : "--input", + "description" : "File containing the input data.", + "example" : [ + "sample.fastq" + ], + "must_exist" : true, + "create_parent" : true, + "required" : true, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--read2_in", + "description" : "File containing the input data for the R2 reads (if paired). If provided, a need to be provided.", + "example" : [ + "sample_R2.fastq" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--bc_pattern", + "alternatives" : [ + "-p" + ], + "description" : "The UMI barcode pattern to use e.g. 'NNNNNN' indicates that the first 6 nucleotides \nof the read are from the UMI.\n", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--bc_pattern2", + "description" : "The UMI barcode pattern to use for read 2.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + } + ] + }, + { + "name" : "Output", + "arguments" : [ + { + "type" : "file", + "name" : "--output", + "description" : "Output file for read 1.", + "must_exist" : true, + "create_parent" : true, + "required" : true, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--read2_out", + "description" : "Output file for read 2.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--filtered_out", + "description" : "Write out reads not matching regex pattern or cell barcode whitelist to this file.\n", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--filtered_out2", + "description" : "Write out read pairs not matching regex pattern or cell barcode whitelist to this file.\n", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + } + ] + }, + { + "name" : "Extract Options", + "arguments" : [ + { + "type" : "string", + "name" : "--extract_method", + "description" : "UMI pattern to use. Default: `string`.\n", + "example" : [ + "string" + ], + "required" : false, + "choices" : [ + "string", + "regex" + ], + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "boolean_true", + "name" : "--error_correct_cell", + "description" : "Error correct cell barcodes to the whitelist.", + "direction" : "input" + }, + { + "type" : "file", + "name" : "--whitelist", + "description" : "Whitelist of accepted cell barcodes tab-separated format, where column 1 is the whitelisted\ncell barcodes and column 2 is the list (comma-separated) of other cell barcodes which should \nbe corrected to the barcode in column 1. If the --error_correct_cell option is not used, this\ncolumn will be ignored.\n", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--blacklist", + "description" : "BlackWhitelist of cell barcodes to discard.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "integer", + "name" : "--subset_reads", + "description" : "Only parse the first N reads.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "integer", + "name" : "--quality_filter_threshold", + "description" : "Remove reads where any UMI base quality score falls below this threshold.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--quality_filter_mask", + "description" : "If a UMI base has a quality below this threshold, replace the base with 'N'.\n", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--quality_encoding", + "description" : "Quality score encoding. Choose from:\n * phred33 [33-77]\n * phred64 [64-106]\n * solexa [59-106]\n", + "required" : false, + "choices" : [ + "phred33", + "phred64", + "solexa" + ], + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "boolean_true", + "name" : "--reconcile_pairs", + "description" : "Allow read 2 infile to contain reads not in read 1 infile. This enables support for upstream protocols\nwhere read one contains cell barcodes, and the read pairs have been filtered and corrected without regard\nto the read2.\n", + "direction" : "input" + }, + { + "type" : "boolean_true", + "name" : "--three_prime", + "alternatives" : [ + "--3prime" + ], + "description" : "By default the barcode is assumed to be on the 5' end of the read, but use this option to sepecify that it is\non the 3' end instead. This option only works with --extract_method=string since 3' encoding can be specified\nexplicitly with a regex, e.g `.*(?P.{5})$`.\n", + "direction" : "input" + }, + { + "type" : "boolean_true", + "name" : "--ignore_read_pair_suffixes", + "description" : "Ignore \\"/1\\" and \\"/2\\" read name suffixes. Note that this options is required if the suffixes are not whitespace\nseparated from the rest of the read name.\narguments:\n", + "direction" : "input" + }, + { + "type" : "string", + "name" : "--umi_separator", + "description" : "The character that separates the UMI in the read name. Most likely a colon if you skipped the extraction with\nUMI-tools and used other software. Default: `_`\n", + "example" : [ + "_" + ], + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--grouping_method", + "description" : "Method to use to determine read groups by subsuming those with similar UMIs. All methods start by identifying\nthe reads with the same mapping position, but treat similar yet nonidentical UMIs differently. Default: `directional`\n", + "example" : [ + "directional" + ], + "required" : false, + "choices" : [ + "unique", + "percentile", + "cluster", + "adjacency", + "directional" + ], + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "integer", + "name" : "--umi_discard_read", + "description" : "After UMI barcode extraction discard either R1 or R2 by setting this parameter to 1 or 2, respectively. Default: `0`\n", + "example" : [ + 0 + ], + "required" : false, + "choices" : [ + 0, + 1, + 2 + ], + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + } + ] + }, + { + "name" : "Common Options", + "arguments" : [ + { + "type" : "file", + "name" : "--log", + "description" : "File with logging information.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "boolean_true", + "name" : "--log2stderr", + "description" : "Send logging information to stderr.", + "direction" : "output" + }, + { + "type" : "integer", + "name" : "--verbose", + "description" : "Log level. The higher, the more output.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--error", + "description" : "File with error information.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--temp_dir", + "description" : "Directory for temporary files. If not set, the bash environmental variable TMPDIR is used.\n", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "integer", + "name" : "--compresslevel", + "description" : "Level of Gzip compression to use. Default=6 matches GNU gzip rather than python gzip default (which is 9).\nDefault `6`.\n", + "example" : [ + 6 + ], + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--timeit", + "description" : "Store timing information in file.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "string", + "name" : "--timeit_name", + "description" : "Name in timing file for this class of jobs.", + "default" : [ + "all" + ], + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "boolean_true", + "name" : "--timeit_header", + "description" : "Add header for timing information.", + "direction" : "input" + }, + { + "type" : "integer", + "name" : "--random_seed", + "description" : "Random seed to initialize number generator with.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + } + ] + } + ], + "resources" : [ + { + "type" : "bash_script", + "path" : "script.sh", + "is_executable" : true + } + ], + "description" : "Flexible removal of UMI sequences from fastq reads.\nUMIs are removed and appended to the read name. Any other barcode, for example a library barcode,\nis left on the read. Can also filter reads by quality or against a whitelist.\n", + "test_resources" : [ + { + "type" : "bash_script", + "path" : "test.sh", + "is_executable" : true + }, + { + "type" : "file", + "path" : "test_data" + } + ], + "status" : "enabled", + "requirements" : { + "commands" : [ + "ps" + ] + }, + "keywords" : [ + "extract", + "umi-tools", + "umi", + "fastq" + ], + "license" : "MIT", + "references" : { + "doi" : [ + "10.1101/gr.209601.116" + ] + }, + "links" : { + "repository" : "https://github.com/CGATOxford/UMI-tools", + "homepage" : "https://umi-tools.readthedocs.io/en/latest/", + "documentation" : "https://umi-tools.readthedocs.io/en/latest/reference/extract.html" + }, + "runners" : [ + { + "type" : "executable", + "id" : "executable", + "docker_setup_strategy" : "ifneedbepullelsecachedbuild" + }, + { + "type" : "nextflow", + "id" : "nextflow", + "directives" : { + "tag" : "$id" + }, + "auto" : { + "simplifyInput" : true, + "simplifyOutput" : false, + "transcript" : false, + "publish" : false + }, + "config" : { + "labels" : { + "mem1gb" : "memory = 1000000000.B", + "mem2gb" : "memory = 2000000000.B", + "mem5gb" : "memory = 5000000000.B", + "mem10gb" : "memory = 10000000000.B", + "mem20gb" : "memory = 20000000000.B", + "mem50gb" : "memory = 50000000000.B", + "mem100gb" : "memory = 100000000000.B", + "mem200gb" : "memory = 200000000000.B", + "mem500gb" : "memory = 500000000000.B", + "mem1tb" : "memory = 1000000000000.B", + "mem2tb" : "memory = 2000000000000.B", + "mem5tb" : "memory = 5000000000000.B", + "mem10tb" : "memory = 10000000000000.B", + "mem20tb" : "memory = 20000000000000.B", + "mem50tb" : "memory = 50000000000000.B", + "mem100tb" : "memory = 100000000000000.B", + "mem200tb" : "memory = 200000000000000.B", + "mem500tb" : "memory = 500000000000000.B", + "mem1gib" : "memory = 1073741824.B", + "mem2gib" : "memory = 2147483648.B", + "mem4gib" : "memory = 4294967296.B", + "mem8gib" : "memory = 8589934592.B", + "mem16gib" : "memory = 17179869184.B", + "mem32gib" : "memory = 34359738368.B", + "mem64gib" : "memory = 68719476736.B", + "mem128gib" : "memory = 137438953472.B", + "mem256gib" : "memory = 274877906944.B", + "mem512gib" : "memory = 549755813888.B", + "mem1tib" : "memory = 1099511627776.B", + "mem2tib" : "memory = 2199023255552.B", + "mem4tib" : "memory = 4398046511104.B", + "mem8tib" : "memory = 8796093022208.B", + "mem16tib" : "memory = 17592186044416.B", + "mem32tib" : "memory = 35184372088832.B", + "mem64tib" : "memory = 70368744177664.B", + "mem128tib" : "memory = 140737488355328.B", + "mem256tib" : "memory = 281474976710656.B", + "mem512tib" : "memory = 562949953421312.B", + "cpu1" : "cpus = 1", + "cpu2" : "cpus = 2", + "cpu5" : "cpus = 5", + "cpu10" : "cpus = 10", + "cpu20" : "cpus = 20", + "cpu50" : "cpus = 50", + "cpu100" : "cpus = 100", + "cpu200" : "cpus = 200", + "cpu500" : "cpus = 500", + "cpu1000" : "cpus = 1000" + } + }, + "debug" : false, + "container" : "docker" + } + ], + "engines" : [ + { + "type" : "docker", + "id" : "docker", + "image" : "quay.io/biocontainers/umi_tools:1.1.4--py310h4b81fae_2", + "target_registry" : "images.viash-hub.com", + "target_tag" : "v0.2.0", + "namespace_separator" : "/", + "setup" : [ + { + "type" : "docker", + "run" : [ + "umi_tools -v | sed 's/ version//g' > /var/software_versions.txt\n" + ] + } + ] + }, + { + "type" : "native", + "id" : "native" + } + ], + "build_info" : { + "config" : "/workdir/root/repo/src/umi_tools/umi_tools_extract/config.vsh.yaml", + "runner" : "nextflow", + "engine" : "docker|native", + "output" : "target/nextflow/umi_tools/umi_tools_extract", + "viash_version" : "0.9.0", + "git_commit" : "7e530218844c373048bc33de58f021b6460642e5", + "git_remote" : "https://x-access-token:ghs_kiUBq39QrAlnG6IaeAcTcXhllzqpOV4LDB3e@github.com/viash-hub/biobox" + }, + "package_config" : { + "name" : "biobox", + "version" : "v0.2.0", + "description" : "A collection of bioinformatics tools for working with sequence data.\n", + "viash_version" : "0.9.0", + "source" : "src", + "target" : "target", + "config_mods" : [ + ".requirements.commands := ['ps']\n", + ".engines += { type: \\"native\\" }", + ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'", + ".engines[.type == 'docker'].target_tag := 'v0.2.0'" + ], + "keywords" : [ + "bioinformatics", + "modules", + "sequencing" + ], + "license" : "MIT", + "organization" : "vsh", + "links" : { + "repository" : "https://github.com/viash-hub/biobox", + "issue_tracker" : "https://github.com/viash-hub/biobox/issues" + } + } +}''')) +] + +// resolve dependencies dependencies (if any) + + +// inner workflow +// inner workflow hook +def innerWorkflowFactory(args) { + def rawScript = '''set -e +tempscript=".viash_script.sh" +cat > "$tempscript" << VIASHMAIN +#!/bin/bash + +## VIASH START +# The following code has been auto-generated by Viash. +$( if [ ! -z ${VIASH_PAR_INPUT+x} ]; then echo "${VIASH_PAR_INPUT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_input='&'#" ; else echo "# par_input="; fi ) +$( if [ ! -z ${VIASH_PAR_READ2_IN+x} ]; then echo "${VIASH_PAR_READ2_IN}" | sed "s#'#'\\"'\\"'#g;s#.*#par_read2_in='&'#" ; else echo "# par_read2_in="; fi ) +$( if [ ! -z ${VIASH_PAR_BC_PATTERN+x} ]; then echo "${VIASH_PAR_BC_PATTERN}" | sed "s#'#'\\"'\\"'#g;s#.*#par_bc_pattern='&'#" ; else echo "# par_bc_pattern="; fi ) +$( if [ ! -z ${VIASH_PAR_BC_PATTERN2+x} ]; then echo "${VIASH_PAR_BC_PATTERN2}" | sed "s#'#'\\"'\\"'#g;s#.*#par_bc_pattern2='&'#" ; else echo "# par_bc_pattern2="; fi ) +$( if [ ! -z ${VIASH_PAR_OUTPUT+x} ]; then echo "${VIASH_PAR_OUTPUT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_output='&'#" ; else echo "# par_output="; fi ) +$( if [ ! -z ${VIASH_PAR_READ2_OUT+x} ]; then echo "${VIASH_PAR_READ2_OUT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_read2_out='&'#" ; else echo "# par_read2_out="; fi ) +$( if [ ! -z ${VIASH_PAR_FILTERED_OUT+x} ]; then echo "${VIASH_PAR_FILTERED_OUT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_filtered_out='&'#" ; else echo "# par_filtered_out="; fi ) +$( if [ ! -z ${VIASH_PAR_FILTERED_OUT2+x} ]; then echo "${VIASH_PAR_FILTERED_OUT2}" | sed "s#'#'\\"'\\"'#g;s#.*#par_filtered_out2='&'#" ; else echo "# par_filtered_out2="; fi ) +$( if [ ! -z ${VIASH_PAR_EXTRACT_METHOD+x} ]; then echo "${VIASH_PAR_EXTRACT_METHOD}" | sed "s#'#'\\"'\\"'#g;s#.*#par_extract_method='&'#" ; else echo "# par_extract_method="; fi ) +$( if [ ! -z ${VIASH_PAR_ERROR_CORRECT_CELL+x} ]; then echo "${VIASH_PAR_ERROR_CORRECT_CELL}" | sed "s#'#'\\"'\\"'#g;s#.*#par_error_correct_cell='&'#" ; else echo "# par_error_correct_cell="; fi ) +$( if [ ! -z ${VIASH_PAR_WHITELIST+x} ]; then echo "${VIASH_PAR_WHITELIST}" | sed "s#'#'\\"'\\"'#g;s#.*#par_whitelist='&'#" ; else echo "# par_whitelist="; fi ) +$( if [ ! -z ${VIASH_PAR_BLACKLIST+x} ]; then echo "${VIASH_PAR_BLACKLIST}" | sed "s#'#'\\"'\\"'#g;s#.*#par_blacklist='&'#" ; else echo "# par_blacklist="; fi ) +$( if [ ! -z ${VIASH_PAR_SUBSET_READS+x} ]; then echo "${VIASH_PAR_SUBSET_READS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_subset_reads='&'#" ; else echo "# par_subset_reads="; fi ) +$( if [ ! -z ${VIASH_PAR_QUALITY_FILTER_THRESHOLD+x} ]; then echo "${VIASH_PAR_QUALITY_FILTER_THRESHOLD}" | sed "s#'#'\\"'\\"'#g;s#.*#par_quality_filter_threshold='&'#" ; else echo "# par_quality_filter_threshold="; fi ) +$( if [ ! -z ${VIASH_PAR_QUALITY_FILTER_MASK+x} ]; then echo "${VIASH_PAR_QUALITY_FILTER_MASK}" | sed "s#'#'\\"'\\"'#g;s#.*#par_quality_filter_mask='&'#" ; else echo "# par_quality_filter_mask="; fi ) +$( if [ ! -z ${VIASH_PAR_QUALITY_ENCODING+x} ]; then echo "${VIASH_PAR_QUALITY_ENCODING}" | sed "s#'#'\\"'\\"'#g;s#.*#par_quality_encoding='&'#" ; else echo "# par_quality_encoding="; fi ) +$( if [ ! -z ${VIASH_PAR_RECONCILE_PAIRS+x} ]; then echo "${VIASH_PAR_RECONCILE_PAIRS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_reconcile_pairs='&'#" ; else echo "# par_reconcile_pairs="; fi ) +$( if [ ! -z ${VIASH_PAR_THREE_PRIME+x} ]; then echo "${VIASH_PAR_THREE_PRIME}" | sed "s#'#'\\"'\\"'#g;s#.*#par_three_prime='&'#" ; else echo "# par_three_prime="; fi ) +$( if [ ! -z ${VIASH_PAR_IGNORE_READ_PAIR_SUFFIXES+x} ]; then echo "${VIASH_PAR_IGNORE_READ_PAIR_SUFFIXES}" | sed "s#'#'\\"'\\"'#g;s#.*#par_ignore_read_pair_suffixes='&'#" ; else echo "# par_ignore_read_pair_suffixes="; fi ) +$( if [ ! -z ${VIASH_PAR_UMI_SEPARATOR+x} ]; then echo "${VIASH_PAR_UMI_SEPARATOR}" | sed "s#'#'\\"'\\"'#g;s#.*#par_umi_separator='&'#" ; else echo "# par_umi_separator="; fi ) +$( if [ ! -z ${VIASH_PAR_GROUPING_METHOD+x} ]; then echo "${VIASH_PAR_GROUPING_METHOD}" | sed "s#'#'\\"'\\"'#g;s#.*#par_grouping_method='&'#" ; else echo "# par_grouping_method="; fi ) +$( if [ ! -z ${VIASH_PAR_UMI_DISCARD_READ+x} ]; then echo "${VIASH_PAR_UMI_DISCARD_READ}" | sed "s#'#'\\"'\\"'#g;s#.*#par_umi_discard_read='&'#" ; else echo "# par_umi_discard_read="; fi ) +$( if [ ! -z ${VIASH_PAR_LOG+x} ]; then echo "${VIASH_PAR_LOG}" | sed "s#'#'\\"'\\"'#g;s#.*#par_log='&'#" ; else echo "# par_log="; fi ) +$( if [ ! -z ${VIASH_PAR_VERBOSE+x} ]; then echo "${VIASH_PAR_VERBOSE}" | sed "s#'#'\\"'\\"'#g;s#.*#par_verbose='&'#" ; else echo "# par_verbose="; fi ) +$( if [ ! -z ${VIASH_PAR_ERROR+x} ]; then echo "${VIASH_PAR_ERROR}" | sed "s#'#'\\"'\\"'#g;s#.*#par_error='&'#" ; else echo "# par_error="; fi ) +$( if [ ! -z ${VIASH_PAR_TEMP_DIR+x} ]; then echo "${VIASH_PAR_TEMP_DIR}" | sed "s#'#'\\"'\\"'#g;s#.*#par_temp_dir='&'#" ; else echo "# par_temp_dir="; fi ) +$( if [ ! -z ${VIASH_PAR_COMPRESSLEVEL+x} ]; then echo "${VIASH_PAR_COMPRESSLEVEL}" | sed "s#'#'\\"'\\"'#g;s#.*#par_compresslevel='&'#" ; else echo "# par_compresslevel="; fi ) +$( if [ ! -z ${VIASH_PAR_TIMEIT+x} ]; then echo "${VIASH_PAR_TIMEIT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_timeit='&'#" ; else echo "# par_timeit="; fi ) +$( if [ ! -z ${VIASH_PAR_TIMEIT_NAME+x} ]; then echo "${VIASH_PAR_TIMEIT_NAME}" | sed "s#'#'\\"'\\"'#g;s#.*#par_timeit_name='&'#" ; else echo "# par_timeit_name="; fi ) +$( if [ ! -z ${VIASH_PAR_TIMEIT_HEADER+x} ]; then echo "${VIASH_PAR_TIMEIT_HEADER}" | sed "s#'#'\\"'\\"'#g;s#.*#par_timeit_header='&'#" ; else echo "# par_timeit_header="; fi ) +$( if [ ! -z ${VIASH_PAR_RANDOM_SEED+x} ]; then echo "${VIASH_PAR_RANDOM_SEED}" | sed "s#'#'\\"'\\"'#g;s#.*#par_random_seed='&'#" ; else echo "# par_random_seed="; fi ) +$( if [ ! -z ${VIASH_META_NAME+x} ]; then echo "${VIASH_META_NAME}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_name='&'#" ; else echo "# meta_name="; fi ) +$( if [ ! -z ${VIASH_META_FUNCTIONALITY_NAME+x} ]; then echo "${VIASH_META_FUNCTIONALITY_NAME}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_functionality_name='&'#" ; else echo "# meta_functionality_name="; fi ) +$( if [ ! -z ${VIASH_META_RESOURCES_DIR+x} ]; then echo "${VIASH_META_RESOURCES_DIR}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_resources_dir='&'#" ; else echo "# meta_resources_dir="; fi ) +$( if [ ! -z ${VIASH_META_EXECUTABLE+x} ]; then echo "${VIASH_META_EXECUTABLE}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_executable='&'#" ; else echo "# meta_executable="; fi ) +$( if [ ! -z ${VIASH_META_CONFIG+x} ]; then echo "${VIASH_META_CONFIG}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_config='&'#" ; else echo "# meta_config="; fi ) +$( if [ ! -z ${VIASH_META_TEMP_DIR+x} ]; then echo "${VIASH_META_TEMP_DIR}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_temp_dir='&'#" ; else echo "# meta_temp_dir="; fi ) +$( if [ ! -z ${VIASH_META_CPUS+x} ]; then echo "${VIASH_META_CPUS}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_cpus='&'#" ; else echo "# meta_cpus="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_B+x} ]; then echo "${VIASH_META_MEMORY_B}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_b='&'#" ; else echo "# meta_memory_b="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_KB+x} ]; then echo "${VIASH_META_MEMORY_KB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_kb='&'#" ; else echo "# meta_memory_kb="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_MB+x} ]; then echo "${VIASH_META_MEMORY_MB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_mb='&'#" ; else echo "# meta_memory_mb="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_GB+x} ]; then echo "${VIASH_META_MEMORY_GB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_gb='&'#" ; else echo "# meta_memory_gb="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_TB+x} ]; then echo "${VIASH_META_MEMORY_TB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_tb='&'#" ; else echo "# meta_memory_tb="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_PB+x} ]; then echo "${VIASH_META_MEMORY_PB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_pb='&'#" ; else echo "# meta_memory_pb="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_KIB+x} ]; then echo "${VIASH_META_MEMORY_KIB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_kib='&'#" ; else echo "# meta_memory_kib="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_MIB+x} ]; then echo "${VIASH_META_MEMORY_MIB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_mib='&'#" ; else echo "# meta_memory_mib="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_GIB+x} ]; then echo "${VIASH_META_MEMORY_GIB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_gib='&'#" ; else echo "# meta_memory_gib="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_TIB+x} ]; then echo "${VIASH_META_MEMORY_TIB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_tib='&'#" ; else echo "# meta_memory_tib="; fi ) +$( if [ ! -z ${VIASH_META_MEMORY_PIB+x} ]; then echo "${VIASH_META_MEMORY_PIB}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_memory_pib='&'#" ; else echo "# meta_memory_pib="; fi ) + +## VIASH END + +set -exo pipefail + +unset_if_false=( + par_error_correct_cell + par_reconcile_pairs + par_three_prime + par_ignore_read_pair_suffixes + par_timeit_header + par_log2stderr +) + +for par in \\${unset_if_false[@]}; do + test_val="\\${!par}" + [[ "\\$test_val" == "false" ]] && unset \\$par +done + + +# Check if we have the correct number of input files and patterns for paired-end or single-end reads + +# For paired-end rends, check that we have two read files, two patterns +# Check for paired-end inputs +if [ -n "\\$par_input" ] && [ -n "\\$par_read2_in" ]; then + # Paired-end checks: Ensure both UMI patterns are provided + if [ -z "\\$par_bc_pattern" ] || [ -z "\\$par_bc_pattern2" ]; then + echo "Paired end input requires two UMI patterns." + exit 1 + fi +elif [ -n "\\$par_input" ]; then + # Single-end checks: Ensure no second read or UMI pattern for the second read is provided + if [ -n "\\$par_bc_pattern2" ]; then + echo "Single end input requires only one read file and one UMI pattern." + exit 1 + fi + # Check that discard_read is not set or set to 0 for single-end reads + if [ -n "\\$par_umi_discard_read" ] && [ "\\$par_umi_discard_read" != 0 ]; then + echo "umi_discard_read is only valid when processing paired end reads." + exit 1 + fi +else + # No inputs provided + echo "No input files provided." + exit 1 +fi + + + + +umi_tools extract \\\\ + -I "\\$par_input" \\\\ + \\${par_read2_in:+ --read2-in "\\$par_read2_in"} \\\\ + -S "\\$par_output" \\\\ + \\${par_read2_out:+--read2-out "\\$par_read2_out"} \\\\ + \\${par_extract_method:+--extract-method "\\$par_extract_method"} \\\\ + --bc-pattern "\\$par_bc_pattern" \\\\ + \\${par_bc_pattern2:+ --bc-pattern2 "\\$par_bc_pattern2"} \\\\ + \\${par_umi_separator:+--umi-separator "\\$par_umi_separator"} \\\\ + \\${par_output_stats:+--output-stats "\\$par_output_stats"} \\\\ + \\${par_error_correct_cell:+--error-correct-cell} \\\\ + \\${par_whitelist:+--whitelist "\\$par_whitelist"} \\\\ + \\${par_blacklist:+--blacklist "\\$par_blacklist"} \\\\ + \\${par_subset_reads:+--subset-reads "\\$par_subset_reads"} \\\\ + \\${par_quality_filter_threshold:+--quality-filter-threshold "\\$par_quality_filter_threshold"} \\\\ + \\${par_quality_filter_mask:+--quality-filter-mask "\\$par_quality_filter_mask"} \\\\ + \\${par_quality_encoding:+--quality-encoding "\\$par_quality_encoding"} \\\\ + \\${par_reconcile_pairs:+--reconcile-pairs} \\\\ + \\${par_three_prime:+--3prime} \\\\ + \\${par_filtered_out:+--filtered-out "\\$par_filtered_out"} \\\\ + \\${par_filtered_out2:+--filtered-out2 "\\$par_filtered_out2"} \\\\ + \\${par_ignore_read_pair_suffixes:+--ignore-read-pair-suffixes} \\\\ + \\${par_random_seed:+--random-seed "\\$par_random_seed"} \\\\ + \\${par_temp_dir:+--temp-dir "\\$par_temp_dir"} \\\\ + \\${par_compresslevel:+--compresslevel "\\$par_compresslevel"} \\\\ + \\${par_timeit:+--timeit "\\$par_timeit"} \\\\ + \\${par_timeit_name:+--timeit-name "\\$par_timeit_name"} \\\\ + \\${par_timeit_header:+--timeit-header} \\\\ + \\${par_log:+--log "\\$par_log"} \\\\ + \\${par_log2stderr:+--log2stderr} \\\\ + \\${par_verbose:+--verbose "\\$par_verbose"} \\\\ + \\${par_error:+--error "\\$par_error"} + + +if [ "\\$par_umi_discard_read" == 1 ]; then + # discard read 1 + rm "\\$par_read1_out" +elif [ "\\$par_umi_discard_read" == 2 ]; then + # discard read 2 (-f to bypass file existence check) + rm -f "\\$par_read2_out" +fi +VIASHMAIN +bash "$tempscript" +''' + + return vdsl3WorkflowFactory(args, meta, rawScript) +} + + + +/** + * Generate a workflow for VDSL3 modules. + * + * This function is called by the workflowFactory() function. + * + * Input channel: [id, input_map] + * Output channel: [id, output_map] + * + * Internally, this workflow will convert the input channel + * to a format which the Nextflow module will be able to handle. + */ +def vdsl3WorkflowFactory(Map args, Map meta, String rawScript) { + def key = args["key"] + def processObj = null + + workflow processWf { + take: input_ + main: + + if (processObj == null) { + processObj = _vdsl3ProcessFactory(args, meta, rawScript) + } + + output_ = input_ + | map { tuple -> + def id = tuple[0] + def data_ = tuple[1] + + if (workflow.stubRun) { + // add id if missing + data_ = [id: 'stub'] + data_ + } + + // process input files separately + def inputPaths = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "input" } + .collect { par -> + def val = data_.containsKey(par.plainName) ? data_[par.plainName] : [] + def inputFiles = [] + if (val == null) { + inputFiles = [] + } else if (val instanceof List) { + inputFiles = val + } else if (val instanceof Path) { + inputFiles = [ val ] + } else { + inputFiles = [] + } + if (!workflow.stubRun) { + // throw error when an input file doesn't exist + inputFiles.each{ file -> + assert file.exists() : + "Error in module '${key}' id '${id}' argument '${par.plainName}'.\n" + + " Required input file does not exist.\n" + + " Path: '$file'.\n" + + " Expected input file to exist" + } + } + inputFiles + } + + // remove input files + def argsExclInputFiles = meta.config.allArguments + .findAll { (it.type != "file" || it.direction != "input") && data_.containsKey(it.plainName) } + .collectEntries { par -> + def parName = par.plainName + def val = data_[parName] + if (par.multiple && val instanceof Collection) { + val = val.join(par.multiple_sep) + } + if (par.direction == "output" && par.type == "file") { + val = val + .replaceAll('\\$id', id) + .replaceAll('\\$\\{id\\}', id) + .replaceAll('\\$key', key) + .replaceAll('\\$\\{key\\}', key) + } + [parName, val] + } + + [ id ] + inputPaths + [ argsExclInputFiles, meta.resources_dir ] + } + | processObj + | map { output -> + def outputFiles = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "output" } + .indexed() + .collectEntries{ index, par -> + def out = output[index + 1] + // strip dummy '.exitcode' file from output (see nextflow-io/nextflow#2678) + if (!out instanceof List || out.size() <= 1) { + if (par.multiple) { + out = [] + } else { + assert !par.required : + "Error in module '${key}' id '${output[0]}' argument '${par.plainName}'.\n" + + " Required output file is missing" + out = null + } + } else if (out.size() == 2 && !par.multiple) { + out = out[1] + } else { + out = out.drop(1) + } + [ par.plainName, out ] + } + + // drop null outputs + outputFiles.removeAll{it.value == null} + + [ output[0], outputFiles ] + } + emit: output_ + } + + return processWf +} + +// depends on: session? +def _vdsl3ProcessFactory(Map workflowArgs, Map meta, String rawScript) { + // autodetect process key + def wfKey = workflowArgs["key"] + def procKeyPrefix = "${wfKey}_process" + def scriptMeta = nextflow.script.ScriptMeta.current() + def existing = scriptMeta.getProcessNames().findAll{it.startsWith(procKeyPrefix)} + def numbers = existing.collect{it.replace(procKeyPrefix, "0").toInteger()} + def newNumber = (numbers + [-1]).max() + 1 + + def procKey = newNumber == 0 ? procKeyPrefix : "$procKeyPrefix$newNumber" + + if (newNumber > 0) { + log.warn "Key for module '${wfKey}' is duplicated.\n", + "If you run a component multiple times in the same workflow,\n" + + "it's recommended you set a unique key for every call,\n" + + "for example: ${wfKey}.run(key: \"foo\")." + } + + // subset directives and convert to list of tuples + def drctv = workflowArgs.directives + + // TODO: unit test the two commands below + // convert publish array into tags + def valueToStr = { val -> + // ignore closures + if (val instanceof CharSequence) { + if (!val.matches('^[{].*[}]$')) { + '"' + val + '"' + } else { + val + } + } else if (val instanceof List) { + "[" + val.collect{valueToStr(it)}.join(", ") + "]" + } else if (val instanceof Map) { + "[" + val.collect{k, v -> k + ": " + valueToStr(v)}.join(", ") + "]" + } else { + val.inspect() + } + } + + // multiple entries allowed: label, publishdir + def drctvStrs = drctv.collect { key, value -> + if (key in ["label", "publishDir"]) { + value.collect{ val -> + if (val instanceof Map) { + "\n$key " + val.collect{ k, v -> k + ": " + valueToStr(v) }.join(", ") + } else if (val == null) { + "" + } else { + "\n$key " + valueToStr(val) + } + }.join() + } else if (value instanceof Map) { + "\n$key " + value.collect{ k, v -> k + ": " + valueToStr(v) }.join(", ") + } else { + "\n$key " + valueToStr(value) + } + }.join() + + def inputPaths = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "input" } + .collect { ', path(viash_par_' + it.plainName + ', stageAs: "_viash_par/' + it.plainName + '_?/*")' } + .join() + + def outputPaths = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "output" } + .collect { par -> + // insert dummy into every output (see nextflow-io/nextflow#2678) + if (!par.multiple) { + ', path{[".exitcode", args.' + par.plainName + ']}' + } else { + ', path{[".exitcode"] + args.' + par.plainName + '}' + } + } + .join() + + // TODO: move this functionality somewhere else? + if (workflowArgs.auto.transcript) { + outputPaths = outputPaths + ', path{[".exitcode", ".command*"]}' + } else { + outputPaths = outputPaths + ', path{[".exitcode"]}' + } + + // create dirs for output files (based on BashWrapper.createParentFiles) + def createParentStr = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "output" && it.create_parent } + .collect { par -> + def contents = "args[\"${par.plainName}\"] instanceof List ? args[\"${par.plainName}\"].join('\" \"') : args[\"${par.plainName}\"]" + "\${ args.containsKey(\"${par.plainName}\") ? \"mkdir_parent '\" + escapeText(${contents}) + \"'\" : \"\" }" + } + .join("\n") + + // construct inputFileExports + def inputFileExports = meta.config.allArguments + .findAll { it.type == "file" && it.direction.toLowerCase() == "input" } + .collect { par -> + def contents = "viash_par_${par.plainName} instanceof List ? viash_par_${par.plainName}.join(\"${par.multiple_sep}\") : viash_par_${par.plainName}" + "\n\${viash_par_${par.plainName}.empty ? \"\" : \"export VIASH_PAR_${par.plainName.toUpperCase()}='\" + escapeText(${contents}) + \"'\"}" + } + + // NOTE: if using docker, use /tmp instead of tmpDir! + def tmpDir = java.nio.file.Paths.get( + System.getenv('NXF_TEMP') ?: + System.getenv('VIASH_TEMP') ?: + System.getenv('VIASH_TMPDIR') ?: + System.getenv('VIASH_TEMPDIR') ?: + System.getenv('VIASH_TMP') ?: + System.getenv('TEMP') ?: + System.getenv('TMPDIR') ?: + System.getenv('TEMPDIR') ?: + System.getenv('TMP') ?: + '/tmp' + ).toAbsolutePath() + + // construct stub + def stub = meta.config.allArguments + .findAll { it.type == "file" && it.direction == "output" } + .collect { par -> + "\${ args.containsKey(\"${par.plainName}\") ? \"touch2 \\\"\" + (args[\"${par.plainName}\"] instanceof String ? args[\"${par.plainName}\"].replace(\"_*\", \"_0\") : args[\"${par.plainName}\"].join('\" \"')) + \"\\\"\" : \"\" }" + } + .join("\n") + + // escape script + def escapedScript = rawScript.replace('\\', '\\\\').replace('$', '\\$').replace('"""', '\\"\\"\\"') + + // publishdir assert + def assertStr = (workflowArgs.auto.publish == true) || workflowArgs.auto.transcript ? + """\nassert task.publishDir.size() > 0: "if auto.publish is true, params.publish_dir needs to be defined.\\n Example: --publish_dir './output/'" """ : + "" + + // generate process string + def procStr = + """nextflow.enable.dsl=2 + | + |def escapeText = { s -> s.toString().replaceAll("'", "'\\\"'\\\"'") } + |process $procKey {$drctvStrs + |input: + | tuple val(id)$inputPaths, val(args), path(resourcesDir, stageAs: ".viash_meta_resources") + |output: + | tuple val("\$id")$outputPaths, optional: true + |stub: + |\"\"\" + |touch2() { mkdir -p "\\\$(dirname "\\\$1")" && touch "\\\$1" ; } + |$stub + |\"\"\" + |script:$assertStr + |def parInject = args + | .findAll{key, value -> value != null} + | .collect{key, value -> "export VIASH_PAR_\${key.toUpperCase()}='\${escapeText(value)}'"} + | .join("\\n") + |\"\"\" + |# meta exports + |export VIASH_META_RESOURCES_DIR="\${resourcesDir}" + |export VIASH_META_TEMP_DIR="${['docker', 'podman', 'charliecloud'].any{ it == workflow.containerEngine } ? '/tmp' : tmpDir}" + |export VIASH_META_NAME="${meta.config.name}" + |# export VIASH_META_EXECUTABLE="\\\$VIASH_META_RESOURCES_DIR/\\\$VIASH_META_NAME" + |export VIASH_META_CONFIG="\\\$VIASH_META_RESOURCES_DIR/.config.vsh.yaml" + |\${task.cpus ? "export VIASH_META_CPUS=\$task.cpus" : "" } + |\${task.memory?.bytes != null ? "export VIASH_META_MEMORY_B=\$task.memory.bytes" : "" } + |if [ ! -z \\\${VIASH_META_MEMORY_B+x} ]; then + | export VIASH_META_MEMORY_KB=\\\$(( (\\\$VIASH_META_MEMORY_B+999) / 1000 )) + | export VIASH_META_MEMORY_MB=\\\$(( (\\\$VIASH_META_MEMORY_KB+999) / 1000 )) + | export VIASH_META_MEMORY_GB=\\\$(( (\\\$VIASH_META_MEMORY_MB+999) / 1000 )) + | export VIASH_META_MEMORY_TB=\\\$(( (\\\$VIASH_META_MEMORY_GB+999) / 1000 )) + | export VIASH_META_MEMORY_PB=\\\$(( (\\\$VIASH_META_MEMORY_TB+999) / 1000 )) + | export VIASH_META_MEMORY_KIB=\\\$(( (\\\$VIASH_META_MEMORY_B+1023) / 1024 )) + | export VIASH_META_MEMORY_MIB=\\\$(( (\\\$VIASH_META_MEMORY_KIB+1023) / 1024 )) + | export VIASH_META_MEMORY_GIB=\\\$(( (\\\$VIASH_META_MEMORY_MIB+1023) / 1024 )) + | export VIASH_META_MEMORY_TIB=\\\$(( (\\\$VIASH_META_MEMORY_GIB+1023) / 1024 )) + | export VIASH_META_MEMORY_PIB=\\\$(( (\\\$VIASH_META_MEMORY_TIB+1023) / 1024 )) + |fi + | + |# meta synonyms + |export VIASH_TEMP="\\\$VIASH_META_TEMP_DIR" + |export TEMP_DIR="\\\$VIASH_META_TEMP_DIR" + | + |# create output dirs if need be + |function mkdir_parent { + | for file in "\\\$@"; do + | mkdir -p "\\\$(dirname "\\\$file")" + | done + |} + |$createParentStr + | + |# argument exports${inputFileExports.join()} + |\$parInject + | + |# process script + |${escapedScript} + |\"\"\" + |} + |""".stripMargin() + + // TODO: print on debug + // if (workflowArgs.debug == true) { + // println("######################\n$procStr\n######################") + // } + + // write process to temp file + def tempFile = java.nio.file.Files.createTempFile("viash-process-${procKey}-", ".nf") + addShutdownHook { java.nio.file.Files.deleteIfExists(tempFile) } + tempFile.text = procStr + + // create process from temp file + def binding = new nextflow.script.ScriptBinding([:]) + def session = nextflow.Nextflow.getSession() + def parser = new nextflow.script.ScriptParser(session) + .setModule(true) + .setBinding(binding) + def moduleScript = parser.runScript(tempFile) + .getScript() + + // register module in meta + def module = new nextflow.script.IncludeDef.Module(name: procKey) + scriptMeta.addModule(moduleScript, module.name, module.alias) + + // retrieve and return process from meta + return scriptMeta.getProcess(procKey) +} + +// defaults +meta["defaults"] = [ + // key to be used to trace the process and determine output names + key: null, + + // fixed arguments to be passed to script + args: [:], + + // default directives + directives: readJsonBlob('''{ + "container" : { + "registry" : "images.viash-hub.com", + "image" : "vsh/biobox/umi_tools/umi_tools_extract", + "tag" : "v0.2.0" + }, + "tag" : "$id" +}'''), + + // auto settings + auto: readJsonBlob('''{ + "simplifyInput" : true, + "simplifyOutput" : false, + "transcript" : false, + "publish" : false +}'''), + + // Apply a map over the incoming tuple + // Example: `{ tup -> [ tup[0], [input: tup[1].output] ] + tup.drop(2) }` + map: null, + + // Apply a map over the ID element of a tuple (i.e. the first element) + // Example: `{ id -> id + "_foo" }` + mapId: null, + + // Apply a map over the data element of a tuple (i.e. the second element) + // Example: `{ data -> [ input: data.output ] }` + mapData: null, + + // Apply a map over the passthrough elements of a tuple (i.e. the tuple excl. the first two elements) + // Example: `{ pt -> pt.drop(1) }` + mapPassthrough: null, + + // Filter the channel + // Example: `{ tup -> tup[0] == "foo" }` + filter: null, + + // Choose whether or not to run the component on the tuple if the condition is true. + // Otherwise, the tuple will be passed through. + // Example: `{ tup -> tup[0] != "skip_this" }` + runIf: null, + + // Rename keys in the data field of the tuple (i.e. the second element) + // Will likely be deprecated in favour of `fromState`. + // Example: `[ "new_key": "old_key" ]` + renameKeys: null, + + // Fetch data from the state and pass it to the module without altering the current state. + // + // `fromState` should be `null`, `List[String]`, `Map[String, String]` or a function. + // + // - If it is `null`, the state will be passed to the module as is. + // - If it is a `List[String]`, the data will be the values of the state at the given keys. + // - If it is a `Map[String, String]`, the data will be the values of the state at the given keys, with the keys renamed according to the map. + // - If it is a function, the tuple (`[id, state]`) in the channel will be passed to the function, and the result will be used as the data. + // + // Example: `{ id, state -> [input: state.fastq_file] }` + // Default: `null` + fromState: null, + + // Determine how the state should be updated after the module has been run. + // + // `toState` should be `null`, `List[String]`, `Map[String, String]` or a function. + // + // - If it is `null`, the state will be replaced with the output of the module. + // - If it is a `List[String]`, the state will be updated with the values of the data at the given keys. + // - If it is a `Map[String, String]`, the state will be updated with the values of the data at the given keys, with the keys renamed according to the map. + // - If it is a function, a tuple (`[id, output, state]`) will be passed to the function, and the result will be used as the new state. + // + // Example: `{ id, output, state -> state + [counts: state.output] }` + // Default: `{ id, output, state -> output }` + toState: null, + + // Whether or not to print debug messages + // Default: `false` + debug: false +] + +// initialise default workflow +meta["workflow"] = workflowFactory([key: meta.config.name], meta.defaults, meta) + +// add workflow to environment +nextflow.script.ScriptMeta.current().addDefinition(meta.workflow) + +// anonymous workflow for running this module as a standalone +workflow { + // add id argument if it's not already in the config + // TODO: deep copy + def newConfig = deepClone(meta.config) + def newParams = deepClone(params) + + def argsContainsId = newConfig.allArguments.any{it.plainName == "id"} + if (!argsContainsId) { + def idArg = [ + 'name': '--id', + 'required': false, + 'type': 'string', + 'description': 'A unique id for every entry.', + 'multiple': false + ] + newConfig.arguments.add(0, idArg) + newConfig = processConfig(newConfig) + } + if (!newParams.containsKey("id")) { + newParams.id = "run" + } + + helpMessage(newConfig) + + channelFromParams(newParams, newConfig) + // make sure id is not in the state if id is not in the args + | map {id, state -> + if (!argsContainsId) { + [id, state.findAll{k, v -> k != "id"}] + } else { + [id, state] + } + } + | meta.workflow.run( + auto: [ publish: "state" ] + ) +} + +// END COMPONENT-SPECIFIC CODE diff --git a/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow.config b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow.config new file mode 100644 index 0000000..3b230df --- /dev/null +++ b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow.config @@ -0,0 +1,125 @@ +manifest { + name = 'umi_tools/umi_tools_extract' + mainScript = 'main.nf' + nextflowVersion = '!>=20.12.1-edge' + version = 'v0.2.0' + description = 'Flexible removal of UMI sequences from fastq reads.\nUMIs are removed and appended to the read name. Any other barcode, for example a library barcode,\nis left on the read. Can also filter reads by quality or against a whitelist.\n' +} + +process.container = 'nextflow/bash:latest' + +// detect tempdir +tempDir = java.nio.file.Paths.get( + System.getenv('NXF_TEMP') ?: + System.getenv('VIASH_TEMP') ?: + System.getenv('TEMPDIR') ?: + System.getenv('TMPDIR') ?: + '/tmp' +).toAbsolutePath() + +profiles { + no_publish { + process { + withName: '.*' { + publishDir = [ + enabled: false + ] + } + } + } + mount_temp { + docker.temp = tempDir + podman.temp = tempDir + charliecloud.temp = tempDir + } + docker { + docker.enabled = true + // docker.userEmulation = true + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + } + singularity { + singularity.enabled = true + singularity.autoMounts = true + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + } + podman { + podman.enabled = true + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + } + shifter { + shifter.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + } + charliecloud { + charliecloud.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + } +} + +process{ + withLabel: mem1gb { memory = 1000000000.B } + withLabel: mem2gb { memory = 2000000000.B } + withLabel: mem5gb { memory = 5000000000.B } + withLabel: mem10gb { memory = 10000000000.B } + withLabel: mem20gb { memory = 20000000000.B } + withLabel: mem50gb { memory = 50000000000.B } + withLabel: mem100gb { memory = 100000000000.B } + withLabel: mem200gb { memory = 200000000000.B } + withLabel: mem500gb { memory = 500000000000.B } + withLabel: mem1tb { memory = 1000000000000.B } + withLabel: mem2tb { memory = 2000000000000.B } + withLabel: mem5tb { memory = 5000000000000.B } + withLabel: mem10tb { memory = 10000000000000.B } + withLabel: mem20tb { memory = 20000000000000.B } + withLabel: mem50tb { memory = 50000000000000.B } + withLabel: mem100tb { memory = 100000000000000.B } + withLabel: mem200tb { memory = 200000000000000.B } + withLabel: mem500tb { memory = 500000000000000.B } + withLabel: mem1gib { memory = 1073741824.B } + withLabel: mem2gib { memory = 2147483648.B } + withLabel: mem4gib { memory = 4294967296.B } + withLabel: mem8gib { memory = 8589934592.B } + withLabel: mem16gib { memory = 17179869184.B } + withLabel: mem32gib { memory = 34359738368.B } + withLabel: mem64gib { memory = 68719476736.B } + withLabel: mem128gib { memory = 137438953472.B } + withLabel: mem256gib { memory = 274877906944.B } + withLabel: mem512gib { memory = 549755813888.B } + withLabel: mem1tib { memory = 1099511627776.B } + withLabel: mem2tib { memory = 2199023255552.B } + withLabel: mem4tib { memory = 4398046511104.B } + withLabel: mem8tib { memory = 8796093022208.B } + withLabel: mem16tib { memory = 17592186044416.B } + withLabel: mem32tib { memory = 35184372088832.B } + withLabel: mem64tib { memory = 70368744177664.B } + withLabel: mem128tib { memory = 140737488355328.B } + withLabel: mem256tib { memory = 281474976710656.B } + withLabel: mem512tib { memory = 562949953421312.B } + withLabel: cpu1 { cpus = 1 } + withLabel: cpu2 { cpus = 2 } + withLabel: cpu5 { cpus = 5 } + withLabel: cpu10 { cpus = 10 } + withLabel: cpu20 { cpus = 20 } + withLabel: cpu50 { cpus = 50 } + withLabel: cpu100 { cpus = 100 } + withLabel: cpu200 { cpus = 200 } + withLabel: cpu500 { cpus = 500 } + withLabel: cpu1000 { cpus = 1000 } +} + + diff --git a/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow_schema.json b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow_schema.json new file mode 100644 index 0000000..438881f --- /dev/null +++ b/target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/nextflow_schema.json @@ -0,0 +1,442 @@ +{ +"$schema": "http://json-schema.org/draft-07/schema", +"title": "umi_tools_extract", +"description": "Flexible removal of UMI sequences from fastq reads.\nUMIs are removed and appended to the read name. Any other barcode, for example a library barcode,\nis left on the read. Can also filter reads by quality or against a whitelist.\n", +"type": "object", +"definitions": { + + + + "input" : { + "title": "Input", + "type": "object", + "description": "No description", + "properties": { + + + "input": { + "type": + "string", + "description": "Type: `file`, required, example: `sample.fastq`. File containing the input data", + "help_text": "Type: `file`, required, example: `sample.fastq`. File containing the input data." + + } + + + , + "read2_in": { + "type": + "string", + "description": "Type: `file`, example: `sample_R2.fastq`. File containing the input data for the R2 reads (if paired)", + "help_text": "Type: `file`, example: `sample_R2.fastq`. File containing the input data for the R2 reads (if paired). If provided, a \u003clist of other required arguments\u003e need to be provided." + + } + + + , + "bc_pattern": { + "type": + "string", + "description": "Type: `string`. The UMI barcode pattern to use e", + "help_text": "Type: `string`. The UMI barcode pattern to use e.g. \u0027NNNNNN\u0027 indicates that the first 6 nucleotides \nof the read are from the UMI.\n" + + } + + + , + "bc_pattern2": { + "type": + "string", + "description": "Type: `string`. The UMI barcode pattern to use for read 2", + "help_text": "Type: `string`. The UMI barcode pattern to use for read 2." + + } + + +} +}, + + + "output" : { + "title": "Output", + "type": "object", + "description": "No description", + "properties": { + + + "output": { + "type": + "string", + "description": "Type: `file`, required, default: `$id.$key.output.output`. Output file for read 1", + "help_text": "Type: `file`, required, default: `$id.$key.output.output`. Output file for read 1." + , + "default": "$id.$key.output.output" + } + + + , + "read2_out": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.read2_out.read2_out`. Output file for read 2", + "help_text": "Type: `file`, default: `$id.$key.read2_out.read2_out`. Output file for read 2." + , + "default": "$id.$key.read2_out.read2_out" + } + + + , + "filtered_out": { + "type": + "string", + "description": "Type: `file`. Write out reads not matching regex pattern or cell barcode whitelist to this file", + "help_text": "Type: `file`. Write out reads not matching regex pattern or cell barcode whitelist to this file.\n" + + } + + + , + "filtered_out2": { + "type": + "string", + "description": "Type: `file`. Write out read pairs not matching regex pattern or cell barcode whitelist to this file", + "help_text": "Type: `file`. Write out read pairs not matching regex pattern or cell barcode whitelist to this file.\n" + + } + + +} +}, + + + "extract options" : { + "title": "Extract Options", + "type": "object", + "description": "No description", + "properties": { + + + "extract_method": { + "type": + "string", + "description": "Type: `string`, example: `string`, choices: ``string`, `regex``. UMI pattern to use", + "help_text": "Type: `string`, example: `string`, choices: ``string`, `regex``. UMI pattern to use. Default: `string`.\n", + "enum": ["string", "regex"] + + + } + + + , + "error_correct_cell": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. Error correct cell barcodes to the whitelist", + "help_text": "Type: `boolean_true`, default: `false`. Error correct cell barcodes to the whitelist." + , + "default": "False" + } + + + , + "whitelist": { + "type": + "string", + "description": "Type: `file`. Whitelist of accepted cell barcodes tab-separated format, where column 1 is the whitelisted\ncell barcodes and column 2 is the list (comma-separated) of other cell barcodes which should \nbe corrected to the barcode in column 1", + "help_text": "Type: `file`. Whitelist of accepted cell barcodes tab-separated format, where column 1 is the whitelisted\ncell barcodes and column 2 is the list (comma-separated) of other cell barcodes which should \nbe corrected to the barcode in column 1. If the --error_correct_cell option is not used, this\ncolumn will be ignored.\n" + + } + + + , + "blacklist": { + "type": + "string", + "description": "Type: `file`. BlackWhitelist of cell barcodes to discard", + "help_text": "Type: `file`. BlackWhitelist of cell barcodes to discard." + + } + + + , + "subset_reads": { + "type": + "integer", + "description": "Type: `integer`. Only parse the first N reads", + "help_text": "Type: `integer`. Only parse the first N reads." + + } + + + , + "quality_filter_threshold": { + "type": + "integer", + "description": "Type: `integer`. Remove reads where any UMI base quality score falls below this threshold", + "help_text": "Type: `integer`. Remove reads where any UMI base quality score falls below this threshold." + + } + + + , + "quality_filter_mask": { + "type": + "string", + "description": "Type: `string`. If a UMI base has a quality below this threshold, replace the base with \u0027N\u0027", + "help_text": "Type: `string`. If a UMI base has a quality below this threshold, replace the base with \u0027N\u0027.\n" + + } + + + , + "quality_encoding": { + "type": + "string", + "description": "Type: `string`, choices: ``phred33`, `phred64`, `solexa``. Quality score encoding", + "help_text": "Type: `string`, choices: ``phred33`, `phred64`, `solexa``. Quality score encoding. Choose from:\n * phred33 [33-77]\n * phred64 [64-106]\n * solexa [59-106]\n", + "enum": ["phred33", "phred64", "solexa"] + + + } + + + , + "reconcile_pairs": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. Allow read 2 infile to contain reads not in read 1 infile", + "help_text": "Type: `boolean_true`, default: `false`. Allow read 2 infile to contain reads not in read 1 infile. This enables support for upstream protocols\nwhere read one contains cell barcodes, and the read pairs have been filtered and corrected without regard\nto the read2.\n" + , + "default": "False" + } + + + , + "three_prime": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. By default the barcode is assumed to be on the 5\u0027 end of the read, but use this option to sepecify that it is\non the 3\u0027 end instead", + "help_text": "Type: `boolean_true`, default: `false`. By default the barcode is assumed to be on the 5\u0027 end of the read, but use this option to sepecify that it is\non the 3\u0027 end instead. This option only works with --extract_method=string since 3\u0027 encoding can be specified\nexplicitly with a regex, e.g `.*(?P\u003cumi_1\u003e.{5})$`.\n" + , + "default": "False" + } + + + , + "ignore_read_pair_suffixes": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. Ignore \"/1\" and \"/2\" read name suffixes", + "help_text": "Type: `boolean_true`, default: `false`. Ignore \"/1\" and \"/2\" read name suffixes. Note that this options is required if the suffixes are not whitespace\nseparated from the rest of the read name.\narguments:\n" + , + "default": "False" + } + + + , + "umi_separator": { + "type": + "string", + "description": "Type: `string`, example: `_`. The character that separates the UMI in the read name", + "help_text": "Type: `string`, example: `_`. The character that separates the UMI in the read name. Most likely a colon if you skipped the extraction with\nUMI-tools and used other software. Default: `_`\n" + + } + + + , + "grouping_method": { + "type": + "string", + "description": "Type: `string`, example: `directional`, choices: ``unique`, `percentile`, `cluster`, `adjacency`, `directional``. Method to use to determine read groups by subsuming those with similar UMIs", + "help_text": "Type: `string`, example: `directional`, choices: ``unique`, `percentile`, `cluster`, `adjacency`, `directional``. Method to use to determine read groups by subsuming those with similar UMIs. All methods start by identifying\nthe reads with the same mapping position, but treat similar yet nonidentical UMIs differently. Default: `directional`\n", + "enum": ["unique", "percentile", "cluster", "adjacency", "directional"] + + + } + + + , + "umi_discard_read": { + "type": + "integer", + "description": "Type: `integer`, example: `0`, choices: ``0`, `1`, `2``. After UMI barcode extraction discard either R1 or R2 by setting this parameter to 1 or 2, respectively", + "help_text": "Type: `integer`, example: `0`, choices: ``0`, `1`, `2``. After UMI barcode extraction discard either R1 or R2 by setting this parameter to 1 or 2, respectively. Default: `0`\n", + "enum": [0, 1, 2] + + + } + + +} +}, + + + "common options" : { + "title": "Common Options", + "type": "object", + "description": "No description", + "properties": { + + + "log": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.log.log`. File with logging information", + "help_text": "Type: `file`, default: `$id.$key.log.log`. File with logging information." + , + "default": "$id.$key.log.log" + } + + + , + "log2stderr": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. Send logging information to stderr", + "help_text": "Type: `boolean_true`, default: `false`. Send logging information to stderr." + , + "default": "False" + } + + + , + "verbose": { + "type": + "integer", + "description": "Type: `integer`. Log level", + "help_text": "Type: `integer`. Log level. The higher, the more output." + + } + + + , + "error": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.error.error`. File with error information", + "help_text": "Type: `file`, default: `$id.$key.error.error`. File with error information." + , + "default": "$id.$key.error.error" + } + + + , + "temp_dir": { + "type": + "string", + "description": "Type: `string`. Directory for temporary files", + "help_text": "Type: `string`. Directory for temporary files. If not set, the bash environmental variable TMPDIR is used.\n" + + } + + + , + "compresslevel": { + "type": + "integer", + "description": "Type: `integer`, example: `6`. Level of Gzip compression to use", + "help_text": "Type: `integer`, example: `6`. Level of Gzip compression to use. Default=6 matches GNU gzip rather than python gzip default (which is 9).\nDefault `6`.\n" + + } + + + , + "timeit": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.timeit.timeit`. Store timing information in file", + "help_text": "Type: `file`, default: `$id.$key.timeit.timeit`. Store timing information in file." + , + "default": "$id.$key.timeit.timeit" + } + + + , + "timeit_name": { + "type": + "string", + "description": "Type: `string`, default: `all`. Name in timing file for this class of jobs", + "help_text": "Type: `string`, default: `all`. Name in timing file for this class of jobs." + , + "default": "all" + } + + + , + "timeit_header": { + "type": + "boolean", + "description": "Type: `boolean_true`, default: `false`. Add header for timing information", + "help_text": "Type: `boolean_true`, default: `false`. Add header for timing information." + , + "default": "False" + } + + + , + "random_seed": { + "type": + "integer", + "description": "Type: `integer`. Random seed to initialize number generator with", + "help_text": "Type: `integer`. Random seed to initialize number generator with." + + } + + +} +}, + + + "nextflow input-output arguments" : { + "title": "Nextflow input-output arguments", + "type": "object", + "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.", + "properties": { + + + "publish_dir": { + "type": + "string", + "description": "Type: `string`, required, example: `output/`. Path to an output directory", + "help_text": "Type: `string`, required, example: `output/`. Path to an output directory." + + } + + + , + "param_list": { + "type": + "string", + "description": "Type: `string`, example: `my_params.yaml`. Allows inputting multiple parameter sets to initialise a Nextflow channel", + "help_text": "Type: `string`, example: `my_params.yaml`. Allows inputting multiple parameter sets to initialise a Nextflow channel. A `param_list` can either be a list of maps, a csv file, a json file, a yaml file, or simply a yaml blob.\n\n* A list of maps (as-is) where the keys of each map corresponds to the arguments of the pipeline. Example: in a `nextflow.config` file: `param_list: [ [\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027], [\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027] ]`.\n* A csv file should have column names which correspond to the different arguments of this pipeline. Example: `--param_list data.csv` with columns `id,input`.\n* A json or a yaml file should be a list of maps, each of which has keys corresponding to the arguments of the pipeline. Example: `--param_list data.json` with contents `[ {\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027}, {\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027} ]`.\n* A yaml blob can also be passed directly as a string. Example: `--param_list \"[ {\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027}, {\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027} ]\"`.\n\nWhen passing a csv, json or yaml file, relative path names are relativized to the location of the parameter file. No relativation is performed when `param_list` is a list of maps (as-is) or a yaml blob.", + "hidden": true + + } + + +} +} +}, +"allOf": [ + + { + "$ref": "#/definitions/input" + }, + + { + "$ref": "#/definitions/output" + }, + + { + "$ref": "#/definitions/extract options" + }, + + { + "$ref": "#/definitions/common options" + }, + + { + "$ref": "#/definitions/nextflow input-output arguments" + } +] +} diff --git a/target/executable/bbmap_bbsplit/.config.vsh.yaml b/target/executable/bbmap_bbsplit/.config.vsh.yaml index 515b84e..3b2b4fb 100644 --- a/target/executable/bbmap_bbsplit/.config.vsh.yaml +++ b/target/executable/bbmap_bbsplit/.config.vsh.yaml @@ -238,8 +238,8 @@ build_info: output: "target/executable/bbmap_bbsplit" executable: "target/executable/bbmap_bbsplit/bbmap_bbsplit" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/bbmap_bbsplit/bbmap_bbsplit b/target/executable/bbmap_bbsplit/bbmap_bbsplit index e81a4df..4baaebb 100755 --- a/target/executable/bbmap_bbsplit/bbmap_bbsplit +++ b/target/executable/bbmap_bbsplit/bbmap_bbsplit @@ -506,9 +506,9 @@ tar xzf BBMap_39.01.tar.gz && \ cp -r bbmap/* /usr/local/bin LABEL org.opencontainers.image.description="Companion container for running component bbmap_bbsplit" -LABEL org.opencontainers.image.created="2024-09-14T08:49:03Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:50Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/bedtools_genomecov/.config.vsh.yaml b/target/executable/bedtools_genomecov/.config.vsh.yaml index 87ad222..c4be6f4 100644 --- a/target/executable/bedtools_genomecov/.config.vsh.yaml +++ b/target/executable/bedtools_genomecov/.config.vsh.yaml @@ -178,8 +178,8 @@ build_info: output: "target/executable/bedtools_genomecov" executable: "target/executable/bedtools_genomecov/bedtools_genomecov" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/bedtools_genomecov/bedtools_genomecov b/target/executable/bedtools_genomecov/bedtools_genomecov index 5b7f612..e8bf0e2 100755 --- a/target/executable/bedtools_genomecov/bedtools_genomecov +++ b/target/executable/bedtools_genomecov/bedtools_genomecov @@ -481,9 +481,9 @@ mv bedtools.static /usr/local/bin/bedtools && \ chmod a+x /usr/local/bin/bedtools LABEL org.opencontainers.image.description="Companion container for running component bedtools_genomecov" -LABEL org.opencontainers.image.created="2024-09-14T08:49:03Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:51Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/cat_additional_fasta/.config.vsh.yaml b/target/executable/cat_additional_fasta/.config.vsh.yaml index cbcb0a3..a57bed6 100644 --- a/target/executable/cat_additional_fasta/.config.vsh.yaml +++ b/target/executable/cat_additional_fasta/.config.vsh.yaml @@ -182,8 +182,8 @@ build_info: output: "target/executable/cat_additional_fasta" executable: "target/executable/cat_additional_fasta/cat_additional_fasta" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/cat_additional_fasta/cat_additional_fasta b/target/executable/cat_additional_fasta/cat_additional_fasta index 000b11a..b9fca31 100755 --- a/target/executable/cat_additional_fasta/cat_additional_fasta +++ b/target/executable/cat_additional_fasta/cat_additional_fasta @@ -480,9 +480,9 @@ function ViashDockerfile { FROM python:latest ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component cat_additional_fasta" -LABEL org.opencontainers.image.created="2024-09-14T08:49:10Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:59Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/cat_fastq/.config.vsh.yaml b/target/executable/cat_fastq/.config.vsh.yaml index 70002ff..e7933c0 100644 --- a/target/executable/cat_fastq/.config.vsh.yaml +++ b/target/executable/cat_fastq/.config.vsh.yaml @@ -30,7 +30,7 @@ argument_groups: description: "Concatenated read 1 fastq" info: null default: - - "$id.read_1.merged.fastq" + - "$id_r1.fastq" must_exist: true create_parent: true required: false @@ -42,7 +42,7 @@ argument_groups: description: "Concatenated read 2 fastq" info: null default: - - "$id.read_2.merged.fastq" + - "$id_r2.fastq" must_exist: false create_parent: true required: false @@ -169,8 +169,8 @@ build_info: output: "target/executable/cat_fastq" executable: "target/executable/cat_fastq/cat_fastq" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/cat_fastq/cat_fastq b/target/executable/cat_fastq/cat_fastq index cc2e7ee..fcc9253 100755 --- a/target/executable/cat_fastq/cat_fastq +++ b/target/executable/cat_fastq/cat_fastq @@ -187,12 +187,12 @@ function ViashHelp { echo "Output:" echo " --fastq_1" echo " type: file, output, file must exist" - echo " default: \$id.read_1.merged.fastq" + echo " default: \$id_r1.fastq" echo " Concatenated read 1 fastq" echo "" echo " --fastq_2" echo " type: file, output" - echo " default: \$id.read_2.merged.fastq" + echo " default: \$id_r2.fastq" echo " Concatenated read 2 fastq" } @@ -472,9 +472,9 @@ function ViashDockerfile { FROM ubuntu:22.04 ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component cat_fastq" -LABEL org.opencontainers.image.created="2024-09-14T08:49:11Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:59Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -869,10 +869,10 @@ fi # filling in defaults if [ -z ${VIASH_PAR_FASTQ_1+x} ]; then - VIASH_PAR_FASTQ_1="\$id.read_1.merged.fastq" + VIASH_PAR_FASTQ_1="\$id_r1.fastq" fi if [ -z ${VIASH_PAR_FASTQ_2+x} ]; then - VIASH_PAR_FASTQ_2="\$id.read_2.merged.fastq" + VIASH_PAR_FASTQ_2="\$id_r2.fastq" fi # check whether required files exist diff --git a/target/executable/deseq2_qc/.config.vsh.yaml b/target/executable/deseq2_qc/.config.vsh.yaml index 09f6f79..7080a65 100644 --- a/target/executable/deseq2_qc/.config.vsh.yaml +++ b/target/executable/deseq2_qc/.config.vsh.yaml @@ -237,8 +237,8 @@ build_info: output: "target/executable/deseq2_qc" executable: "target/executable/deseq2_qc/deseq2_qc" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/deseq2_qc/deseq2_qc b/target/executable/deseq2_qc/deseq2_qc index 36f0eb8..8711d25 100755 --- a/target/executable/deseq2_qc/deseq2_qc +++ b/target/executable/deseq2_qc/deseq2_qc @@ -502,9 +502,9 @@ RUN Rscript -e 'if (!requireNamespace("remotes", quietly = TRUE)) install.packag Rscript -e 'remotes::install_url(c("https://cran.r-project.org/src/contrib/Archive/matrixStats/matrixStats_1.1.0.tar.gz"), repos = "https://cran.rstudio.com")' LABEL org.opencontainers.image.description="Companion container for running component deseq2_qc" -LABEL org.opencontainers.image.created="2024-09-14T08:49:21Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:10Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/dupradar/.config.vsh.yaml b/target/executable/dupradar/.config.vsh.yaml index d789cfc..9a3e8b1 100644 --- a/target/executable/dupradar/.config.vsh.yaml +++ b/target/executable/dupradar/.config.vsh.yaml @@ -266,8 +266,8 @@ build_info: output: "target/executable/dupradar" executable: "target/executable/dupradar/dupradar" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/dupradar/dupradar b/target/executable/dupradar/dupradar index d91f558..34feab1 100755 --- a/target/executable/dupradar/dupradar +++ b/target/executable/dupradar/dupradar @@ -520,9 +520,9 @@ RUN Rscript -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.pa Rscript -e 'if (!requireNamespace("dupRadar", quietly = TRUE)) BiocManager::install("dupRadar")' LABEL org.opencontainers.image.description="Companion container for running component dupradar" -LABEL org.opencontainers.image.created="2024-09-14T08:49:12Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:01Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/fastqc/.config.vsh.yaml b/target/executable/fastqc/.config.vsh.yaml index cbacc30..7eca36e 100644 --- a/target/executable/fastqc/.config.vsh.yaml +++ b/target/executable/fastqc/.config.vsh.yaml @@ -198,8 +198,8 @@ build_info: output: "target/executable/fastqc" executable: "target/executable/fastqc/fastqc" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/fastqc/fastqc b/target/executable/fastqc/fastqc index 3105e1e..0fa3e28 100755 --- a/target/executable/fastqc/fastqc +++ b/target/executable/fastqc/fastqc @@ -490,9 +490,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component fastqc" -LABEL org.opencontainers.image.created="2024-09-14T08:49:04Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:52Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -1200,13 +1200,15 @@ fastqc -o \$tmpdir \${input[*]} file1=\$(basename -- "\${input[0]}") read1="\${file1%.fastq*}" -file2=\$(basename -- "\${input[1]}") -read2="\${file2%.fastq*}" - [[ -e "\${tmpdir}/\${read1}_fastqc.html" ]] && cp "\${tmpdir}/\${read1}_fastqc.html" \$par_fastqc_html_1 -[[ -e "\${tmpdir}/\${read2}_fastqc.html" ]] && cp "\${tmpdir}/\${read2}_fastqc.html" \$par_fastqc_html_2 [[ -e "\${tmpdir}/\${read1}_fastqc.zip" ]] && cp "\${tmpdir}/\${read1}_fastqc.zip" \$par_fastqc_zip_1 -[[ -e "\${tmpdir}/\${read2}_fastqc.zip" ]] && cp "\${tmpdir}/\${read2}_fastqc.zip" \$par_fastqc_zip_2 + +if \$par_paired; then + file2=\$(basename -- "\${input[1]}") + read2="\${file2%.fastq*}" + [[ -e "\${tmpdir}/\${read2}_fastqc.html" ]] && cp "\${tmpdir}/\${read2}_fastqc.html" \$par_fastqc_html_2 + [[ -e "\${tmpdir}/\${read2}_fastqc.zip" ]] && cp "\${tmpdir}/\${read2}_fastqc.zip" \$par_fastqc_zip_2 +fi VIASHMAIN bash "\$tempscript" & wait "\$!" diff --git a/target/executable/fq_subsample/.config.vsh.yaml b/target/executable/fq_subsample/.config.vsh.yaml index 5473004..b8d1e13 100644 --- a/target/executable/fq_subsample/.config.vsh.yaml +++ b/target/executable/fq_subsample/.config.vsh.yaml @@ -177,8 +177,8 @@ build_info: output: "target/executable/fq_subsample" executable: "target/executable/fq_subsample/fq_subsample" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/fq_subsample/fq_subsample b/target/executable/fq_subsample/fq_subsample index 79abf75..b812f86 100755 --- a/target/executable/fq_subsample/fq_subsample +++ b/target/executable/fq_subsample/fq_subsample @@ -485,9 +485,9 @@ cargo install --locked --path . && \ mv /usr/local/fq/target/release/fq /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component fq_subsample" -LABEL org.opencontainers.image.created="2024-09-14T08:49:04Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:51Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/getchromsizes/.config.vsh.yaml b/target/executable/getchromsizes/.config.vsh.yaml index a4ec956..23676e4 100644 --- a/target/executable/getchromsizes/.config.vsh.yaml +++ b/target/executable/getchromsizes/.config.vsh.yaml @@ -167,8 +167,8 @@ build_info: output: "target/executable/getchromsizes" executable: "target/executable/getchromsizes/getchromsizes" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/getchromsizes/getchromsizes b/target/executable/getchromsizes/getchromsizes index 1ff792e..f887888 100755 --- a/target/executable/getchromsizes/getchromsizes +++ b/target/executable/getchromsizes/getchromsizes @@ -480,9 +480,9 @@ make && \ make install LABEL org.opencontainers.image.description="Companion container for running component getchromsizes" -LABEL org.opencontainers.image.created="2024-09-14T08:49:04Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:52Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/gtf2bed/.config.vsh.yaml b/target/executable/gtf2bed/.config.vsh.yaml index 3907b59..09c5b1e 100644 --- a/target/executable/gtf2bed/.config.vsh.yaml +++ b/target/executable/gtf2bed/.config.vsh.yaml @@ -145,8 +145,8 @@ build_info: output: "target/executable/gtf2bed" executable: "target/executable/gtf2bed/gtf2bed" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/gtf2bed/gtf2bed b/target/executable/gtf2bed/gtf2bed index a127eae..2c0857b 100755 --- a/target/executable/gtf2bed/gtf2bed +++ b/target/executable/gtf2bed/gtf2bed @@ -466,9 +466,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component gtf2bed" -LABEL org.opencontainers.image.created="2024-09-14T08:49:16Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:06Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/gtf_filter/.config.vsh.yaml b/target/executable/gtf_filter/.config.vsh.yaml index 9bb4e93..68f1590 100644 --- a/target/executable/gtf_filter/.config.vsh.yaml +++ b/target/executable/gtf_filter/.config.vsh.yaml @@ -155,8 +155,8 @@ build_info: output: "target/executable/gtf_filter" executable: "target/executable/gtf_filter/gtf_filter" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/gtf_filter/gtf_filter b/target/executable/gtf_filter/gtf_filter index e671d74..466459d 100755 --- a/target/executable/gtf_filter/gtf_filter +++ b/target/executable/gtf_filter/gtf_filter @@ -470,9 +470,9 @@ function ViashDockerfile { FROM python:latest ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component gtf_filter" -LABEL org.opencontainers.image.created="2024-09-14T08:49:19Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:09Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/gunzip/.config.vsh.yaml b/target/executable/gunzip/.config.vsh.yaml index 2e6d099..6e78e95 100644 --- a/target/executable/gunzip/.config.vsh.yaml +++ b/target/executable/gunzip/.config.vsh.yaml @@ -144,8 +144,8 @@ build_info: output: "target/executable/gunzip" executable: "target/executable/gunzip/gunzip" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/gunzip/gunzip b/target/executable/gunzip/gunzip index d209231..dbd2b3a 100755 --- a/target/executable/gunzip/gunzip +++ b/target/executable/gunzip/gunzip @@ -466,9 +466,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.description="Companion container for running component gunzip" -LABEL org.opencontainers.image.created="2024-09-14T08:49:05Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:52Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/kallisto/kallisto_index/.config.vsh.yaml b/target/executable/kallisto/kallisto_index/.config.vsh.yaml index bf8cc0c..612c0e2 100644 --- a/target/executable/kallisto/kallisto_index/.config.vsh.yaml +++ b/target/executable/kallisto/kallisto_index/.config.vsh.yaml @@ -155,8 +155,8 @@ build_info: output: "target/executable/kallisto/kallisto_index" executable: "target/executable/kallisto/kallisto_index/kallisto_index" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/kallisto/kallisto_index/kallisto_index b/target/executable/kallisto/kallisto_index/kallisto_index index 99303bc..dd1713e 100755 --- a/target/executable/kallisto/kallisto_index/kallisto_index +++ b/target/executable/kallisto/kallisto_index/kallisto_index @@ -471,9 +471,9 @@ tar -xzf kallisto_linux-v0.50.1.tar.gz && \ mv kallisto/kallisto /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component kallisto kallisto_index" -LABEL org.opencontainers.image.created="2024-09-14T08:49:18Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:07Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/kallisto/kallisto_quant/.config.vsh.yaml b/target/executable/kallisto/kallisto_quant/.config.vsh.yaml index 2fe71b1..cb55b44 100644 --- a/target/executable/kallisto/kallisto_quant/.config.vsh.yaml +++ b/target/executable/kallisto/kallisto_quant/.config.vsh.yaml @@ -253,8 +253,8 @@ build_info: output: "target/executable/kallisto/kallisto_quant" executable: "target/executable/kallisto/kallisto_quant/kallisto_quant" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/kallisto/kallisto_quant/kallisto_quant b/target/executable/kallisto/kallisto_quant/kallisto_quant index 530357d..495cd67 100755 --- a/target/executable/kallisto/kallisto_quant/kallisto_quant +++ b/target/executable/kallisto/kallisto_quant/kallisto_quant @@ -515,9 +515,9 @@ tar -xzf kallisto_linux-v0.50.1.tar.gz && \ mv kallisto/kallisto /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component kallisto kallisto_quant" -LABEL org.opencontainers.image.created="2024-09-14T08:49:17Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:07Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -1319,16 +1319,7 @@ if [[ "\$par_extra_args" != *"--fr-stranded"* ]] && [[ "\$par_extra_args" != *"- fi mkdir -p \$par_output -echo "kallisto quant \\ - \${meta_cpus:+--threads \$meta_cpus} \\ - --index \$par_index \\ - \${par_gtf:+--gtf \$par_gtf} \\ - \${par_chromosomes:+--chromosomes \$par_chromosomes} \\ - \$single_end_params \\ - \$strandedness \\ - \$par_extra_args \\ - -o \$par_output \\ - \${input[*]} 2> >(tee -a \${par_output}/kallisto_quant.log >&2)" + kallisto quant \\ \${meta_cpus:+--threads \$meta_cpus} \\ --index \$par_index \\ diff --git a/target/executable/multiqc_custom_biotype/.config.vsh.yaml b/target/executable/multiqc_custom_biotype/.config.vsh.yaml index 3b73edb..9f747c2 100644 --- a/target/executable/multiqc_custom_biotype/.config.vsh.yaml +++ b/target/executable/multiqc_custom_biotype/.config.vsh.yaml @@ -170,8 +170,8 @@ build_info: output: "target/executable/multiqc_custom_biotype" executable: "target/executable/multiqc_custom_biotype/multiqc_custom_biotype" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/multiqc_custom_biotype/multiqc_custom_biotype b/target/executable/multiqc_custom_biotype/multiqc_custom_biotype index c31ede0..6e1a081 100755 --- a/target/executable/multiqc_custom_biotype/multiqc_custom_biotype +++ b/target/executable/multiqc_custom_biotype/multiqc_custom_biotype @@ -481,9 +481,9 @@ RUN apt-get update && \ RUN pip install --upgrade pip LABEL org.opencontainers.image.description="Companion container for running component multiqc_custom_biotype" -LABEL org.opencontainers.image.created="2024-09-14T08:49:12Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:01Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/picard_markduplicates/.config.vsh.yaml b/target/executable/picard_markduplicates/.config.vsh.yaml index c2dc4e3..0f191d8 100644 --- a/target/executable/picard_markduplicates/.config.vsh.yaml +++ b/target/executable/picard_markduplicates/.config.vsh.yaml @@ -207,8 +207,8 @@ build_info: output: "target/executable/picard_markduplicates" executable: "target/executable/picard_markduplicates/picard_markduplicates" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/picard_markduplicates/picard_markduplicates b/target/executable/picard_markduplicates/picard_markduplicates index b5c9d5d..af2b158 100755 --- a/target/executable/picard_markduplicates/picard_markduplicates +++ b/target/executable/picard_markduplicates/picard_markduplicates @@ -494,9 +494,9 @@ wget --no-check-certificate https://github.com/broadinstitute/picard/releases/do mv picard.jar /usr/local/bin LABEL org.opencontainers.image.description="Companion container for running component picard_markduplicates" -LABEL org.opencontainers.image.created="2024-09-14T08:49:20Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:09Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/prepare_multiqc_input/.config.vsh.yaml b/target/executable/prepare_multiqc_input/.config.vsh.yaml index 429f7a9..f22363a 100644 --- a/target/executable/prepare_multiqc_input/.config.vsh.yaml +++ b/target/executable/prepare_multiqc_input/.config.vsh.yaml @@ -409,8 +409,8 @@ build_info: output: "target/executable/prepare_multiqc_input" executable: "target/executable/prepare_multiqc_input/prepare_multiqc_input" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/prepare_multiqc_input/prepare_multiqc_input b/target/executable/prepare_multiqc_input/prepare_multiqc_input index f6a079c..a05e600 100755 --- a/target/executable/prepare_multiqc_input/prepare_multiqc_input +++ b/target/executable/prepare_multiqc_input/prepare_multiqc_input @@ -557,9 +557,9 @@ function ViashDockerfile { FROM ubuntu:22.04 ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component prepare_multiqc_input" -LABEL org.opencontainers.image.created="2024-09-14T08:49:16Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:05Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -2287,6 +2287,8 @@ IFS="," read -ra rsem_multiqc <<< \$par_rsem_multiqc && for file in "\${rsem_mul IFS="," read -ra salmon_multiqc <<< \$par_salmon_multiqc && for file in "\${salmon_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done +IFS="," read -ra pseudo_multiqc <<< \$par_pseudo_multiqc && for file in "\${pseudo_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done + IFS="," read -ra samtools_stats <<< \$par_samtools_stats && for file in "\${samtools_stats[@]}"; do [ -e "\$file" ] && cp -r "\$file" \$par_output/; done IFS="," read -ra samtools_flagstat <<< \$par_samtools_flagstat && for file in "\${samtools_flagstat[@]}"; do [ -e "\$file" ] && cp -r "\$file" \$par_output/; done @@ -2295,12 +2297,9 @@ IFS="," read -ra samtools_idxstats <<< \$par_samtools_idxstats && for file in "\ IFS="," read -ra markduplicates_multiqc <<< \$par_markduplicates_multiqc && for file in "\${markduplicates_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done -IFS="," read -ra pseudo_multiqc <<< \$par_pseudo_multiqc && for file in "\${pseudo_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done - - IFS="," read -ra featurecounts_multiqc <<< \$par_featurecounts_multiqc && for file in "\${featurecounts_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done -IFS="," read -ra featurecounts_rrna_multiqc <<< \$par_featurecounts_rrna_multiqc&& for file in "\${featurecounts_rrna_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done +IFS="," read -ra featurecounts_rrna_multiqc <<< \$par_featurecounts_rrna_multiqc && for file in "\${featurecounts_rrna_multiqc[@]}"; do [ -e "\$file" ] && cp -r "\$file" "\$par_output/"; done [ -e "\$par_aligner_pca_multiqc" ] && cp -r "\$par_aligner_pca_multiqc" "\$par_output/" diff --git a/target/executable/preprocess_transcripts_fasta/.config.vsh.yaml b/target/executable/preprocess_transcripts_fasta/.config.vsh.yaml index 5cd97f3..0b84374 100644 --- a/target/executable/preprocess_transcripts_fasta/.config.vsh.yaml +++ b/target/executable/preprocess_transcripts_fasta/.config.vsh.yaml @@ -138,8 +138,8 @@ build_info: output: "target/executable/preprocess_transcripts_fasta" executable: "target/executable/preprocess_transcripts_fasta/preprocess_transcripts_fasta" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/preprocess_transcripts_fasta/preprocess_transcripts_fasta b/target/executable/preprocess_transcripts_fasta/preprocess_transcripts_fasta index 8d0c5ab..946dd70 100755 --- a/target/executable/preprocess_transcripts_fasta/preprocess_transcripts_fasta +++ b/target/executable/preprocess_transcripts_fasta/preprocess_transcripts_fasta @@ -462,9 +462,9 @@ function ViashDockerfile { FROM ubuntu:22.04 ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component preprocess_transcripts_fasta" -LABEL org.opencontainers.image.created="2024-09-14T08:49:15Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:04Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/preseq_lcextrap/.config.vsh.yaml b/target/executable/preseq_lcextrap/.config.vsh.yaml index a6faf22..f445fb1 100644 --- a/target/executable/preseq_lcextrap/.config.vsh.yaml +++ b/target/executable/preseq_lcextrap/.config.vsh.yaml @@ -191,8 +191,8 @@ build_info: output: "target/executable/preseq_lcextrap" executable: "target/executable/preseq_lcextrap/preseq_lcextrap" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/preseq_lcextrap/preseq_lcextrap b/target/executable/preseq_lcextrap/preseq_lcextrap index c9b4ce8..2995f4d 100755 --- a/target/executable/preseq_lcextrap/preseq_lcextrap +++ b/target/executable/preseq_lcextrap/preseq_lcextrap @@ -495,9 +495,9 @@ mkdir build && cd build && \ make && make install && make HAVE_HTSLIB=1 all LABEL org.opencontainers.image.description="Companion container for running component preseq_lcextrap" -LABEL org.opencontainers.image.created="2024-09-14T08:49:05Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:53Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/qualimap/.config.vsh.yaml b/target/executable/qualimap/.config.vsh.yaml index 29c7c13..11eab9e 100644 --- a/target/executable/qualimap/.config.vsh.yaml +++ b/target/executable/qualimap/.config.vsh.yaml @@ -271,8 +271,8 @@ build_info: output: "target/executable/qualimap" executable: "target/executable/qualimap/qualimap" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/qualimap/qualimap b/target/executable/qualimap/qualimap index 9dc5e16..aabe489 100755 --- a/target/executable/qualimap/qualimap +++ b/target/executable/qualimap/qualimap @@ -537,9 +537,9 @@ RUN Rscript -e 'if (!requireNamespace("remotes", quietly = TRUE)) install.packag Rscript -e 'remotes::install_cran(c("optparse"), repos = "https://cran.rstudio.com")' LABEL org.opencontainers.image.description="Companion container for running component qualimap" -LABEL org.opencontainers.image.created="2024-09-14T08:49:03Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:51Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rsem/rsem_calculate_expression/.config.vsh.yaml b/target/executable/rsem/rsem_calculate_expression/.config.vsh.yaml index d183602..1bde55d 100644 --- a/target/executable/rsem/rsem_calculate_expression/.config.vsh.yaml +++ b/target/executable/rsem/rsem_calculate_expression/.config.vsh.yaml @@ -60,15 +60,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--versions" - info: null - must_exist: false - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - name: "Output" arguments: - type: "file" @@ -308,8 +299,8 @@ build_info: output: "target/executable/rsem/rsem_calculate_expression" executable: "target/executable/rsem/rsem_calculate_expression/rsem_calculate_expression" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rsem/rsem_calculate_expression/rsem_calculate_expression b/target/executable/rsem/rsem_calculate_expression/rsem_calculate_expression index 4798d5b..303f288 100755 --- a/target/executable/rsem/rsem_calculate_expression/rsem_calculate_expression +++ b/target/executable/rsem/rsem_calculate_expression/rsem_calculate_expression @@ -201,9 +201,6 @@ function ViashHelp { echo " type: string" echo " Extra rsem-calculate-expression arguments in addition to the defaults." echo "" - echo " --versions" - echo " type: file" - echo "" echo "Output:" echo " --counts_gene" echo " type: file, output, file must exist" @@ -545,9 +542,9 @@ echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc && \ /bin/bash -c "source /etc/profile && source ~/.bashrc && echo $PATH && which STAR" LABEL org.opencontainers.image.description="Companion container for running component rsem rsem_calculate_expression" -LABEL org.opencontainers.image.created="2024-09-14T08:49:17Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:06Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -759,17 +756,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_EXTRA_ARGS=$(ViashRemoveFlags "$1") shift 1 ;; - --versions) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --versions. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --versions=*) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions=*\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS=$(ViashRemoveFlags "$1") - shift 1 - ;; --counts_gene) [ -n "$VIASH_PAR_COUNTS_GENE" ] && ViashError Bad arguments for option \'--counts_gene\': \'$VIASH_PAR_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_COUNTS_GENE="$2" @@ -1205,10 +1191,6 @@ if [ ! -z "$VIASH_PAR_INDEX" ]; then VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_INDEX")" ) VIASH_PAR_INDEX=$(ViashDockerAutodetectMount "$VIASH_PAR_INDEX") fi -if [ ! -z "$VIASH_PAR_VERSIONS" ]; then - VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_VERSIONS")" ) - VIASH_PAR_VERSIONS=$(ViashDockerAutodetectMount "$VIASH_PAR_VERSIONS") -fi if [ ! -z "$VIASH_PAR_COUNTS_GENE" ]; then VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_COUNTS_GENE")" ) VIASH_PAR_COUNTS_GENE=$(ViashDockerAutodetectMount "$VIASH_PAR_COUNTS_GENE") @@ -1319,7 +1301,6 @@ $( if [ ! -z ${VIASH_PAR_PAIRED+x} ]; then echo "${VIASH_PAR_PAIRED}" | sed "s#' $( if [ ! -z ${VIASH_PAR_INPUT+x} ]; then echo "${VIASH_PAR_INPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_input='&'#" ; else echo "# par_input="; fi ) $( if [ ! -z ${VIASH_PAR_INDEX+x} ]; then echo "${VIASH_PAR_INDEX}" | sed "s#'#'\"'\"'#g;s#.*#par_index='&'#" ; else echo "# par_index="; fi ) $( if [ ! -z ${VIASH_PAR_EXTRA_ARGS+x} ]; then echo "${VIASH_PAR_EXTRA_ARGS}" | sed "s#'#'\"'\"'#g;s#.*#par_extra_args='&'#" ; else echo "# par_extra_args="; fi ) -$( if [ ! -z ${VIASH_PAR_VERSIONS+x} ]; then echo "${VIASH_PAR_VERSIONS}" | sed "s#'#'\"'\"'#g;s#.*#par_versions='&'#" ; else echo "# par_versions="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_GENE+x} ]; then echo "${VIASH_PAR_COUNTS_GENE}" | sed "s#'#'\"'\"'#g;s#.*#par_counts_gene='&'#" ; else echo "# par_counts_gene="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_TRANSCRIPTS+x} ]; then echo "${VIASH_PAR_COUNTS_TRANSCRIPTS}" | sed "s#'#'\"'\"'#g;s#.*#par_counts_transcripts='&'#" ; else echo "# par_counts_transcripts="; fi ) $( if [ ! -z ${VIASH_PAR_STAT+x} ]; then echo "${VIASH_PAR_STAT}" | sed "s#'#'\"'\"'#g;s#.*#par_stat='&'#" ; else echo "# par_stat="; fi ) @@ -1368,10 +1349,10 @@ fi IFS="," read -ra input <<< \$par_input -INDEX=\`find -L \$meta_resources_dir/ -name "*.grp" | sed 's/\\.grp\$//'\` +INDEX=\`find -L \$par_index/ -name "*.grp" | sed 's/\\.grp\$//'\` rsem-calculate-expression \\ - \${meta_cpus:+--num-theads \$meta_cpus} \\ + \${meta_cpus:+--num-threads \$meta_cpus} \\ \$strandedness \\ \${par_paired:+--paired-end} \\ \$par_extra_args \\ @@ -1379,6 +1360,13 @@ rsem-calculate-expression \\ \$INDEX \\ \$par_id +[[ -e "\${par_id}.genes.results" ]] && mv "\${par_id}.genes.results" \$par_counts_gene +[[ -e "\${par_id}id.isoforms.results" ]] && mv "\${par_id}id.isoforms.results" \$par_counts_transcripts +[[ -e "\${par_id}.stat" ]] && mv -r "\${par_id}.stat" \$par_stat +# [[ -e "\${par_id}.log" ]] && mv "\${par_id}.log" \$par_logs +[[ -e "\${par_id}.STAR.genome.bam" ]] && mv "\${par_id}.STAR.genome.bam" \$par_bam_star +[[ -e "\${par_id}.genome.bam" ]] && mv "\${par_id}.genome.bam" \$par_bam_genome +[[ -e "\${par_id}.transcript.bam" ]] && mv "\${par_id}.transcript.bam" \$par_bam_transcript VIASHMAIN bash "\$tempscript" & wait "\$!" @@ -1405,9 +1393,6 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then if [ ! -z "$VIASH_PAR_INDEX" ]; then VIASH_PAR_INDEX=$(ViashDockerStripAutomount "$VIASH_PAR_INDEX") fi - if [ ! -z "$VIASH_PAR_VERSIONS" ]; then - VIASH_PAR_VERSIONS=$(ViashDockerStripAutomount "$VIASH_PAR_VERSIONS") - fi if [ ! -z "$VIASH_PAR_COUNTS_GENE" ]; then VIASH_PAR_COUNTS_GENE=$(ViashDockerStripAutomount "$VIASH_PAR_COUNTS_GENE") fi diff --git a/target/executable/rsem/rsem_merge_counts/.config.vsh.yaml b/target/executable/rsem/rsem_merge_counts/.config.vsh.yaml index 75d73b7..a48fbc6 100644 --- a/target/executable/rsem/rsem_merge_counts/.config.vsh.yaml +++ b/target/executable/rsem/rsem_merge_counts/.config.vsh.yaml @@ -24,15 +24,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--versions" - info: null - must_exist: false - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - name: "Output" arguments: - type: "file" @@ -83,17 +74,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--updated_versions" - info: null - default: - - "versions.yml" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" resources: - type: "bash_script" path: "script.sh" @@ -202,8 +182,8 @@ build_info: output: "target/executable/rsem/rsem_merge_counts" executable: "target/executable/rsem/rsem_merge_counts/rsem_merge_counts" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rsem/rsem_merge_counts/rsem_merge_counts b/target/executable/rsem/rsem_merge_counts/rsem_merge_counts index 6a012b4..681b32b 100755 --- a/target/executable/rsem/rsem_merge_counts/rsem_merge_counts +++ b/target/executable/rsem/rsem_merge_counts/rsem_merge_counts @@ -185,9 +185,6 @@ function ViashHelp { echo " type: file, file must exist" echo " Expression counts on transcript level (isoforms)" echo "" - echo " --versions" - echo " type: file" - echo "" echo "Output:" echo " --merged_gene_counts" echo " type: file, output, file must exist" @@ -208,10 +205,6 @@ function ViashHelp { echo " type: file, output, file must exist" echo " default: rsem.merged.transcript_tpm.tsv" echo " File containing transcript TPM across all samples." - echo "" - echo " --updated_versions" - echo " type: file, output, file must exist" - echo " default: versions.yml" } # initialise variables @@ -490,9 +483,9 @@ function ViashDockerfile { FROM ubuntu:22.04 ENTRYPOINT [] LABEL org.opencontainers.image.description="Companion container for running component rsem rsem_merge_counts" -LABEL org.opencontainers.image.created="2024-09-14T08:49:17Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:06Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER @@ -654,17 +647,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_COUNTS_TRANSCRIPTS=$(ViashRemoveFlags "$1") shift 1 ;; - --versions) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --versions. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --versions=*) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions=*\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS=$(ViashRemoveFlags "$1") - shift 1 - ;; --merged_gene_counts) [ -n "$VIASH_PAR_MERGED_GENE_COUNTS" ] && ViashError Bad arguments for option \'--merged_gene_counts\': \'$VIASH_PAR_MERGED_GENE_COUNTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_MERGED_GENE_COUNTS="$2" @@ -709,17 +691,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_MERGED_TRANSCRIPT_TPM=$(ViashRemoveFlags "$1") shift 1 ;; - --updated_versions) - [ -n "$VIASH_PAR_UPDATED_VERSIONS" ] && ViashError Bad arguments for option \'--updated_versions\': \'$VIASH_PAR_UPDATED_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_UPDATED_VERSIONS="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --updated_versions. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --updated_versions=*) - [ -n "$VIASH_PAR_UPDATED_VERSIONS" ] && ViashError Bad arguments for option \'--updated_versions=*\': \'$VIASH_PAR_UPDATED_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_UPDATED_VERSIONS=$(ViashRemoveFlags "$1") - shift 1 - ;; ---engine) VIASH_ENGINE_ID="$2" shift 2 @@ -930,9 +901,6 @@ fi if [ -z ${VIASH_PAR_MERGED_TRANSCRIPT_TPM+x} ]; then VIASH_PAR_MERGED_TRANSCRIPT_TPM="rsem.merged.transcript_tpm.tsv" fi -if [ -z ${VIASH_PAR_UPDATED_VERSIONS+x} ]; then - VIASH_PAR_UPDATED_VERSIONS="versions.yml" -fi # check whether required files exist if [ ! -z "$VIASH_PAR_COUNTS_GENE" ] && [ ! -e "$VIASH_PAR_COUNTS_GENE" ]; then @@ -1031,9 +999,6 @@ fi if [ ! -z "$VIASH_PAR_MERGED_TRANSCRIPT_TPM" ] && [ ! -d "$(dirname "$VIASH_PAR_MERGED_TRANSCRIPT_TPM")" ]; then mkdir -p "$(dirname "$VIASH_PAR_MERGED_TRANSCRIPT_TPM")" fi -if [ ! -z "$VIASH_PAR_UPDATED_VERSIONS" ] && [ ! -d "$(dirname "$VIASH_PAR_UPDATED_VERSIONS")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_UPDATED_VERSIONS")" -fi if [ "$VIASH_ENGINE_ID" == "native" ] ; then if [ "$VIASH_MODE" == "run" ]; then @@ -1055,10 +1020,6 @@ if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPTS" ]; then VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_COUNTS_TRANSCRIPTS")" ) VIASH_PAR_COUNTS_TRANSCRIPTS=$(ViashDockerAutodetectMount "$VIASH_PAR_COUNTS_TRANSCRIPTS") fi -if [ ! -z "$VIASH_PAR_VERSIONS" ]; then - VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_VERSIONS")" ) - VIASH_PAR_VERSIONS=$(ViashDockerAutodetectMount "$VIASH_PAR_VERSIONS") -fi if [ ! -z "$VIASH_PAR_MERGED_GENE_COUNTS" ]; then VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_MERGED_GENE_COUNTS")" ) VIASH_PAR_MERGED_GENE_COUNTS=$(ViashDockerAutodetectMount "$VIASH_PAR_MERGED_GENE_COUNTS") @@ -1079,11 +1040,6 @@ if [ ! -z "$VIASH_PAR_MERGED_TRANSCRIPT_TPM" ]; then VIASH_PAR_MERGED_TRANSCRIPT_TPM=$(ViashDockerAutodetectMount "$VIASH_PAR_MERGED_TRANSCRIPT_TPM") VIASH_CHOWN_VARS+=( "$VIASH_PAR_MERGED_TRANSCRIPT_TPM" ) fi -if [ ! -z "$VIASH_PAR_UPDATED_VERSIONS" ]; then - VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_PAR_UPDATED_VERSIONS")" ) - VIASH_PAR_UPDATED_VERSIONS=$(ViashDockerAutodetectMount "$VIASH_PAR_UPDATED_VERSIONS") - VIASH_CHOWN_VARS+=( "$VIASH_PAR_UPDATED_VERSIONS" ) -fi if [ ! -z "$VIASH_META_RESOURCES_DIR" ]; then VIASH_DIRECTORY_MOUNTS+=( "$(ViashDockerAutodetectMountArg "$VIASH_META_RESOURCES_DIR")" ) VIASH_META_RESOURCES_DIR=$(ViashDockerAutodetectMount "$VIASH_META_RESOURCES_DIR") @@ -1155,12 +1111,10 @@ cat > "\$tempscript" << 'VIASHMAIN' # The following code has been auto-generated by Viash. $( if [ ! -z ${VIASH_PAR_COUNTS_GENE+x} ]; then echo "${VIASH_PAR_COUNTS_GENE}" | sed "s#'#'\"'\"'#g;s#.*#par_counts_gene='&'#" ; else echo "# par_counts_gene="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_TRANSCRIPTS+x} ]; then echo "${VIASH_PAR_COUNTS_TRANSCRIPTS}" | sed "s#'#'\"'\"'#g;s#.*#par_counts_transcripts='&'#" ; else echo "# par_counts_transcripts="; fi ) -$( if [ ! -z ${VIASH_PAR_VERSIONS+x} ]; then echo "${VIASH_PAR_VERSIONS}" | sed "s#'#'\"'\"'#g;s#.*#par_versions='&'#" ; else echo "# par_versions="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_GENE_COUNTS+x} ]; then echo "${VIASH_PAR_MERGED_GENE_COUNTS}" | sed "s#'#'\"'\"'#g;s#.*#par_merged_gene_counts='&'#" ; else echo "# par_merged_gene_counts="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_GENE_TPM+x} ]; then echo "${VIASH_PAR_MERGED_GENE_TPM}" | sed "s#'#'\"'\"'#g;s#.*#par_merged_gene_tpm='&'#" ; else echo "# par_merged_gene_tpm="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_TRANSCRIPT_COUNTS+x} ]; then echo "${VIASH_PAR_MERGED_TRANSCRIPT_COUNTS}" | sed "s#'#'\"'\"'#g;s#.*#par_merged_transcript_counts='&'#" ; else echo "# par_merged_transcript_counts="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_TRANSCRIPT_TPM+x} ]; then echo "${VIASH_PAR_MERGED_TRANSCRIPT_TPM}" | sed "s#'#'\"'\"'#g;s#.*#par_merged_transcript_tpm='&'#" ; else echo "# par_merged_transcript_tpm="; fi ) -$( if [ ! -z ${VIASH_PAR_UPDATED_VERSIONS+x} ]; then echo "${VIASH_PAR_UPDATED_VERSIONS}" | sed "s#'#'\"'\"'#g;s#.*#par_updated_versions='&'#" ; else echo "# par_updated_versions="; fi ) $( if [ ! -z ${VIASH_META_NAME+x} ]; then echo "${VIASH_META_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_name='&'#" ; else echo "# meta_name="; fi ) $( if [ ! -z ${VIASH_META_FUNCTIONALITY_NAME+x} ]; then echo "${VIASH_META_FUNCTIONALITY_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_functionality_name='&'#" ; else echo "# meta_functionality_name="; fi ) $( if [ ! -z ${VIASH_META_RESOURCES_DIR+x} ]; then echo "${VIASH_META_RESOURCES_DIR}" | sed "s#'#'\"'\"'#g;s#.*#meta_resources_dir='&'#" ; else echo "# meta_resources_dir="; fi ) @@ -1225,9 +1179,6 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPTS" ]; then VIASH_PAR_COUNTS_TRANSCRIPTS=$(ViashDockerStripAutomount "$VIASH_PAR_COUNTS_TRANSCRIPTS") fi - if [ ! -z "$VIASH_PAR_VERSIONS" ]; then - VIASH_PAR_VERSIONS=$(ViashDockerStripAutomount "$VIASH_PAR_VERSIONS") - fi if [ ! -z "$VIASH_PAR_MERGED_GENE_COUNTS" ]; then VIASH_PAR_MERGED_GENE_COUNTS=$(ViashDockerStripAutomount "$VIASH_PAR_MERGED_GENE_COUNTS") fi @@ -1240,9 +1191,6 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then if [ ! -z "$VIASH_PAR_MERGED_TRANSCRIPT_TPM" ]; then VIASH_PAR_MERGED_TRANSCRIPT_TPM=$(ViashDockerStripAutomount "$VIASH_PAR_MERGED_TRANSCRIPT_TPM") fi - if [ ! -z "$VIASH_PAR_UPDATED_VERSIONS" ]; then - VIASH_PAR_UPDATED_VERSIONS=$(ViashDockerStripAutomount "$VIASH_PAR_UPDATED_VERSIONS") - fi if [ ! -z "$VIASH_META_RESOURCES_DIR" ]; then VIASH_META_RESOURCES_DIR=$(ViashDockerStripAutomount "$VIASH_META_RESOURCES_DIR") fi @@ -1275,10 +1223,6 @@ if [ ! -z "$VIASH_PAR_MERGED_TRANSCRIPT_TPM" ] && [ ! -e "$VIASH_PAR_MERGED_TRAN ViashError "Output file '$VIASH_PAR_MERGED_TRANSCRIPT_TPM' does not exist." exit 1 fi -if [ ! -z "$VIASH_PAR_UPDATED_VERSIONS" ] && [ ! -e "$VIASH_PAR_UPDATED_VERSIONS" ]; then - ViashError "Output file '$VIASH_PAR_UPDATED_VERSIONS' does not exist." - exit 1 -fi exit 0 diff --git a/target/executable/rseqc/rseqc_bamstat/.config.vsh.yaml b/target/executable/rseqc/rseqc_bamstat/.config.vsh.yaml index 6ecb4df..e890a9c 100644 --- a/target/executable/rseqc/rseqc_bamstat/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_bamstat/.config.vsh.yaml @@ -163,8 +163,8 @@ build_info: output: "target/executable/rseqc/rseqc_bamstat" executable: "target/executable/rseqc/rseqc_bamstat/rseqc_bamstat" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_bamstat/rseqc_bamstat b/target/executable/rseqc/rseqc_bamstat/rseqc_bamstat index f87170d..b625355 100755 --- a/target/executable/rseqc/rseqc_bamstat/rseqc_bamstat +++ b/target/executable/rseqc/rseqc_bamstat/rseqc_bamstat @@ -477,9 +477,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_bamstat" -LABEL org.opencontainers.image.created="2024-09-14T08:49:15Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:04Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_inferexperiment/.config.vsh.yaml b/target/executable/rseqc/rseqc_inferexperiment/.config.vsh.yaml index 888e05d..f15c898 100644 --- a/target/executable/rseqc/rseqc_inferexperiment/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_inferexperiment/.config.vsh.yaml @@ -186,8 +186,8 @@ build_info: output: "target/executable/rseqc/rseqc_inferexperiment" executable: "target/executable/rseqc/rseqc_inferexperiment/rseqc_inferexperiment" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_inferexperiment/rseqc_inferexperiment b/target/executable/rseqc/rseqc_inferexperiment/rseqc_inferexperiment index b93a8a5..7e29155 100755 --- a/target/executable/rseqc/rseqc_inferexperiment/rseqc_inferexperiment +++ b/target/executable/rseqc/rseqc_inferexperiment/rseqc_inferexperiment @@ -487,9 +487,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_inferexperiment" -LABEL org.opencontainers.image.created="2024-09-14T08:49:13Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:01Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_innerdistance/.config.vsh.yaml b/target/executable/rseqc/rseqc_innerdistance/.config.vsh.yaml index 755f02d..6ae2048 100644 --- a/target/executable/rseqc/rseqc_innerdistance/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_innerdistance/.config.vsh.yaml @@ -272,8 +272,8 @@ build_info: output: "target/executable/rseqc/rseqc_innerdistance" executable: "target/executable/rseqc/rseqc_innerdistance/rseqc_innerdistance" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_innerdistance/rseqc_innerdistance b/target/executable/rseqc/rseqc_innerdistance/rseqc_innerdistance index e9e5731..c5c2860 100755 --- a/target/executable/rseqc/rseqc_innerdistance/rseqc_innerdistance +++ b/target/executable/rseqc/rseqc_innerdistance/rseqc_innerdistance @@ -529,9 +529,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_innerdistance" -LABEL org.opencontainers.image.created="2024-09-14T08:49:14Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:03Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_junctionannotation/.config.vsh.yaml b/target/executable/rseqc/rseqc_junctionannotation/.config.vsh.yaml index 69ef173..ba46fe4 100644 --- a/target/executable/rseqc/rseqc_junctionannotation/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_junctionannotation/.config.vsh.yaml @@ -260,8 +260,8 @@ build_info: output: "target/executable/rseqc/rseqc_junctionannotation" executable: "target/executable/rseqc/rseqc_junctionannotation/rseqc_junctionannotation" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_junctionannotation/rseqc_junctionannotation b/target/executable/rseqc/rseqc_junctionannotation/rseqc_junctionannotation index 8b490c5..ef3702e 100755 --- a/target/executable/rseqc/rseqc_junctionannotation/rseqc_junctionannotation +++ b/target/executable/rseqc/rseqc_junctionannotation/rseqc_junctionannotation @@ -519,9 +519,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_junctionannotation" -LABEL org.opencontainers.image.created="2024-09-14T08:49:14Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:03Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_junctionsaturation/.config.vsh.yaml b/target/executable/rseqc/rseqc_junctionsaturation/.config.vsh.yaml index 8e19d43..0efcad0 100644 --- a/target/executable/rseqc/rseqc_junctionsaturation/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_junctionsaturation/.config.vsh.yaml @@ -249,8 +249,8 @@ build_info: output: "target/executable/rseqc/rseqc_junctionsaturation" executable: "target/executable/rseqc/rseqc_junctionsaturation/rseqc_junctionsaturation" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_junctionsaturation/rseqc_junctionsaturation b/target/executable/rseqc/rseqc_junctionsaturation/rseqc_junctionsaturation index b950c1c..f627e12 100755 --- a/target/executable/rseqc/rseqc_junctionsaturation/rseqc_junctionsaturation +++ b/target/executable/rseqc/rseqc_junctionsaturation/rseqc_junctionsaturation @@ -522,9 +522,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_junctionsaturation" -LABEL org.opencontainers.image.created="2024-09-14T08:49:14Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:03Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_readdistribution/.config.vsh.yaml b/target/executable/rseqc/rseqc_readdistribution/.config.vsh.yaml index fd9f000..8595052 100644 --- a/target/executable/rseqc/rseqc_readdistribution/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_readdistribution/.config.vsh.yaml @@ -162,8 +162,8 @@ build_info: output: "target/executable/rseqc/rseqc_readdistribution" executable: "target/executable/rseqc/rseqc_readdistribution/rseqc_readdistribution" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_readdistribution/rseqc_readdistribution b/target/executable/rseqc/rseqc_readdistribution/rseqc_readdistribution index 2b5bed4..6b21425 100755 --- a/target/executable/rseqc/rseqc_readdistribution/rseqc_readdistribution +++ b/target/executable/rseqc/rseqc_readdistribution/rseqc_readdistribution @@ -474,9 +474,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_readdistribution" -LABEL org.opencontainers.image.created="2024-09-14T08:49:15Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:04Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_readduplication/.config.vsh.yaml b/target/executable/rseqc/rseqc_readduplication/.config.vsh.yaml index 8972cf4..ef92d93 100644 --- a/target/executable/rseqc/rseqc_readduplication/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_readduplication/.config.vsh.yaml @@ -211,8 +211,8 @@ build_info: output: "target/executable/rseqc/rseqc_readduplication" executable: "target/executable/rseqc/rseqc_readduplication/rseqc_readduplication" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_readduplication/rseqc_readduplication b/target/executable/rseqc/rseqc_readduplication/rseqc_readduplication index 5291077..e33f314 100755 --- a/target/executable/rseqc/rseqc_readduplication/rseqc_readduplication +++ b/target/executable/rseqc/rseqc_readduplication/rseqc_readduplication @@ -499,9 +499,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "RSeQC" LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_readduplication" -LABEL org.opencontainers.image.created="2024-09-14T08:49:13Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:02Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/rseqc/rseqc_tin/.config.vsh.yaml b/target/executable/rseqc/rseqc_tin/.config.vsh.yaml index 548d63d..bfa909d 100644 --- a/target/executable/rseqc/rseqc_tin/.config.vsh.yaml +++ b/target/executable/rseqc/rseqc_tin/.config.vsh.yaml @@ -214,8 +214,8 @@ build_info: output: "target/executable/rseqc/rseqc_tin" executable: "target/executable/rseqc/rseqc_tin/rseqc_tin" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/rseqc/rseqc_tin/rseqc_tin b/target/executable/rseqc/rseqc_tin/rseqc_tin index c34cf90..8d19d29 100755 --- a/target/executable/rseqc/rseqc_tin/rseqc_tin +++ b/target/executable/rseqc/rseqc_tin/rseqc_tin @@ -501,9 +501,9 @@ RUN apt-get update && \ RUN pip3 install RSeQC LABEL org.opencontainers.image.description="Companion container for running component rseqc rseqc_tin" -LABEL org.opencontainers.image.created="2024-09-14T08:49:13Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:02Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/sortmerna/.config.vsh.yaml b/target/executable/sortmerna/.config.vsh.yaml index f06e481..6da1def 100644 --- a/target/executable/sortmerna/.config.vsh.yaml +++ b/target/executable/sortmerna/.config.vsh.yaml @@ -198,8 +198,8 @@ build_info: output: "target/executable/sortmerna" executable: "target/executable/sortmerna/sortmerna" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/sortmerna/sortmerna b/target/executable/sortmerna/sortmerna index bcaff1a..6f26b8d 100755 --- a/target/executable/sortmerna/sortmerna +++ b/target/executable/sortmerna/sortmerna @@ -492,9 +492,9 @@ wget --no-check-certificate https://github.com/sortmerna/sortmerna/releases/down bash sortmerna-4.3.6-Linux.sh --skip-license LABEL org.opencontainers.image.description="Companion container for running component sortmerna" -LABEL org.opencontainers.image.created="2024-09-14T08:49:19Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:09Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/stringtie/.config.vsh.yaml b/target/executable/stringtie/.config.vsh.yaml index 0df051f..09cba5d 100644 --- a/target/executable/stringtie/.config.vsh.yaml +++ b/target/executable/stringtie/.config.vsh.yaml @@ -216,8 +216,8 @@ build_info: output: "target/executable/stringtie" executable: "target/executable/stringtie/stringtie" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/stringtie/stringtie b/target/executable/stringtie/stringtie index ddde1c9..bd3b787 100755 --- a/target/executable/stringtie/stringtie +++ b/target/executable/stringtie/stringtie @@ -496,9 +496,9 @@ tar -xzf stringtie-2.2.1.Linux_x86_64.tar.gz && \ cp stringtie-2.2.1.Linux_x86_64/stringtie /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component stringtie" -LABEL org.opencontainers.image.created="2024-09-14T08:49:16Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:06Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/summarizedexperiment/.config.vsh.yaml b/target/executable/summarizedexperiment/.config.vsh.yaml index 74c6f66..df2c8e6 100644 --- a/target/executable/summarizedexperiment/.config.vsh.yaml +++ b/target/executable/summarizedexperiment/.config.vsh.yaml @@ -199,8 +199,8 @@ build_info: output: "target/executable/summarizedexperiment" executable: "target/executable/summarizedexperiment/summarizedexperiment" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/summarizedexperiment/summarizedexperiment b/target/executable/summarizedexperiment/summarizedexperiment index 7d799e1..ef7910f 100755 --- a/target/executable/summarizedexperiment/summarizedexperiment +++ b/target/executable/summarizedexperiment/summarizedexperiment @@ -487,9 +487,9 @@ RUN Rscript -e 'if (!requireNamespace("BiocManager", quietly = TRUE)) install.pa Rscript -e 'if (!requireNamespace("tximeta", quietly = TRUE)) BiocManager::install("tximeta")' LABEL org.opencontainers.image.description="Companion container for running component summarizedexperiment" -LABEL org.opencontainers.image.created="2024-09-14T08:49:20Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:10Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/trimgalore/.config.vsh.yaml b/target/executable/trimgalore/.config.vsh.yaml index 4b17d4b..4caa820 100644 --- a/target/executable/trimgalore/.config.vsh.yaml +++ b/target/executable/trimgalore/.config.vsh.yaml @@ -540,7 +540,7 @@ argument_groups: \ files (paired-end) are specified, but not for longer lists." info: null example: - - "read_1.fastq" + - "read_1.fastq.gz" must_exist: true create_parent: true required: false @@ -553,7 +553,7 @@ argument_groups: \ files (paired-end) are specified, but not for longer lists." info: null example: - - "read_2.fastq" + - "read_2.fastq.gz" must_exist: true create_parent: true required: false @@ -788,8 +788,8 @@ build_info: output: "target/executable/trimgalore" executable: "target/executable/trimgalore/trimgalore" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/trimgalore/trimgalore b/target/executable/trimgalore/trimgalore index 41e5f43..34b9926 100755 --- a/target/executable/trimgalore/trimgalore +++ b/target/executable/trimgalore/trimgalore @@ -517,13 +517,13 @@ function ViashHelp { echo "" echo " --trimmed_r1" echo " type: file, output, file must exist" - echo " example: read_1.fastq" + echo " example: read_1.fastq.gz" echo " Output file for read 1. Only works when 1 file (single-end) or 2 files" echo " (paired-end) are specified, but not for longer lists." echo "" echo " --trimmed_r2" echo " type: file, output, file must exist" - echo " example: read_2.fastq" + echo " example: read_2.fastq.gz" echo " Output file for read 2. Only works when 1 file (single-end) or 2 files" echo " (paired-end) are specified, but not for longer lists." echo "" @@ -858,9 +858,9 @@ ENTRYPOINT [] RUN echo "TrimGalore: `trim_galore --version | sed -n 's/.*version\s\+\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p'`" > /var/software_versions.txt LABEL org.opencontainers.image.description="Companion container for running component trimgalore" -LABEL org.opencontainers.image.created="2024-09-14T08:49:19Z" +LABEL org.opencontainers.image.created="2024-10-01T10:02:08Z" LABEL org.opencontainers.image.source="https://github.com/FelixKrueger/TrimGalore" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/tx2gene/.config.vsh.yaml b/target/executable/tx2gene/.config.vsh.yaml index 8e34886..37617a0 100644 --- a/target/executable/tx2gene/.config.vsh.yaml +++ b/target/executable/tx2gene/.config.vsh.yaml @@ -192,8 +192,8 @@ build_info: output: "target/executable/tx2gene" executable: "target/executable/tx2gene/tx2gene" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/tx2gene/tx2gene b/target/executable/tx2gene/tx2gene index dde1103..d8191bc 100755 --- a/target/executable/tx2gene/tx2gene +++ b/target/executable/tx2gene/tx2gene @@ -487,9 +487,9 @@ RUN apt-get update && \ RUN pip install --upgrade pip LABEL org.opencontainers.image.description="Companion container for running component tx2gene" -LABEL org.opencontainers.image.created="2024-09-14T08:49:16Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:05Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/tximport/.config.vsh.yaml b/target/executable/tximport/.config.vsh.yaml index 1a23642..6989b7b 100644 --- a/target/executable/tximport/.config.vsh.yaml +++ b/target/executable/tximport/.config.vsh.yaml @@ -247,8 +247,8 @@ build_info: output: "target/executable/tximport" executable: "target/executable/tximport/tximport" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/tximport/tximport b/target/executable/tximport/tximport index b3f6613..d320a10 100755 --- a/target/executable/tximport/tximport +++ b/target/executable/tximport/tximport @@ -508,9 +508,9 @@ RUN Rscript -e 'if (!requireNamespace("remotes", quietly = TRUE)) install.packag Rscript -e 'remotes::install_cran(c("jsonlite"), repos = "https://cran.rstudio.com")' LABEL org.opencontainers.image.description="Companion container for running component tximport" -LABEL org.opencontainers.image.created="2024-09-14T08:49:10Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:01:59Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/ucsc/bedclip/.config.vsh.yaml b/target/executable/ucsc/bedclip/.config.vsh.yaml index 34feccb..73b11d9 100644 --- a/target/executable/ucsc/bedclip/.config.vsh.yaml +++ b/target/executable/ucsc/bedclip/.config.vsh.yaml @@ -164,8 +164,8 @@ build_info: output: "target/executable/ucsc/bedclip" executable: "target/executable/ucsc/bedclip/bedclip" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/ucsc/bedclip/bedclip b/target/executable/ucsc/bedclip/bedclip index b2da9a4..d948639 100755 --- a/target/executable/ucsc/bedclip/bedclip +++ b/target/executable/ucsc/bedclip/bedclip @@ -473,9 +473,9 @@ RUN apt-get update && \ RUN rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedClip /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component ucsc bedclip" -LABEL org.opencontainers.image.created="2024-09-14T08:49:11Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:00Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/ucsc/bedgraphtobigwig/.config.vsh.yaml b/target/executable/ucsc/bedgraphtobigwig/.config.vsh.yaml index 4510afc..9a62b13 100644 --- a/target/executable/ucsc/bedgraphtobigwig/.config.vsh.yaml +++ b/target/executable/ucsc/bedgraphtobigwig/.config.vsh.yaml @@ -164,8 +164,8 @@ build_info: output: "target/executable/ucsc/bedgraphtobigwig" executable: "target/executable/ucsc/bedgraphtobigwig/bedgraphtobigwig" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/ucsc/bedgraphtobigwig/bedgraphtobigwig b/target/executable/ucsc/bedgraphtobigwig/bedgraphtobigwig index 42f2cb9..0fa813c 100755 --- a/target/executable/ucsc/bedgraphtobigwig/bedgraphtobigwig +++ b/target/executable/ucsc/bedgraphtobigwig/bedgraphtobigwig @@ -473,9 +473,9 @@ RUN apt-get update && \ RUN rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedGraphToBigWig /usr/local/bin/ LABEL org.opencontainers.image.description="Companion container for running component ucsc bedgraphtobigwig" -LABEL org.opencontainers.image.created="2024-09-14T08:49:11Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:00Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/umitools/umitools_dedup/.config.vsh.yaml b/target/executable/umitools/umitools_dedup/.config.vsh.yaml index 97df5f0..193e1b2 100644 --- a/target/executable/umitools/umitools_dedup/.config.vsh.yaml +++ b/target/executable/umitools/umitools_dedup/.config.vsh.yaml @@ -195,8 +195,8 @@ build_info: output: "target/executable/umitools/umitools_dedup" executable: "target/executable/umitools/umitools_dedup/umitools_dedup" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/umitools/umitools_dedup/umitools_dedup b/target/executable/umitools/umitools_dedup/umitools_dedup index 304c02b..20b20d4 100755 --- a/target/executable/umitools/umitools_dedup/umitools_dedup +++ b/target/executable/umitools/umitools_dedup/umitools_dedup @@ -489,9 +489,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "umi_tools" LABEL org.opencontainers.image.description="Companion container for running component umitools umitools_dedup" -LABEL org.opencontainers.image.created="2024-09-14T08:49:18Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:07Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/umitools/umitools_extract/.config.vsh.yaml b/target/executable/umitools/umitools_extract/.config.vsh.yaml index aff16b3..973bc93 100644 --- a/target/executable/umitools/umitools_extract/.config.vsh.yaml +++ b/target/executable/umitools/umitools_extract/.config.vsh.yaml @@ -253,8 +253,8 @@ build_info: output: "target/executable/umitools/umitools_extract" executable: "target/executable/umitools/umitools_extract/umitools_extract" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/umitools/umitools_extract/umitools_extract b/target/executable/umitools/umitools_extract/umitools_extract index 261d576..8192e96 100755 --- a/target/executable/umitools/umitools_extract/umitools_extract +++ b/target/executable/umitools/umitools_extract/umitools_extract @@ -521,9 +521,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "umi_tools" LABEL org.opencontainers.image.description="Companion container for running component umitools umitools_extract" -LABEL org.opencontainers.image.created="2024-09-14T08:49:18Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:08Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/umitools_prepareforquant/.config.vsh.yaml b/target/executable/umitools_prepareforquant/.config.vsh.yaml index 08bf466..ecfb6cf 100644 --- a/target/executable/umitools_prepareforquant/.config.vsh.yaml +++ b/target/executable/umitools_prepareforquant/.config.vsh.yaml @@ -156,8 +156,8 @@ build_info: output: "target/executable/umitools_prepareforquant" executable: "target/executable/umitools_prepareforquant/umitools_prepareforquant" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/executable/umitools_prepareforquant/umitools_prepareforquant b/target/executable/umitools_prepareforquant/umitools_prepareforquant index be96010..d028ca0 100755 --- a/target/executable/umitools_prepareforquant/umitools_prepareforquant +++ b/target/executable/umitools_prepareforquant/umitools_prepareforquant @@ -473,9 +473,9 @@ RUN pip install --upgrade pip && \ pip install --upgrade --no-cache-dir "umi_tools" "pysam" LABEL org.opencontainers.image.description="Companion container for running component umitools_prepareforquant" -LABEL org.opencontainers.image.created="2024-09-14T08:49:20Z" -LABEL org.opencontainers.image.source="https://x-access-token/ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" -LABEL org.opencontainers.image.revision="64aad6a006818388eceffe024b1701b3eae06bee" +LABEL org.opencontainers.image.created="2024-10-01T10:02:10Z" +LABEL org.opencontainers.image.source="https://x-access-token/ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" +LABEL org.opencontainers.image.revision="1d87dc7c24f540c96460e69322f06d4be0bb7be8" LABEL org.opencontainers.image.version="main" VIASHDOCKER diff --git a/target/executable/workflows/genome_alignment_and_quant/.config.vsh.yaml b/target/executable/workflows/genome_alignment_and_quant/.config.vsh.yaml index e2d23bc..cd04238 100644 --- a/target/executable/workflows/genome_alignment_and_quant/.config.vsh.yaml +++ b/target/executable/workflows/genome_alignment_and_quant/.config.vsh.yaml @@ -193,7 +193,7 @@ argument_groups: multiple: false multiple_sep: ";" - type: "string" - name: "extra_rsem_calculate_expression_args" + name: "--extra_rsem_calculate_expression_args" description: "Extra arguments to pass to rsem-calculate-expression command in\ \ addition to defaults defined by the pipeline." info: null @@ -242,7 +242,7 @@ argument_groups: name: "--star_multiqc" info: null default: - - "$id.star_align.log" + - "$id_star.log" must_exist: true create_parent: true required: false @@ -381,6 +381,87 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--salmon_multiqc" + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + default: + - "$id.genes.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--counts_transcripts" + description: "Expression counts on transcript level" + info: null + default: + - "$id.isoforms.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_multiqc" + description: "RSEM statistics" + info: null + default: + - "$id.stat" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_star_rsem" + description: "BAM file generated by STAR (optional)" + info: null + default: + - "$id.STAR.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_genome_rsem" + description: "Genome BAM file (optional)" + info: null + default: + - "$id.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_transcript_rsem" + description: "Transcript BAM file (optional)" + info: null + default: + - "$id.transcript.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" resources: - type: "nextflow_script" path: "main.nf" @@ -522,8 +603,8 @@ build_info: output: "target/executable/workflows/genome_alignment_and_quant" executable: "target/executable/workflows/genome_alignment_and_quant/genome_alignment_and_quant" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/star/star_align_reads" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/samtools/samtools_sort" diff --git a/target/executable/workflows/genome_alignment_and_quant/genome_alignment_and_quant b/target/executable/workflows/genome_alignment_and_quant/genome_alignment_and_quant index 2a744f0..c3ffd4b 100755 --- a/target/executable/workflows/genome_alignment_and_quant/genome_alignment_and_quant +++ b/target/executable/workflows/genome_alignment_and_quant/genome_alignment_and_quant @@ -268,7 +268,7 @@ function ViashHelp { echo " By default, the pipeline uses the gene_name field to obtain additional" echo " gene identifiers from the input GTF file when running Salmon." echo "" - echo " extra_rsem_calculate_expression_args" + echo " --extra_rsem_calculate_expression_args" echo " type: string" echo " Extra arguments to pass to rsem-calculate-expression command in addition" echo " to defaults defined by the pipeline." @@ -291,7 +291,7 @@ function ViashHelp { echo "Output:" echo " --star_multiqc" echo " type: file, output, file must exist" - echo " default: \$id.star_align.log" + echo " default: \$id_star.log" echo "" echo " --genome_bam_sorted" echo " type: file, output, file must exist" @@ -340,6 +340,39 @@ function ViashHelp { echo " --quant_results_file" echo " type: file, output, file must exist" echo " default: \$id.quant.sf" + echo "" + echo " --salmon_multiqc" + echo " type: file, output, file must exist" + echo "" + echo " --rsem_counts_gene" + echo " type: file, output, file must exist" + echo " default: \$id.genes.results" + echo " Expression counts on gene level" + echo "" + echo " --counts_transcripts" + echo " type: file, output, file must exist" + echo " default: \$id.isoforms.results" + echo " Expression counts on transcript level" + echo "" + echo " --rsem_multiqc" + echo " type: file, output, file must exist" + echo " default: \$id.stat" + echo " RSEM statistics" + echo "" + echo " --bam_star_rsem" + echo " type: file, output, file must exist" + echo " default: \$id.STAR.genome.bam" + echo " BAM file generated by STAR (optional)" + echo "" + echo " --bam_genome_rsem" + echo " type: file, output, file must exist" + echo " default: \$id.genome.bam" + echo " Genome BAM file (optional)" + echo "" + echo " --bam_transcript_rsem" + echo " type: file, output, file must exist" + echo " default: \$id.transcript.bam" + echo " Transcript BAM file (optional)" } # initialise variables @@ -575,6 +608,17 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_GTF_EXTRA_ATTRIBUTES=$(ViashRemoveFlags "$1") shift 1 ;; + --extra_rsem_calculate_expression_args) + [ -n "$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS" ] && ViashError Bad arguments for option \'--extra_rsem_calculate_expression_args\': \'$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --extra_rsem_calculate_expression_args. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --extra_rsem_calculate_expression_args=*) + [ -n "$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS" ] && ViashError Bad arguments for option \'--extra_rsem_calculate_expression_args=*\': \'$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS=$(ViashRemoveFlags "$1") + shift 1 + ;; --aligner) [ -n "$VIASH_PAR_ALIGNER" ] && ViashError Bad arguments for option \'--aligner\': \'$VIASH_PAR_ALIGNER\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_ALIGNER="$2" @@ -751,6 +795,83 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_QUANT_RESULTS_FILE=$(ViashRemoveFlags "$1") shift 1 ;; + --salmon_multiqc) + [ -n "$VIASH_PAR_SALMON_MULTIQC" ] && ViashError Bad arguments for option \'--salmon_multiqc\': \'$VIASH_PAR_SALMON_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_SALMON_MULTIQC="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --salmon_multiqc. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --salmon_multiqc=*) + [ -n "$VIASH_PAR_SALMON_MULTIQC" ] && ViashError Bad arguments for option \'--salmon_multiqc=*\': \'$VIASH_PAR_SALMON_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_SALMON_MULTIQC=$(ViashRemoveFlags "$1") + shift 1 + ;; + --rsem_counts_gene) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_counts_gene. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_counts_gene=*) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene=*\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE=$(ViashRemoveFlags "$1") + shift 1 + ;; + --counts_transcripts) + [ -n "$VIASH_PAR_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--counts_transcripts\': \'$VIASH_PAR_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_COUNTS_TRANSCRIPTS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --counts_transcripts. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --counts_transcripts=*) + [ -n "$VIASH_PAR_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--counts_transcripts=*\': \'$VIASH_PAR_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_COUNTS_TRANSCRIPTS=$(ViashRemoveFlags "$1") + shift 1 + ;; + --rsem_multiqc) + [ -n "$VIASH_PAR_RSEM_MULTIQC" ] && ViashError Bad arguments for option \'--rsem_multiqc\': \'$VIASH_PAR_RSEM_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_MULTIQC="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_multiqc. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_multiqc=*) + [ -n "$VIASH_PAR_RSEM_MULTIQC" ] && ViashError Bad arguments for option \'--rsem_multiqc=*\': \'$VIASH_PAR_RSEM_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_MULTIQC=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_star_rsem) + [ -n "$VIASH_PAR_BAM_STAR_RSEM" ] && ViashError Bad arguments for option \'--bam_star_rsem\': \'$VIASH_PAR_BAM_STAR_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_STAR_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_star_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_star_rsem=*) + [ -n "$VIASH_PAR_BAM_STAR_RSEM" ] && ViashError Bad arguments for option \'--bam_star_rsem=*\': \'$VIASH_PAR_BAM_STAR_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_STAR_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_genome_rsem) + [ -n "$VIASH_PAR_BAM_GENOME_RSEM" ] && ViashError Bad arguments for option \'--bam_genome_rsem\': \'$VIASH_PAR_BAM_GENOME_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_GENOME_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_genome_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_genome_rsem=*) + [ -n "$VIASH_PAR_BAM_GENOME_RSEM" ] && ViashError Bad arguments for option \'--bam_genome_rsem=*\': \'$VIASH_PAR_BAM_GENOME_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_GENOME_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_transcript_rsem) + [ -n "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && ViashError Bad arguments for option \'--bam_transcript_rsem\': \'$VIASH_PAR_BAM_TRANSCRIPT_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_TRANSCRIPT_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_transcript_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_transcript_rsem=*) + [ -n "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && ViashError Bad arguments for option \'--bam_transcript_rsem=*\': \'$VIASH_PAR_BAM_TRANSCRIPT_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_TRANSCRIPT_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; ---engine) VIASH_ENGINE_ID="$2" shift 2 @@ -853,12 +974,6 @@ if [ -z "$VIASH_META_CPUS" ]; then fi -# storing leftover values in positionals -if [[ $# -gt 0 ]]; then - VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS="$1" - shift 1 -fi - # check whether required parameters exist if [ -z ${VIASH_PAR_ID+x} ]; then ViashError '--id' is a required argument. Use "--help" to get more information on the parameters. @@ -922,7 +1037,7 @@ if [ -z ${VIASH_PAR_ALIGNER+x} ]; then VIASH_PAR_ALIGNER="star_salmon" fi if [ -z ${VIASH_PAR_STAR_MULTIQC+x} ]; then - VIASH_PAR_STAR_MULTIQC="\$id.star_align.log" + VIASH_PAR_STAR_MULTIQC="\$id_star.log" fi if [ -z ${VIASH_PAR_GENOME_BAM_SORTED+x} ]; then VIASH_PAR_GENOME_BAM_SORTED="\$id.genome.bam" @@ -960,6 +1075,24 @@ fi if [ -z ${VIASH_PAR_QUANT_RESULTS_FILE+x} ]; then VIASH_PAR_QUANT_RESULTS_FILE="\$id.quant.sf" fi +if [ -z ${VIASH_PAR_RSEM_COUNTS_GENE+x} ]; then + VIASH_PAR_RSEM_COUNTS_GENE="\$id.genes.results" +fi +if [ -z ${VIASH_PAR_COUNTS_TRANSCRIPTS+x} ]; then + VIASH_PAR_COUNTS_TRANSCRIPTS="\$id.isoforms.results" +fi +if [ -z ${VIASH_PAR_RSEM_MULTIQC+x} ]; then + VIASH_PAR_RSEM_MULTIQC="\$id.stat" +fi +if [ -z ${VIASH_PAR_BAM_STAR_RSEM+x} ]; then + VIASH_PAR_BAM_STAR_RSEM="\$id.STAR.genome.bam" +fi +if [ -z ${VIASH_PAR_BAM_GENOME_RSEM+x} ]; then + VIASH_PAR_BAM_GENOME_RSEM="\$id.genome.bam" +fi +if [ -z ${VIASH_PAR_BAM_TRANSCRIPT_RSEM+x} ]; then + VIASH_PAR_BAM_TRANSCRIPT_RSEM="\$id.transcript.bam" +fi # check whether required files exist if [ ! -z "$VIASH_PAR_FASTQ_1" ] && [ ! -e "$VIASH_PAR_FASTQ_1" ]; then @@ -1154,6 +1287,27 @@ fi if [ ! -z "$VIASH_PAR_QUANT_RESULTS_FILE" ] && [ ! -d "$(dirname "$VIASH_PAR_QUANT_RESULTS_FILE")" ]; then mkdir -p "$(dirname "$VIASH_PAR_QUANT_RESULTS_FILE")" fi +if [ ! -z "$VIASH_PAR_SALMON_MULTIQC" ] && [ ! -d "$(dirname "$VIASH_PAR_SALMON_MULTIQC")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_SALMON_MULTIQC")" +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_GENE" ] && [ ! -d "$(dirname "$VIASH_PAR_RSEM_COUNTS_GENE")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_RSEM_COUNTS_GENE")" +fi +if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPTS" ] && [ ! -d "$(dirname "$VIASH_PAR_COUNTS_TRANSCRIPTS")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_COUNTS_TRANSCRIPTS")" +fi +if [ ! -z "$VIASH_PAR_RSEM_MULTIQC" ] && [ ! -d "$(dirname "$VIASH_PAR_RSEM_MULTIQC")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_RSEM_MULTIQC")" +fi +if [ ! -z "$VIASH_PAR_BAM_STAR_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_STAR_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_STAR_RSEM")" +fi +if [ ! -z "$VIASH_PAR_BAM_GENOME_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_GENOME_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_GENOME_RSEM")" +fi +if [ ! -z "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_TRANSCRIPT_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_TRANSCRIPT_RSEM")" +fi if [ "$VIASH_ENGINE_ID" == "native" ] ; then if [ "$VIASH_MODE" == "run" ]; then @@ -1477,6 +1631,11 @@ workflow run_wf { ] ) + | map { id, state -> + def mod_state = (state.aligner == 'star_salmon') ? state + [salmon_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | rsem_calculate_expression.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, fromState: [ @@ -1497,7 +1656,7 @@ workflow run_wf { "bam_transcript_rsem": "bam_transcript" ] ) - + // RSEM_Star BAM | samtools_sort.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, @@ -1554,6 +1713,7 @@ workflow run_wf { [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -1565,7 +1725,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" ] + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) emit: @@ -1631,6 +1795,34 @@ if [ ! -z "$VIASH_PAR_QUANT_RESULTS_FILE" ] && [ ! -e "$VIASH_PAR_QUANT_RESULTS_ ViashError "Output file '$VIASH_PAR_QUANT_RESULTS_FILE' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_SALMON_MULTIQC" ] && [ ! -e "$VIASH_PAR_SALMON_MULTIQC" ]; then + ViashError "Output file '$VIASH_PAR_SALMON_MULTIQC' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_GENE" ] && [ ! -e "$VIASH_PAR_RSEM_COUNTS_GENE" ]; then + ViashError "Output file '$VIASH_PAR_RSEM_COUNTS_GENE' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPTS" ] && [ ! -e "$VIASH_PAR_COUNTS_TRANSCRIPTS" ]; then + ViashError "Output file '$VIASH_PAR_COUNTS_TRANSCRIPTS' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_RSEM_MULTIQC" ] && [ ! -e "$VIASH_PAR_RSEM_MULTIQC" ]; then + ViashError "Output file '$VIASH_PAR_RSEM_MULTIQC' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_STAR_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_STAR_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_STAR_RSEM' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_GENOME_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_GENOME_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_GENOME_RSEM' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_TRANSCRIPT_RSEM' does not exist." + exit 1 +fi exit 0 diff --git a/target/executable/workflows/merge_quant_results/.config.vsh.yaml b/target/executable/workflows/merge_quant_results/.config.vsh.yaml index f8704c4..a5b08c0 100644 --- a/target/executable/workflows/merge_quant_results/.config.vsh.yaml +++ b/target/executable/workflows/merge_quant_results/.config.vsh.yaml @@ -278,8 +278,8 @@ build_info: output: "target/executable/workflows/merge_quant_results" executable: "target/executable/workflows/merge_quant_results/merge_quant_results" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/tx2gene" - "target/nextflow/tximport" diff --git a/target/executable/workflows/post_processing/.config.vsh.yaml b/target/executable/workflows/post_processing/.config.vsh.yaml index cb29c14..b4dbadc 100644 --- a/target/executable/workflows/post_processing/.config.vsh.yaml +++ b/target/executable/workflows/post_processing/.config.vsh.yaml @@ -199,7 +199,7 @@ argument_groups: name: "--processed_genome_bam" info: null default: - - "$id.markdup.sorted.bam" + - "$id.genome.bam" must_exist: true create_parent: true required: false @@ -210,7 +210,7 @@ argument_groups: name: "--genome_bam_index" info: null default: - - "$id.markdup.sorted.bam" + - "$id.genome.bam.bai" must_exist: true create_parent: true required: false @@ -221,7 +221,7 @@ argument_groups: name: "--genome_bam_stats" info: null default: - - "$id.markdup.sorted.bam.stats" + - "$id.genome.stats" must_exist: true create_parent: true required: false @@ -232,7 +232,7 @@ argument_groups: name: "--genome_bam_flagstat" info: null default: - - "$id.markdup.sorted.bam.flagstat" + - "$id.genome.flagstat" must_exist: true create_parent: true required: false @@ -243,7 +243,7 @@ argument_groups: name: "--genome_bam_idxstats" info: null default: - - "$id.markdup.sorted.bam.idxstats" + - "$id.genome.idxstats" must_exist: true create_parent: true required: false @@ -254,7 +254,7 @@ argument_groups: name: "--markduplicates_metrics" info: null default: - - "$id.markdup.sorted.MarkDuplicates.metrics.txt" + - "$id.MarkDuplicates.metrics.txt" must_exist: true create_parent: true required: false @@ -486,8 +486,8 @@ build_info: output: "target/executable/workflows/post_processing" executable: "target/executable/workflows/post_processing/post_processing" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/picard_markduplicates" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/samtools/samtools_sort" diff --git a/target/executable/workflows/post_processing/post_processing b/target/executable/workflows/post_processing/post_processing index 4037274..b47f53c 100755 --- a/target/executable/workflows/post_processing/post_processing +++ b/target/executable/workflows/post_processing/post_processing @@ -269,27 +269,27 @@ function ViashHelp { echo "Output:" echo " --processed_genome_bam" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.bam" + echo " default: \$id.genome.bam" echo "" echo " --genome_bam_index" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.bam" + echo " default: \$id.genome.bam.bai" echo "" echo " --genome_bam_stats" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.bam.stats" + echo " default: \$id.genome.stats" echo "" echo " --genome_bam_flagstat" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.bam.flagstat" + echo " default: \$id.genome.flagstat" echo "" echo " --genome_bam_idxstats" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.bam.idxstats" + echo " default: \$id.genome.idxstats" echo "" echo " --markduplicates_metrics" echo " type: file, output, file must exist" - echo " default: \$id.markdup.sorted.MarkDuplicates.metrics.txt" + echo " default: \$id.MarkDuplicates.metrics.txt" echo "" echo " --stringtie_transcript_gtf" echo " type: file, output, file must exist" @@ -887,22 +887,22 @@ if [ -z ${VIASH_PAR_WITH_UMI+x} ]; then VIASH_PAR_WITH_UMI="false" fi if [ -z ${VIASH_PAR_PROCESSED_GENOME_BAM+x} ]; then - VIASH_PAR_PROCESSED_GENOME_BAM="\$id.markdup.sorted.bam" + VIASH_PAR_PROCESSED_GENOME_BAM="\$id.genome.bam" fi if [ -z ${VIASH_PAR_GENOME_BAM_INDEX+x} ]; then - VIASH_PAR_GENOME_BAM_INDEX="\$id.markdup.sorted.bam" + VIASH_PAR_GENOME_BAM_INDEX="\$id.genome.bam.bai" fi if [ -z ${VIASH_PAR_GENOME_BAM_STATS+x} ]; then - VIASH_PAR_GENOME_BAM_STATS="\$id.markdup.sorted.bam.stats" + VIASH_PAR_GENOME_BAM_STATS="\$id.genome.stats" fi if [ -z ${VIASH_PAR_GENOME_BAM_FLAGSTAT+x} ]; then - VIASH_PAR_GENOME_BAM_FLAGSTAT="\$id.markdup.sorted.bam.flagstat" + VIASH_PAR_GENOME_BAM_FLAGSTAT="\$id.genome.flagstat" fi if [ -z ${VIASH_PAR_GENOME_BAM_IDXSTATS+x} ]; then - VIASH_PAR_GENOME_BAM_IDXSTATS="\$id.markdup.sorted.bam.idxstats" + VIASH_PAR_GENOME_BAM_IDXSTATS="\$id.genome.idxstats" fi if [ -z ${VIASH_PAR_MARKDUPLICATES_METRICS+x} ]; then - VIASH_PAR_MARKDUPLICATES_METRICS="\$id.markdup.sorted.MarkDuplicates.metrics.txt" + VIASH_PAR_MARKDUPLICATES_METRICS="\$id.MarkDuplicates.metrics.txt" fi if [ -z ${VIASH_PAR_STRINGTIE_TRANSCRIPT_GTF+x} ]; then VIASH_PAR_STRINGTIE_TRANSCRIPT_GTF="\$id.stringtie.transcripts.gtf" @@ -1185,20 +1185,20 @@ workflow run_wf { "extra_picard_args": "extra_picard_args" ], toState: [ - "genome_bam": "output_bam", + "processed_genome_bam": "output_bam", "markduplicates_metrics": "metrics" ] ) | samtools_sort.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, - fromState: [ "input": "genome_bam" ], - toState: [ "genome_bam": "output" ], + fromState: [ "input": "processed_genome_bam" ], + toState: [ "processed_genome_bam": "output" ], key: "genome_sorted_MarkDuplicates" ) | samtools_index.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "csi": "bam_csi_index" ], toState: [ "genome_bam_index": "output" ], @@ -1207,7 +1207,7 @@ workflow run_wf { | samtools_stats.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_stats": "output" ], @@ -1216,7 +1216,7 @@ workflow run_wf { | samtools_flagstat.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_flagstat": "output" ], @@ -1225,7 +1225,7 @@ workflow run_wf { | samtools_idxstats.run( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_idxstats": "output" ], @@ -1236,7 +1236,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_stringtie }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "annotation_gtf": "gtf", "extra_stringtie_args": "extra_stringtie_args" ], @@ -1254,7 +1254,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "extra_bedtools_args": "extra_bedtools_args" ], toState: [ @@ -1309,7 +1309,7 @@ workflow run_wf { } | setState ( - "processed_genome_bam": "genome_bam", + "processed_genome_bam": "processed_genome_bam", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", "genome_bam_flagstat": "genome_bam_flagstat", diff --git a/target/executable/workflows/pre_processing/.config.vsh.yaml b/target/executable/workflows/pre_processing/.config.vsh.yaml index 0b4b7b5..1ccf1f1 100644 --- a/target/executable/workflows/pre_processing/.config.vsh.yaml +++ b/target/executable/workflows/pre_processing/.config.vsh.yaml @@ -323,26 +323,16 @@ argument_groups: multiple_sep: ";" - name: "Read filtering options" arguments: - - type: "boolean" + - type: "boolean_true" name: "--skip_bbsplit" description: "Skip BBSplit for removal of non-reference genome reads." info: null - default: - - true - required: false direction: "input" - multiple: false - multiple_sep: ";" - - type: "boolean" + - type: "boolean_true" name: "--remove_ribo_rna" description: "Enable the removal of reads derived from ribosomal RNA using SortMeRNA." info: null - default: - - false - required: false direction: "input" - multiple: false - multiple_sep: ";" - name: "Other options" arguments: - type: "string" @@ -363,7 +353,7 @@ argument_groups: description: "Path to output directory" info: null default: - - "$id.$key.read_1.fastq" + - "$id.read_1.fastq" must_exist: false create_parent: true required: false @@ -375,7 +365,7 @@ argument_groups: description: "Path to output directory" info: null default: - - "$id.$key.read_2.fastq" + - "$id.read_2.fastq" must_exist: false create_parent: true required: false @@ -520,6 +510,40 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--trim_json" + description: "The fastp json format report file name" + info: null + default: + - "$id.fastp_out.json" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--trim_html" + description: "The fastp html format report file name" + info: null + default: + - "$id.fastp_out.html" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--merged_out" + description: "File name to store merged fastp output." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" resources: - type: "nextflow_script" path: "main.nf" @@ -538,6 +562,11 @@ dependencies: - name: "umitools/umitools_extract" repository: type: "local" +- name: "umi_tools/umi_tools_extract" + repository: + type: "vsh" + repo: "vsh/biobox" + tag: "v0.2.0" - name: "trimgalore" repository: type: "local" @@ -644,11 +673,12 @@ build_info: output: "target/executable/workflows/pre_processing" executable: "target/executable/workflows/pre_processing/pre_processing" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/fastqc" - "target/nextflow/umitools/umitools_extract" + - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract" - "target/nextflow/trimgalore" - "target/nextflow/bbmap_bbsplit" - "target/nextflow/sortmerna" diff --git a/target/executable/workflows/pre_processing/pre_processing b/target/executable/workflows/pre_processing/pre_processing index 0096c24..55357ee 100755 --- a/target/executable/workflows/pre_processing/pre_processing +++ b/target/executable/workflows/pre_processing/pre_processing @@ -333,13 +333,11 @@ function ViashHelp { echo "" echo "Read filtering options:" echo " --skip_bbsplit" - echo " type: boolean" - echo " default: true" + echo " type: boolean_true" echo " Skip BBSplit for removal of non-reference genome reads." echo "" echo " --remove_ribo_rna" - echo " type: boolean" - echo " default: false" + echo " type: boolean_true" echo " Enable the removal of reads derived from ribosomal RNA using SortMeRNA." echo "" echo "Other options:" @@ -352,12 +350,12 @@ function ViashHelp { echo "Output:" echo " --qc_output1" echo " type: file, output" - echo " default: \$id.\$key.read_1.fastq" + echo " default: \$id.read_1.fastq" echo " Path to output directory" echo "" echo " --qc_output2" echo " type: file, output" - echo " default: \$id.\$key.read_2.fastq" + echo " default: \$id.read_2.fastq" echo " Path to output directory" echo "" echo " --fastqc_html_1" @@ -413,6 +411,20 @@ function ViashHelp { echo " type: file, output, file must exist" echo " default: \$id.salmon_quant_output" echo " Results from Salmon quant" + echo "" + echo " --trim_json" + echo " type: file, output, file must exist" + echo " default: \$id.fastp_out.json" + echo " The fastp json format report file name" + echo "" + echo " --trim_html" + echo " type: file, output, file must exist" + echo " default: \$id.fastp_out.html" + echo " The fastp html format report file name" + echo "" + echo " --merged_out" + echo " type: file, output, file must exist" + echo " File name to store merged fastp output." } # initialise variables @@ -754,24 +766,12 @@ while [[ $# -gt 0 ]]; do ;; --skip_bbsplit) [ -n "$VIASH_PAR_SKIP_BBSPLIT" ] && ViashError Bad arguments for option \'--skip_bbsplit\': \'$VIASH_PAR_SKIP_BBSPLIT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_SKIP_BBSPLIT="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --skip_bbsplit. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --skip_bbsplit=*) - [ -n "$VIASH_PAR_SKIP_BBSPLIT" ] && ViashError Bad arguments for option \'--skip_bbsplit=*\': \'$VIASH_PAR_SKIP_BBSPLIT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_SKIP_BBSPLIT=$(ViashRemoveFlags "$1") + VIASH_PAR_SKIP_BBSPLIT=true shift 1 ;; --remove_ribo_rna) [ -n "$VIASH_PAR_REMOVE_RIBO_RNA" ] && ViashError Bad arguments for option \'--remove_ribo_rna\': \'$VIASH_PAR_REMOVE_RIBO_RNA\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_REMOVE_RIBO_RNA="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --remove_ribo_rna. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --remove_ribo_rna=*) - [ -n "$VIASH_PAR_REMOVE_RIBO_RNA" ] && ViashError Bad arguments for option \'--remove_ribo_rna=*\': \'$VIASH_PAR_REMOVE_RIBO_RNA\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_REMOVE_RIBO_RNA=$(ViashRemoveFlags "$1") + VIASH_PAR_REMOVE_RIBO_RNA=true shift 1 ;; --extra_fq_subsample_args) @@ -939,6 +939,39 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_SALMON_QUANT_OUTPUT=$(ViashRemoveFlags "$1") shift 1 ;; + --trim_json) + [ -n "$VIASH_PAR_TRIM_JSON" ] && ViashError Bad arguments for option \'--trim_json\': \'$VIASH_PAR_TRIM_JSON\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_JSON="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_json. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --trim_json=*) + [ -n "$VIASH_PAR_TRIM_JSON" ] && ViashError Bad arguments for option \'--trim_json=*\': \'$VIASH_PAR_TRIM_JSON\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_JSON=$(ViashRemoveFlags "$1") + shift 1 + ;; + --trim_html) + [ -n "$VIASH_PAR_TRIM_HTML" ] && ViashError Bad arguments for option \'--trim_html\': \'$VIASH_PAR_TRIM_HTML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_HTML="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_html. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --trim_html=*) + [ -n "$VIASH_PAR_TRIM_HTML" ] && ViashError Bad arguments for option \'--trim_html=*\': \'$VIASH_PAR_TRIM_HTML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_HTML=$(ViashRemoveFlags "$1") + shift 1 + ;; + --merged_out) + [ -n "$VIASH_PAR_MERGED_OUT" ] && ViashError Bad arguments for option \'--merged_out\': \'$VIASH_PAR_MERGED_OUT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_MERGED_OUT="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --merged_out. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --merged_out=*) + [ -n "$VIASH_PAR_MERGED_OUT" ] && ViashError Bad arguments for option \'--merged_out=*\': \'$VIASH_PAR_MERGED_OUT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_MERGED_OUT=$(ViashRemoveFlags "$1") + shift 1 + ;; ---engine) VIASH_ENGINE_ID="$2" shift 2 @@ -1125,7 +1158,7 @@ if [ -z ${VIASH_PAR_EXTRA_SALMON_QUANT_ARGS+x} ]; then VIASH_PAR_EXTRA_SALMON_QUANT_ARGS="" fi if [ -z ${VIASH_PAR_SKIP_BBSPLIT+x} ]; then - VIASH_PAR_SKIP_BBSPLIT="true" + VIASH_PAR_SKIP_BBSPLIT="false" fi if [ -z ${VIASH_PAR_REMOVE_RIBO_RNA+x} ]; then VIASH_PAR_REMOVE_RIBO_RNA="false" @@ -1134,10 +1167,10 @@ if [ -z ${VIASH_PAR_EXTRA_FQ_SUBSAMPLE_ARGS+x} ]; then VIASH_PAR_EXTRA_FQ_SUBSAMPLE_ARGS="--record-count 1000000 --seed 1" fi if [ -z ${VIASH_PAR_QC_OUTPUT1+x} ]; then - VIASH_PAR_QC_OUTPUT1="\$id.\$key.read_1.fastq" + VIASH_PAR_QC_OUTPUT1="\$id.read_1.fastq" fi if [ -z ${VIASH_PAR_QC_OUTPUT2+x} ]; then - VIASH_PAR_QC_OUTPUT2="\$id.\$key.read_2.fastq" + VIASH_PAR_QC_OUTPUT2="\$id.read_2.fastq" fi if [ -z ${VIASH_PAR_FASTQC_HTML_1+x} ]; then VIASH_PAR_FASTQC_HTML_1="\$id.read_1.fastqc.html" @@ -1175,6 +1208,12 @@ fi if [ -z ${VIASH_PAR_SALMON_QUANT_OUTPUT+x} ]; then VIASH_PAR_SALMON_QUANT_OUTPUT="\$id.salmon_quant_output" fi +if [ -z ${VIASH_PAR_TRIM_JSON+x} ]; then + VIASH_PAR_TRIM_JSON="\$id.fastp_out.json" +fi +if [ -z ${VIASH_PAR_TRIM_HTML+x} ]; then + VIASH_PAR_TRIM_HTML="\$id.fastp_out.html" +fi # check whether required files exist if [ ! -z "$VIASH_PAR_FASTQ_1" ] && [ ! -e "$VIASH_PAR_FASTQ_1" ]; then @@ -1269,13 +1308,13 @@ if [[ -n "$VIASH_PAR_SAVE_TRIMMED" ]]; then fi if [[ -n "$VIASH_PAR_SKIP_BBSPLIT" ]]; then if ! [[ "$VIASH_PAR_SKIP_BBSPLIT" =~ ^(true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO)$ ]]; then - ViashError '--skip_bbsplit' has to be a boolean. Use "--help" to get more information on the parameters. + ViashError '--skip_bbsplit' has to be a boolean_true. Use "--help" to get more information on the parameters. exit 1 fi fi if [[ -n "$VIASH_PAR_REMOVE_RIBO_RNA" ]]; then if ! [[ "$VIASH_PAR_REMOVE_RIBO_RNA" =~ ^(true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO)$ ]]; then - ViashError '--remove_ribo_rna' has to be a boolean. Use "--help" to get more information on the parameters. + ViashError '--remove_ribo_rna' has to be a boolean_true. Use "--help" to get more information on the parameters. exit 1 fi fi @@ -1444,6 +1483,15 @@ fi if [ ! -z "$VIASH_PAR_SALMON_QUANT_OUTPUT" ] && [ ! -d "$(dirname "$VIASH_PAR_SALMON_QUANT_OUTPUT")" ]; then mkdir -p "$(dirname "$VIASH_PAR_SALMON_QUANT_OUTPUT")" fi +if [ ! -z "$VIASH_PAR_TRIM_JSON" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_JSON")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRIM_JSON")" +fi +if [ ! -z "$VIASH_PAR_TRIM_HTML" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_HTML")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRIM_HTML")" +fi +if [ ! -z "$VIASH_PAR_MERGED_OUT" ] && [ ! -d "$(dirname "$VIASH_PAR_MERGED_OUT")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_MERGED_OUT")" +fi if [ "$VIASH_ENGINE_ID" == "native" ] ; then if [ "$VIASH_MODE" == "run" ]; then @@ -1462,6 +1510,7 @@ VIASH_DEP_TRIMGALORE="$VIASH_META_RESOURCES_DIR/../../../nextflow/trimgalore/mai VIASH_DEP_BBMAP_BBSPLIT="$VIASH_META_RESOURCES_DIR/../../../nextflow/bbmap_bbsplit/main.nf" VIASH_DEP_SORTMERNA="$VIASH_META_RESOURCES_DIR/../../../nextflow/sortmerna/main.nf" VIASH_DEP_FQ_SUBSAMPLE="$VIASH_META_RESOURCES_DIR/../../../nextflow/fq_subsample/main.nf" +VIASH_DEP_UMI_TOOLS_UMI_TOOLS_EXTRACT="$VIASH_TARGET_DIR/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/main.nf" VIASH_DEP_FASTP="$VIASH_TARGET_DIR/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/fastp/main.nf" VIASH_DEP_SALMON_SALMON_QUANT="$VIASH_TARGET_DIR/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/salmon/salmon_quant/main.nf" @@ -1559,7 +1608,8 @@ workflow run_wf { "trim_zip_2": "trimmed_fastqc_zip_2", "trim_html_1": "trimmed_fastqc_html_1", "trim_html_2": "trimmed_fastqc_html_2" - ] + ], + args: [gzip: true, fastqc: true] ) // Trim reads using fastp @@ -1575,7 +1625,7 @@ workflow run_wf { ], toState: [ "fastq_1": "out1", - // "fastq_2": "out2", + "fastq_2": "out2", "failed_trim": "failed_out", "failed_trim_unpaired1": "unpaired1", "failed_trim_unpaired2": "unpaired2", @@ -1639,8 +1689,10 @@ workflow run_wf { runIf: { id, state -> state.strandedness == 'auto' }, fromState: { id, state -> def input = state.paired ? [ state.fastq_1, state.fastq_2 ] : [ state.fastq_1 ] - [ input: input, - extra_args: state.extra_fq_subsample_args ] + [ + input: input, + extra_args: state.extra_fq_subsample_args + ] }, toState: [ "subsampled_fastq_1": "output_1", @@ -1674,9 +1726,8 @@ workflow run_wf { def mates1 = state.paired ? state.subsampled_fastq_1 : null def mates2 = state.paired ? state.subsampled_fastq_2 : null [ unmated_reads: unmated_reads, - mates1: state.fastq1, - mates2: state.fastq2, - targets: state.transcript_fasta, + mates1: mates1, + mates2: mates2, gene_map: state.gtf, index: state.salmon_index, lib_type: state.lib_type ] @@ -1735,6 +1786,18 @@ if [ ! -z "$VIASH_PAR_SALMON_QUANT_OUTPUT" ] && [ ! -e "$VIASH_PAR_SALMON_QUANT_ ViashError "Output file '$VIASH_PAR_SALMON_QUANT_OUTPUT' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_TRIM_JSON" ] && [ ! -e "$VIASH_PAR_TRIM_JSON" ]; then + ViashError "Output file '$VIASH_PAR_TRIM_JSON' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_TRIM_HTML" ] && [ ! -e "$VIASH_PAR_TRIM_HTML" ]; then + ViashError "Output file '$VIASH_PAR_TRIM_HTML' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_MERGED_OUT" ] && [ ! -e "$VIASH_PAR_MERGED_OUT" ]; then + ViashError "Output file '$VIASH_PAR_MERGED_OUT' does not exist." + exit 1 +fi exit 0 diff --git a/target/executable/workflows/prepare_genome/.config.vsh.yaml b/target/executable/workflows/prepare_genome/.config.vsh.yaml index a1e62e4..0a1142a 100644 --- a/target/executable/workflows/prepare_genome/.config.vsh.yaml +++ b/target/executable/workflows/prepare_genome/.config.vsh.yaml @@ -496,8 +496,8 @@ build_info: output: "target/executable/workflows/prepare_genome" executable: "target/executable/workflows/prepare_genome/prepare_genome" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/gunzip" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/gffread" diff --git a/target/executable/workflows/prepare_genome/prepare_genome b/target/executable/workflows/prepare_genome/prepare_genome index 6a3aa84..d5bdc16 100755 --- a/target/executable/workflows/prepare_genome/prepare_genome +++ b/target/executable/workflows/prepare_genome/prepare_genome @@ -1172,9 +1172,15 @@ workflow run_wf { // gff to gtf | gffread.run ( runIf: {id, state -> !state.gtf && state.gff}, - fromState: [ "input": "annotation" ], + fromState: [ + "input": "gff", + "genome": "fasta" + ], toState: [ "gtf": "outfile" ], - args: [output: "gene_annotation.gtf"] + args: [ + outfile: "gene_annotation.gtf", + gtf_output: true + ] ) | gtf_filter.run( @@ -1253,13 +1259,19 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.transcript_fasta}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "transcript_fasta": "transcript_fasta" ], - key: "make_transcript_fasta", - args: [transcript_fasta: "transcriptome.fasta"] + toState: [ "make_transcript_fasta_output": "output" ], + key: "make_transcript_fasta",\\ + args: [reference_name: "genome"] ) + | map { id, state -> + def transcript_fasta = (!state.transcript_fasta) ? + state.make_transcript_fasta_output.listFiles().find{it.name == "genome.transcripts.fa"} : + state.transcript_fasta + [ id, state + [transcript_fasta: transcript_fasta] ] + } // chromosome size and fai index | getchromsizes.run ( @@ -1332,11 +1344,12 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.rsem_index && state.aligner == 'star_rsem'}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "rsem_index": "rsem" ], + toState: [ "rsem_index": "output" ], key: "generate_rsem_index", + args: [reference_name: "genome"] ) // TODO: Uncompress HISAT2 index or generate from scratch if required @@ -1366,10 +1379,7 @@ workflow run_wf { // Uncompress Kallisto index or generate from scratch if required | untar.run ( runIf: {id, state -> state.kallisto_index}, - fromState: [ - "input": "kallisto_index", - "pseudo_aligner_kmer_size": "pseudo_aligner_kmer_size" - ], + fromState: [ "input": "kallisto_index" ], toState: [ "kallisto_index": "output" ], key: "untar_kallisto_index", args: [output: "Kallisto_index"] diff --git a/target/executable/workflows/pseudo_alignment_and_quant/.config.vsh.yaml b/target/executable/workflows/pseudo_alignment_and_quant/.config.vsh.yaml index 9c3dd5c..33edd15 100644 --- a/target/executable/workflows/pseudo_alignment_and_quant/.config.vsh.yaml +++ b/target/executable/workflows/pseudo_alignment_and_quant/.config.vsh.yaml @@ -139,8 +139,6 @@ argument_groups: - type: "file" name: "--pseudo_multiqc" info: null - default: - - "$id.quant.log" must_exist: true create_parent: true required: false @@ -151,7 +149,7 @@ argument_groups: name: "--quant_out_dir" info: null default: - - "$id.salmon_quant" + - "$id.quant" must_exist: true create_parent: true required: false @@ -285,8 +283,8 @@ build_info: output: "target/executable/workflows/pseudo_alignment_and_quant" executable: "target/executable/workflows/pseudo_alignment_and_quant/pseudo_alignment_and_quant" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/salmon/salmon_quant" - "target/nextflow/kallisto/kallisto_quant" diff --git a/target/executable/workflows/pseudo_alignment_and_quant/pseudo_alignment_and_quant b/target/executable/workflows/pseudo_alignment_and_quant/pseudo_alignment_and_quant index b432a0d..7d85e93 100755 --- a/target/executable/workflows/pseudo_alignment_and_quant/pseudo_alignment_and_quant +++ b/target/executable/workflows/pseudo_alignment_and_quant/pseudo_alignment_and_quant @@ -239,11 +239,10 @@ function ViashHelp { echo "Output:" echo " --pseudo_multiqc" echo " type: file, output, file must exist" - echo " default: \$id.quant.log" echo "" echo " --quant_out_dir" echo " type: file, output, file must exist" - echo " default: \$id.salmon_quant" + echo " default: \$id.quant" echo "" echo " --salmon_quant_results_file" echo " type: file, output, file must exist" @@ -608,11 +607,8 @@ fi if [ -z ${VIASH_PAR_LIB_TYPE+x} ]; then VIASH_PAR_LIB_TYPE="" fi -if [ -z ${VIASH_PAR_PSEUDO_MULTIQC+x} ]; then - VIASH_PAR_PSEUDO_MULTIQC="\$id.quant.log" -fi if [ -z ${VIASH_PAR_QUANT_OUT_DIR+x} ]; then - VIASH_PAR_QUANT_OUT_DIR="\$id.salmon_quant" + VIASH_PAR_QUANT_OUT_DIR="\$id.quant" fi if [ -z ${VIASH_PAR_SALMON_QUANT_RESULTS_FILE+x} ]; then VIASH_PAR_SALMON_QUANT_RESULTS_FILE="\$id.quant.sf" @@ -852,11 +848,16 @@ workflow run_wf { lib_type: state.lib_type ] }, toState: [ - "quant_results_dir": "output", + "quant_out_dir": "output", "salmon_quant_results_file": "quant_results" ] ) + | map { id, state -> + def mod_state = (state.pseudo_aligner == 'salmon') ? state + [pseudo_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | kallisto_quant.run ( runIf: { id, state -> state.pseudo_aligner == 'kallisto'}, fromState: [ diff --git a/target/executable/workflows/quality_control/.config.vsh.yaml b/target/executable/workflows/quality_control/.config.vsh.yaml index 2a8d785..b0a6067 100644 --- a/target/executable/workflows/quality_control/.config.vsh.yaml +++ b/target/executable/workflows/quality_control/.config.vsh.yaml @@ -97,7 +97,7 @@ argument_groups: multiple_sep: ";" - type: "file" name: "--quant_out_dir" - description: "Directory containing quantification results." + description: "Directory containing Salmon quantification results." info: null must_exist: true create_parent: true @@ -107,7 +107,7 @@ argument_groups: multiple_sep: ";" - type: "file" name: "--quant_results_file" - description: "Quantification file." + description: "Salmon quantification file." info: null must_exist: true create_parent: true @@ -155,12 +155,32 @@ argument_groups: multiple_sep: ";" - type: "string" name: "--pseudo_aligner" - description: "Method used for [seudo alignment and quantification." + description: "Method used for pseudo alignment and quantification." info: null required: false direction: "input" multiple: false multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_transcripts" + description: "Expression counts on transcript level" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" - type: "boolean" name: "--skip_qc" info: null @@ -612,25 +632,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--mqc_yml" - description: "Software versions" - info: null - must_exist: true - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--workflow_summary" - info: null - must_exist: true - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - type: "boolean" name: "--passed_trimmed_reads" info: null @@ -731,6 +732,15 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" + - type: "file" + name: "--rsem_multiqc" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" - type: "file" name: "--genome_bam_stats" info: null @@ -1233,15 +1243,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--multiqc_versions" - info: null - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--featurecounts" info: null @@ -1367,7 +1368,7 @@ argument_groups: name: "--pseudo_tpm_gene" info: null default: - - "salmon.merged.pseudo_gene_tpm.tsv" + - "pseudo_gene_tpm.tsv" must_exist: true create_parent: true required: false @@ -1378,7 +1379,7 @@ argument_groups: name: "--pseudo_counts_gene" info: null default: - - "salmon.merged.pseudo_gene_counts.tsv" + - "pseudo_gene_counts.tsv" must_exist: true create_parent: true required: false @@ -1389,7 +1390,7 @@ argument_groups: name: "--pseudo_counts_gene_length_scaled" info: null default: - - "salmon.merged.pseudo_gene_counts_length_scaled.tsv" + - "pseudo_gene_counts_length_scaled.tsv" must_exist: true create_parent: true required: false @@ -1400,7 +1401,7 @@ argument_groups: name: "--pseudo_counts_gene_scaled" info: null default: - - "salmon.merged.pseudo_gene_counts_scaled.tsv" + - "pseudo_gene_counts_scaled.tsv" must_exist: true create_parent: true required: false @@ -1411,7 +1412,7 @@ argument_groups: name: "--pseudo_tpm_transcript" info: null default: - - "salmon.merged.pseudo_transcript_tpm.tsv" + - "pseudo_transcript_tpm.tsv" must_exist: true create_parent: true required: false @@ -1422,7 +1423,7 @@ argument_groups: name: "--pseudo_counts_transcript" info: null default: - - "salmon.merged.pseudo_transcript_counts.tsv" + - "pseudo_transcript_counts.tsv" must_exist: true create_parent: true required: false @@ -1505,6 +1506,9 @@ dependencies: type: "vsh" repo: "vsh/biobox" tag: "v0.2.0" +- name: "rsem/rsem_merge_counts" + repository: + type: "local" - name: "workflows/merge_quant_results" repository: type: "local" @@ -1592,8 +1596,8 @@ build_info: output: "target/executable/workflows/quality_control" executable: "target/executable/workflows/quality_control/quality_control" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/rseqc/rseqc_bamstat" - "target/nextflow/rseqc/rseqc_inferexperiment" @@ -1611,6 +1615,7 @@ build_info: - "target/nextflow/deseq2_qc" - "target/nextflow/prepare_multiqc_input" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc" + - "target/nextflow/rsem/rsem_merge_counts" - "target/nextflow/workflows/merge_quant_results" package_config: version: "main" diff --git a/target/executable/workflows/quality_control/quality_control b/target/executable/workflows/quality_control/quality_control index 6f5143a..c98b849 100755 --- a/target/executable/workflows/quality_control/quality_control +++ b/target/executable/workflows/quality_control/quality_control @@ -222,11 +222,11 @@ function ViashHelp { echo "" echo " --quant_out_dir" echo " type: file, file must exist" - echo " Directory containing quantification results." + echo " Directory containing Salmon quantification results." echo "" echo " --quant_results_file" echo " type: file, file must exist" - echo " Quantification file." + echo " Salmon quantification file." echo "" echo " --pseudo_quant_out_dir" echo " type: file, file must exist" @@ -246,7 +246,15 @@ function ViashHelp { echo "" echo " --pseudo_aligner" echo " type: string" - echo " Method used for [seudo alignment and quantification." + echo " Method used for pseudo alignment and quantification." + echo "" + echo " --rsem_counts_gene" + echo " type: file, file must exist" + echo " Expression counts on gene level" + echo "" + echo " --rsem_counts_transcripts" + echo " type: file, file must exist" + echo " Expression counts on transcript level" echo "" echo " --skip_qc" echo " type: boolean" @@ -483,13 +491,6 @@ function ViashHelp { echo " --multiqc_methods_description" echo " type: file, file must exist" echo "" - echo " --mqc_yml" - echo " type: file, file must exist" - echo " Software versions" - echo "" - echo " --workflow_summary" - echo " type: file, file must exist" - echo "" echo " --passed_trimmed_reads" echo " type: boolean" echo "" @@ -526,6 +527,9 @@ function ViashHelp { echo " --star_multiqc" echo " type: file" echo "" + echo " --rsem_multiqc" + echo " type: file, file must exist" + echo "" echo " --genome_bam_stats" echo " type: file" echo "" @@ -731,9 +735,6 @@ function ViashHelp { echo " type: file, output, file must exist" echo " default: multiqc_plots" echo "" - echo " --multiqc_versions" - echo " type: file, output, file must exist" - echo "" echo " --featurecounts" echo " type: file, output" echo " default: \$id.featureCounts.txt" @@ -780,27 +781,27 @@ function ViashHelp { echo "" echo " --pseudo_tpm_gene" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_gene_tpm.tsv" + echo " default: pseudo_gene_tpm.tsv" echo "" echo " --pseudo_counts_gene" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_gene_counts.tsv" + echo " default: pseudo_gene_counts.tsv" echo "" echo " --pseudo_counts_gene_length_scaled" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_gene_counts_length_scaled.tsv" + echo " default: pseudo_gene_counts_length_scaled.tsv" echo "" echo " --pseudo_counts_gene_scaled" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_gene_counts_scaled.tsv" + echo " default: pseudo_gene_counts_scaled.tsv" echo "" echo " --pseudo_tpm_transcript" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_transcript_tpm.tsv" + echo " default: pseudo_transcript_tpm.tsv" echo "" echo " --pseudo_counts_transcript" echo " type: file, output, file must exist" - echo " default: salmon.merged.pseudo_transcript_counts.tsv" + echo " default: pseudo_transcript_counts.tsv" echo "" echo " --pseudo_quant_merged_summarizedexperiment" echo " type: file, output, file must exist" @@ -1012,6 +1013,28 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_PSEUDO_ALIGNER=$(ViashRemoveFlags "$1") shift 1 ;; + --rsem_counts_gene) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_counts_gene. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_counts_gene=*) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene=*\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE=$(ViashRemoveFlags "$1") + shift 1 + ;; + --rsem_counts_transcripts) + [ -n "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--rsem_counts_transcripts\': \'$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_counts_transcripts. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_counts_transcripts=*) + [ -n "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--rsem_counts_transcripts=*\': \'$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS=$(ViashRemoveFlags "$1") + shift 1 + ;; --skip_qc) [ -n "$VIASH_PAR_SKIP_QC" ] && ViashError Bad arguments for option \'--skip_qc\': \'$VIASH_PAR_SKIP_QC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_SKIP_QC="$2" @@ -1479,28 +1502,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_MULTIQC_METHODS_DESCRIPTION=$(ViashRemoveFlags "$1") shift 1 ;; - --mqc_yml) - [ -n "$VIASH_PAR_MQC_YML" ] && ViashError Bad arguments for option \'--mqc_yml\': \'$VIASH_PAR_MQC_YML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_MQC_YML="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --mqc_yml. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --mqc_yml=*) - [ -n "$VIASH_PAR_MQC_YML" ] && ViashError Bad arguments for option \'--mqc_yml=*\': \'$VIASH_PAR_MQC_YML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_MQC_YML=$(ViashRemoveFlags "$1") - shift 1 - ;; - --workflow_summary) - [ -n "$VIASH_PAR_WORKFLOW_SUMMARY" ] && ViashError Bad arguments for option \'--workflow_summary\': \'$VIASH_PAR_WORKFLOW_SUMMARY\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_WORKFLOW_SUMMARY="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --workflow_summary. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --workflow_summary=*) - [ -n "$VIASH_PAR_WORKFLOW_SUMMARY" ] && ViashError Bad arguments for option \'--workflow_summary=*\': \'$VIASH_PAR_WORKFLOW_SUMMARY\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_WORKFLOW_SUMMARY=$(ViashRemoveFlags "$1") - shift 1 - ;; --passed_trimmed_reads) [ -n "$VIASH_PAR_PASSED_TRIMMED_READS" ] && ViashError Bad arguments for option \'--passed_trimmed_reads\': \'$VIASH_PAR_PASSED_TRIMMED_READS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_PASSED_TRIMMED_READS="$2" @@ -1633,6 +1634,17 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_STAR_MULTIQC=$(ViashRemoveFlags "$1") shift 1 ;; + --rsem_multiqc) + [ -n "$VIASH_PAR_RSEM_MULTIQC" ] && ViashError Bad arguments for option \'--rsem_multiqc\': \'$VIASH_PAR_RSEM_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_MULTIQC="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_multiqc. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_multiqc=*) + [ -n "$VIASH_PAR_RSEM_MULTIQC" ] && ViashError Bad arguments for option \'--rsem_multiqc=*\': \'$VIASH_PAR_RSEM_MULTIQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_MULTIQC=$(ViashRemoveFlags "$1") + shift 1 + ;; --genome_bam_stats) [ -n "$VIASH_PAR_GENOME_BAM_STATS" ] && ViashError Bad arguments for option \'--genome_bam_stats\': \'$VIASH_PAR_GENOME_BAM_STATS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_GENOME_BAM_STATS="$2" @@ -2106,17 +2118,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_MULTIQC_PLOTS=$(ViashRemoveFlags "$1") shift 1 ;; - --multiqc_versions) - [ -n "$VIASH_PAR_MULTIQC_VERSIONS" ] && ViashError Bad arguments for option \'--multiqc_versions\': \'$VIASH_PAR_MULTIQC_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_MULTIQC_VERSIONS="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --multiqc_versions. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --multiqc_versions=*) - [ -n "$VIASH_PAR_MULTIQC_VERSIONS" ] && ViashError Bad arguments for option \'--multiqc_versions=*\': \'$VIASH_PAR_MULTIQC_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_MULTIQC_VERSIONS=$(ViashRemoveFlags "$1") - shift 1 - ;; --featurecounts) [ -n "$VIASH_PAR_FEATURECOUNTS" ] && ViashError Bad arguments for option \'--featurecounts\': \'$VIASH_PAR_FEATURECOUNTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_FEATURECOUNTS="$2" @@ -2704,22 +2705,22 @@ if [ -z ${VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT+x} ]; then VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT="salmon_merged_summarizedexperiment" fi if [ -z ${VIASH_PAR_PSEUDO_TPM_GENE+x} ]; then - VIASH_PAR_PSEUDO_TPM_GENE="salmon.merged.pseudo_gene_tpm.tsv" + VIASH_PAR_PSEUDO_TPM_GENE="pseudo_gene_tpm.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE+x} ]; then - VIASH_PAR_PSEUDO_COUNTS_GENE="salmon.merged.pseudo_gene_counts.tsv" + VIASH_PAR_PSEUDO_COUNTS_GENE="pseudo_gene_counts.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED+x} ]; then - VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED="salmon.merged.pseudo_gene_counts_length_scaled.tsv" + VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED="pseudo_gene_counts_length_scaled.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED+x} ]; then - VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED="salmon.merged.pseudo_gene_counts_scaled.tsv" + VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED="pseudo_gene_counts_scaled.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_TPM_TRANSCRIPT+x} ]; then - VIASH_PAR_PSEUDO_TPM_TRANSCRIPT="salmon.merged.pseudo_transcript_tpm.tsv" + VIASH_PAR_PSEUDO_TPM_TRANSCRIPT="pseudo_transcript_tpm.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT+x} ]; then - VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT="salmon.merged.pseudo_transcript_counts.tsv" + VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT="pseudo_transcript_counts.tsv" fi if [ -z ${VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT+x} ]; then VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT="pseudo_quant_merged_summarizedexperiment" @@ -2762,6 +2763,14 @@ if [ ! -z "$VIASH_PAR_PSEUDO_KALLISTO_QUANT_RESULTS_FILE" ] && [ ! -e "$VIASH_PA ViashError "Input file '$VIASH_PAR_PSEUDO_KALLISTO_QUANT_RESULTS_FILE' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_GENE" ] && [ ! -e "$VIASH_PAR_RSEM_COUNTS_GENE" ]; then + ViashError "Input file '$VIASH_PAR_RSEM_COUNTS_GENE' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && [ ! -e "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ]; then + ViashError "Input file '$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS' does not exist." + exit 1 +fi if [ ! -z "$VIASH_PAR_BIOTYPES_HEADER" ] && [ ! -e "$VIASH_PAR_BIOTYPES_HEADER" ]; then ViashError "Input file '$VIASH_PAR_BIOTYPES_HEADER' does not exist." exit 1 @@ -2782,12 +2791,8 @@ if [ ! -z "$VIASH_PAR_MULTIQC_METHODS_DESCRIPTION" ] && [ ! -e "$VIASH_PAR_MULTI ViashError "Input file '$VIASH_PAR_MULTIQC_METHODS_DESCRIPTION' does not exist." exit 1 fi -if [ ! -z "$VIASH_PAR_MQC_YML" ] && [ ! -e "$VIASH_PAR_MQC_YML" ]; then - ViashError "Input file '$VIASH_PAR_MQC_YML' does not exist." - exit 1 -fi -if [ ! -z "$VIASH_PAR_WORKFLOW_SUMMARY" ] && [ ! -e "$VIASH_PAR_WORKFLOW_SUMMARY" ]; then - ViashError "Input file '$VIASH_PAR_WORKFLOW_SUMMARY' does not exist." +if [ ! -z "$VIASH_PAR_RSEM_MULTIQC" ] && [ ! -e "$VIASH_PAR_RSEM_MULTIQC" ]; then + ViashError "Input file '$VIASH_PAR_RSEM_MULTIQC' does not exist." exit 1 fi @@ -3259,9 +3264,6 @@ fi if [ ! -z "$VIASH_PAR_MULTIQC_PLOTS" ] && [ ! -d "$(dirname "$VIASH_PAR_MULTIQC_PLOTS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_MULTIQC_PLOTS")" fi -if [ ! -z "$VIASH_PAR_MULTIQC_VERSIONS" ] && [ ! -d "$(dirname "$VIASH_PAR_MULTIQC_VERSIONS")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_MULTIQC_VERSIONS")" -fi if [ ! -z "$VIASH_PAR_FEATURECOUNTS" ] && [ ! -d "$(dirname "$VIASH_PAR_FEATURECOUNTS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_FEATURECOUNTS")" fi @@ -3342,6 +3344,7 @@ VIASH_DEP_PRESEQ_LCEXTRAP="$VIASH_META_RESOURCES_DIR/../../../nextflow/preseq_lc VIASH_DEP_MULTIQC_CUSTOM_BIOTYPE="$VIASH_META_RESOURCES_DIR/../../../nextflow/multiqc_custom_biotype/main.nf" VIASH_DEP_DESEQ2_QC="$VIASH_META_RESOURCES_DIR/../../../nextflow/deseq2_qc/main.nf" VIASH_DEP_PREPARE_MULTIQC_INPUT="$VIASH_META_RESOURCES_DIR/../../../nextflow/prepare_multiqc_input/main.nf" +VIASH_DEP_RSEM_RSEM_MERGE_COUNTS="$VIASH_META_RESOURCES_DIR/../../../nextflow/rsem/rsem_merge_counts/main.nf" VIASH_DEP_WORKFLOWS_MERGE_QUANT_RESULTS="$VIASH_META_RESOURCES_DIR/../../../nextflow/workflows/merge_quant_results/main.nf" VIASH_DEP_FEATURECOUNTS="$VIASH_TARGET_DIR/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/featurecounts/main.nf" VIASH_DEP_MULTIQC="$VIASH_TARGET_DIR/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc/main.nf" @@ -3421,7 +3424,7 @@ workflow run_wf { "input": "genome_bam", "extra_preseq_args": "extra_preseq_args" ], - toState: [ "preseq_output": "output" ], + toState: [ "preseq_output": "output" ] ) | rseqc_bamstat.run ( @@ -3580,10 +3583,49 @@ workflow run_wf { merged_ch = qc_ch | toSortedList - | map { list -> def ids = list.collect { id, state -> state.id } def strandedness = list.collect { id, state -> state.strandedness } + def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + def passed_mapping = list.collect { id, state -> state.passed_mapping } + def percent_mapped = list.collect { id, state -> state.percent_mapped } + def inferred_strand = list.collect { id, state -> state.inferred_strand } + def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + def gtf = list.collect { id, state -> state.gtf }.unique()[0] + def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + def aligner = list.collect { id, state -> state.aligner }.unique()[0] + def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + def quant_results = list.collect { id, state -> + (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + state.quant_results_file : + null } + def rsem_counts_gene = list.collect { id, state -> + (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + state.rsem_counts_gene : + null } + def rsem_counts_transcripts = list.collect { id, state -> + (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + state.rsem_counts_transcripts : + null } + def pseudo_salmon_quant_results = list.collect { id, state -> + (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + state.pseudo_salmon_quant_results_file : + null } + def pseudo_kallisto_quant_results = list.collect { id, state -> + (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + state.pseudo_kallisto_quant_results_file : + null } def fastqc_zip_1 = list.collect { id, state -> (state.fastqc_zip_1 instanceof java.nio.file.Path && state.fastqc_zip_1.exists()) ? state.fastqc_zip_1 : @@ -3608,26 +3650,14 @@ workflow run_wf { (state.trim_log_2 instanceof java.nio.file.Path && state.trim_log_2.exists()) ? state.trim_log_2 : null } - def sortmerna_log = list.collect { id, state -> - (state.sortmerna_log instanceof java.nio.file.Path && state.sortmerna_log.exists()) ? - state.sortmerna_log : + def sortmerna_multiqc = list.collect { id, state -> + (state.sortmerna_multiqc instanceof java.nio.file.Path && state.sortmerna_multiqc.exists()) ? + state.sortmerna_multiqc : null } def star_multiqc = list.collect { id, state -> (state.star_multiqc instanceof java.nio.file.Path && state.star_multiqc.exists()) ? state.star_multiqc : null } - def quant_results = list.collect { id, state -> - (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? - state.quant_results_file : - null } - def pseudo_salmon_quant_results = list.collect { id, state -> - (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? - state.pseudo_salmon_quant_results_file : - null } - def pseudo_kallisto_quant_results = list.collect { id, state -> - (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? - state.pseudo_kallisto_quant_results_file : - null } def genome_bam_stats = list.collect { id, state -> (state.genome_bam_stats instanceof java.nio.file.Path && state.genome_bam_stats.exists()) ? state.genome_bam_stats : @@ -3644,6 +3674,14 @@ workflow run_wf { (state.markduplicates_multiqc instanceof java.nio.file.Path && state.markduplicates_multiqc.exists()) ? state.markduplicates_multiqc : null } + def salmon_multiqc = list.collect { id, state -> + (state.salmon_multiqc instanceof java.nio.file.Path && state.salmon_multiqc.exists()) ? + state.salmon_multiqc : + null } + def rsem_multiqc = list.collect { id, state -> + (state.rsem_multiqc instanceof java.nio.file.Path && state.rsem_multiqc.exists()) ? + state.rsem_multiqc : + null } def pseudo_multiqc = list.collect { id, state -> (state.pseudo_multiqc instanceof java.nio.file.Path && state.pseudo_multiqc.exists()) ? state.pseudo_multiqc : @@ -3704,40 +3742,45 @@ workflow run_wf { (state.tin_output_summary instanceof java.nio.file.Path && state.tin_output_summary.exists()) ? state.tin_output_summary : null } - def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } - def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } - def passed_mapping = list.collect { id, state -> state.passed_mapping } - def percent_mapped = list.collect { id, state -> state.percent_mapped } - def inferred_strand = list.collect { id, state -> state.inferred_strand } - def passed_strand_check = list.collect { id, state -> state.passed_strand_check } - def gtf = list.collect { id, state -> state.gtf }.unique()[0] - def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] - def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] - def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] - def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc } .unique()[0] - def aligner = list.collect { id, state -> state.aligner } .unique()[0] - def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner } .unique()[0] - def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] - 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 multiqc_custom_config = list.collect { id, state -> state.multiqc_custom_config }.unique()[0] - def skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] - def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] - def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] ["merged", [ ids: ids, strandedness: strandedness, + num_trimmed_reads: num_trimmed_reads, + passed_trimmed_reads: passed_trimmed_reads, + passed_mapping: passed_mapping, + percent_mapped: percent_mapped, + inferred_strand: inferred_strand, + passed_strand_check: passed_strand_check, + skip_align: skip_align, + skip_pseudo_align: skip_pseudo_align, + quant_results: quant_results, + rsem_counts_gene: rsem_counts_gene, + rsem_counts_transcripts: rsem_counts_transcripts, + pseudo_salmon_quant_results: pseudo_salmon_quant_results, + pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + gtf: gtf, + gtf_extra_attributes: gtf_extra_attributes, + gtf_group_features: gtf_group_features, + pca_header_multiqc: pca_header_multiqc, + clustering_header_multiqc: clustering_header_multiqc, + aligner: aligner, + pseudo_aligner: pseudo_aligner, + deseq2_vst: deseq2_vst, + extra_deseq2_args: extra_deseq2_args, + extra_deseq2_args2: extra_deseq2_args2, + skip_deseq2_qc: skip_deseq2_qc, fastqc_zip: fastqc_zip_1 + fastqc_zip_2, trim_zip: trim_zip_1 + trim_zip_2, trim_log: trim_log_1 + trim_log_2, - sortmerna_log: sortmerna_log, + sortmerna_multiqc: sortmerna_multiqc, star_multiqc: star_multiqc, - salmon_multiqc: quant_results, genome_bam_stats: genome_bam_stats, genome_bam_flagstat: genome_bam_flagstat, genome_bam_idxstats: genome_bam_idxstats, markduplicates_multiqc: markduplicates_multiqc, + salmon_multiqc: salmon_multiqc, + rsem_multiqc: rsem_multiqc, pseudo_multiqc: pseudo_multiqc, featurecounts_multiqc: featurecounts_multiqc, featurecounts_rrna_multiqc: featurecounts_rrna_multiqc, @@ -3753,32 +3796,114 @@ workflow run_wf { read_distribution_output: read_distribution_output, read_duplication_output_duplication_rate_mapping: read_duplication_output_duplication_rate_mapping, tin_output_summary: tin_output_summary, - quant_results: quant_results, - pseudo_salmon_quant_results: pseudo_salmon_quant_results, - pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, - gtf: gtf, - gtf_extra_attributes: gtf_extra_attributes, - gtf_group_features: gtf_group_features, - pca_header_multiqc: pca_header_multiqc, - clustering_header_multiqc: clustering_header_multiqc, - aligner: aligner, - pseudo_aligner: pseudo_aligner, - deseq2_vst: deseq2_vst, - extra_deseq2_args: extra_deseq2_args, - extra_deseq2_args2: extra_deseq2_args2, - skip_deseq2_qc: skip_deseq2_qc, - num_trimmed_reads: num_trimmed_reads, - passed_trimmed_reads: passed_trimmed_reads, - passed_mapping: passed_mapping, - percent_mapped: percent_mapped, - inferred_strand: inferred_strand, - passed_strand_check: passed_strand_check, - multiqc_custom_config: multiqc_custom_config, - skip_align: skip_align, - skip_pseudo_align: skip_pseudo_align + multiqc_custom_config: multiqc_custom_config ] ] } - + + // | map { list -> + // def ids = list.collect { id, state -> state.id } + // def strandedness = list.collect { id, state -> state.strandedness } + // def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + // def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + // def passed_mapping = list.collect { id, state -> state.passed_mapping } + // def percent_mapped = list.collect { id, state -> state.percent_mapped } + // def inferred_strand = list.collect { id, state -> state.inferred_strand } + // def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + // def gtf = list.collect { id, state -> state.gtf }.unique()[0] + // def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + // def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + // def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + // def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + // def aligner = list.collect { id, state -> state.aligner }.unique()[0] + // def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + // def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + // 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + // def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + // def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + // def quant_results = list.collect { id, state -> + // (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + // state.quant_results_file : + // null } + // def rsem_counts_gene = list.collect { id, state -> + // (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + // state.rsem_counts_gene : + // null } + // def rsem_counts_transcripts = list.collect { id, state -> + // (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + // state.rsem_counts_transcripts : + // null } + // def pseudo_salmon_quant_results = list.collect { id, state -> + // (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + // state.pseudo_salmon_quant_results_file : + // null } + // def pseudo_kallisto_quant_results = list.collect { id, state -> + // (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + // state.pseudo_kallisto_quant_results_file : + // null } + // def fastqc_zip_1_dirs = list.collect{it[1].fastqc_zip_1.getParent()} + // def fastqc_zip_2_dirs = list.collect{it[1].fastqc_zip_2.getParent()} + // def trim_zip_1_dirs = list.collect{it[1].trim_zip_1.getParent()} + // def trim_zip_2_dirs = list.collect{it[1].trim_zip_2.getParent()} + // def trim_log_1_dirs = list.collect{it[1].trim_log_1.getParent()} + // def trim_log_2_dirs = list.collect{it[1].trim_log_2.getParent()} + // def sortmerna_multiqc_dirs = list.collect{it[1].sortmerna_multiqc.getParent()} + // def star_multiqc_dirs = list.collect{it[1].star_multiqc.getParent()} + // def genome_bam_stats_dirs = list.collect{it[1].genome_bam_stats.getParent()} + // def genome_bam_flagstat_dirs = list.collect{it[1].genome_bam_flagstat.getParent()} + // def genome_bam_idxstats_dirs = list.collect{it[1].genome_bam_idxstats} + // def markduplicates_multiqc_dirs = list.collect{it[1].markduplicates_multiqc.getParent()} + // def salmon_multiqc_dirs = list.collect{it[1].salmon_multiqc} + // def rsem_multiqc_dirs = list.collect{it[1].rsem_multiqc.getParent()} + // def pseudo_multiqc_dirs = list.collect{it[1].pseudo_multiqc.getParent()} + // def featurecounts_multiqc_dirs = list.collect{it[1].featurecounts_multiqc.getParent()} + // def featurecounts_rrna_multiqc_dirs = list.collect{it[1].featurecounts_rrna_multiqc.getParent()} + // def preseq_output_dirs = list.collect{it[1].preseq_output.getParent()} + // def qualimap_output_dirs = list.collect{it[1].qualimap_output_dir} + // def dupradar_output_dup_intercept_mqc_dirs = list.collect{it[1].dupradar_output_dup_intercept_mqc.getParent()} + // def dupradar_output_duprate_exp_denscurve_mqc_dirs = list.collect{it[1].dupradar_output_duprate_exp_denscurve_mqc.getParent()} + // def bamstat_output_dirs = list.collect{it[1].bamstat_output.getParent()} + // def strandedness_output_dirs = list.collect{it[1].strandedness_output.getParent()} + // def inner_dist_output_freq_dirs = list.collect{it[1].inner_dist_output_freq.getParent()} + // def junction_annotation_output_log_dirs = list.collect{it[1].junction_annotation_output_log.getParent()} + // def junction_saturation_output_plot_r_dirs = list.collect{it[1].junction_saturation_output_plot_r.getParent()} + // def read_distribution_output_dirs = list.collect{it[1].read_distribution_output.getParent()} + // def read_duplication_output_duplication_rate_mapping_dirs = list.collect{it[1].read_duplication_output_duplication_rate_mapping.getParent()} + // def tin_output_summary_dirs = list.collect{it[1].tin_output_summary.getParent()} + // def multiqc_custom_config_dirs = list.collect{it[1].multiqc_custom_config.getParent()} + // ["merged", [ + // ids: ids, + // strandedness: strandedness, + // num_trimmed_reads: num_trimmed_reads, + // passed_trimmed_reads: passed_trimmed_reads, + // passed_mapping: passed_mapping, + // percent_mapped: percent_mapped, + // inferred_strand: inferred_strand, + // passed_strand_check: passed_strand_check, + // skip_align: skip_align, + // skip_pseudo_align: skip_pseudo_align, + // quant_results: quant_results, + // rsem_counts_gene: rsem_counts_gene, + // rsem_counts_transcripts: rsem_counts_transcripts, + // pseudo_salmon_quant_results: pseudo_salmon_quant_results, + // pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + // gtf: gtf, + // gtf_extra_attributes: gtf_extra_attributes, + // gtf_group_features: gtf_group_features, + // pca_header_multiqc: pca_header_multiqc, + // clustering_header_multiqc: clustering_header_multiqc, + // aligner: aligner, + // pseudo_aligner: pseudo_aligner, + // deseq2_vst: deseq2_vst, + // extra_deseq2_args: extra_deseq2_args, + // extra_deseq2_args2: extra_deseq2_args2, + // skip_deseq2_qc: skip_deseq2_qc, + // multiqc_input: fastqc_zip_1_dirs + fastqc_zip_2_dirs + trim_zip_1_dirs + trim_zip_2_dirs + trim_log_1_dirs + trim_log_2_dirs + sortmerna_multiqc_dirs + star_multiqc_dirs + genome_bam_stats_dirs + genome_bam_flagstat_dirs + genome_bam_idxstats_dirs + markduplicates_multiqc_dirs + salmon_multiqc_dirs + rsem_multiqc_dirs + pseudo_multiqc_dirs + featurecounts_multiqc_dirs + featurecounts_rrna_multiqc_dirs + preseq_output_dirs + qualimap_output_dirs + dupradar_output_dup_intercept_mqc_dirs + dupradar_output_duprate_exp_denscurve_mqc_dirs + bamstat_output_dirs + strandedness_output_dirs + inner_dist_output_freq_dirs + junction_annotation_output_log_dirs + junction_saturation_output_plot_r_dirs + read_distribution_output_dirs + read_duplication_output_duplication_rate_mapping_dirs + tin_output_summary_dirs + multiqc_custom_config_dirs + // ] ] + // } + // Merge quantification results of alignment | merge_quant_results.run ( runIf: { id, state -> !state.skip_align && state.aligner == 'star_salmon' }, @@ -3800,19 +3925,36 @@ workflow run_wf { "lengths_transcript": "lengths_transcript", "quant_merged_summarizedexperiment": "quant_merged_summarizedexperiment" ], - key: "merge_qunat_results" + key: "merge_quant_results" + ) + + | rsem_merge_counts.run ( + runIf: { id, state -> state.aligner == 'star_rsem' }, + fromState: [ + "counts_gene": "rsem_counts_gene", + "counts_transcripts": "rsem_counts_transcripts" + ], + toState: [ + "tpm_gene": "merged_gene_tpm", + "counts_gene": "merged_gene_counts", + "tpm_transcript": "merged_transcript_tpm", + "counts_transcript": "merged_transcript_counts" + ] ) | deseq2_qc.run ( runIf: { id, state -> !state.skip_qc && !state.skip_deseq2_qc && !state.skip_align }, - fromState: [ - "counts": "counts_gene_length_scaled", - "pca_header_multiqc": "pca_header_multiqc", - "clustering_header_multiqc": "clustering_header_multiqc", - "deseq2_vst": "deseq2_vst", - "extra_deseq2_args": "extra_deseq2_args", - "extra_deseq2_args2": "extra_deseq2_args2" - ], + fromState: { id, state -> + def counts = (state.aligner == "star_rsem") ? state.counts_gene : state.counts_gene_length_scaled + [ + counts: counts, + pca_header_multiqc: state.pca_header_multiqc, + clustering_header_multiqc: state.clustering_header_multiqc, + deseq2_vst: state.deseq2_vst, + extra_deseq2_args: state.extra_deseq2_args, + extra_deseq2_args2: state.extra_deseq2_args2 + ] + }, toState: [ "deseq2_output": "deseq2_output", "deseq2_pca_multiqc": "pca_multiqc", @@ -3913,14 +4055,15 @@ workflow run_wf { "fastqc_raw_multiqc": "fastqc_zip", "fastqc_trim_multiqc": "trim_zip", "trim_log_multiqc": "trim_log", - "sortmerna_multiqc": "sortmerna_log", + "sortmerna_multiqc": "sortmerna_multiqc", "star_multiqc": "star_multiqc", "salmon_multiqc": "salmon_multiqc", + "rsem_multiqc": "rsem_multiqc", + "pseudo_multiqc": "pseudo_multiqc", "samtools_stats": "genome_bam_stats", "samtools_flagstat": "genome_bam_flagstat", "samtools_idxstats": "genome_bam_idxstats", - "markduplicates_multiqc": "markduplicates_multiqc", - "pseudo_multiqc": "pseudo_multiqc", + "markduplicates_multiqc": "markduplicates_multiqc", "featurecounts_multiqc": "featurecounts_multiqc", "featurecounts_rrna_multiqc": "featurecounts_rrna_multiqc", "aligner_pca_multiqc": "deseq2_pca_multiqc", @@ -3949,10 +4092,11 @@ workflow run_wf { "title": "multiqc_title", "input": "multiqc_input", ], + args: [exclude_modules: "general_stats"], toState: [ "multiqc_report": "output_report", "multiqc_data": "output_data", - "multiqc_plots": "output_plots", + "multiqc_plots": "output_plots" ] ) @@ -4054,8 +4198,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) @@ -4250,10 +4393,6 @@ if [ ! -z "$VIASH_PAR_MULTIQC_PLOTS" ] && [ ! -e "$VIASH_PAR_MULTIQC_PLOTS" ]; t ViashError "Output file '$VIASH_PAR_MULTIQC_PLOTS' does not exist." exit 1 fi -if [ ! -z "$VIASH_PAR_MULTIQC_VERSIONS" ] && [ ! -e "$VIASH_PAR_MULTIQC_VERSIONS" ]; then - ViashError "Output file '$VIASH_PAR_MULTIQC_VERSIONS' does not exist." - exit 1 -fi if [ ! -z "$VIASH_PAR_TPM_GENE" ] && [ ! -e "$VIASH_PAR_TPM_GENE" ]; then ViashError "Output file '$VIASH_PAR_TPM_GENE' does not exist." exit 1 diff --git a/target/executable/workflows/rnaseq/.config.vsh.yaml b/target/executable/workflows/rnaseq/.config.vsh.yaml index 7ecb4f7..8c4eb86 100644 --- a/target/executable/workflows/rnaseq/.config.vsh.yaml +++ b/target/executable/workflows/rnaseq/.config.vsh.yaml @@ -523,18 +523,7 @@ argument_groups: info: null direction: "input" - type: "string" - name: "extra_rsem_prepare_reference_args" - description: "Extra arguments to pass to rsem-prepare-reference command in addition\ - \ to defaults defined by the pipeline." - info: null - default: - - "--star" - required: false - direction: "input" - multiple: false - multiple_sep: ";" - - type: "string" - name: "extra_rsem_calculate_expression_args" + name: "--extra_rsem_calculate_expression_args" description: "Extra arguments to pass to rsem-calculate-expression command in\ \ addition to defaults defined by the pipeline." info: null @@ -796,7 +785,7 @@ argument_groups: name: "--output_fasta" info: null default: - - "genome/reference_genome.fasta" + - "reference/genome.fasta" must_exist: true create_parent: true required: false @@ -807,7 +796,7 @@ argument_groups: name: "--output_gtf" info: null default: - - "genome/gene_annotation.gtf" + - "reference/gene_annotation.gtf" must_exist: true create_parent: true required: false @@ -818,7 +807,7 @@ argument_groups: name: "--output_transcript_fasta" info: null default: - - "genome/transcriptome.fasta" + - "reference/transcriptome.fasta" must_exist: true create_parent: true required: false @@ -829,7 +818,7 @@ argument_groups: name: "--output_gene_bed" info: null default: - - "genome/gene_annotation.bed" + - "reference/gene_annotation.bed" must_exist: true create_parent: true required: false @@ -841,7 +830,7 @@ argument_groups: description: "Path to STAR index." info: null default: - - "genome/index/STAR" + - "reference/index/STAR" must_exist: true create_parent: true required: false @@ -853,7 +842,7 @@ argument_groups: description: "Path to Salmon index." info: null default: - - "genome/index/Salmon" + - "reference/index/Salmon" must_exist: true create_parent: true required: false @@ -865,7 +854,7 @@ argument_groups: description: "Path to BBSplit index." info: null default: - - "genome/index/BBSplit" + - "reference/index/BBSplit" must_exist: true create_parent: true required: false @@ -877,7 +866,7 @@ argument_groups: description: "Path to Kallisto index." info: null default: - - "genome/index/Kallisto" + - "reference/index/Kallisto" must_exist: true create_parent: true required: false @@ -956,28 +945,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--trim_log_1" - info: null - default: - - "trimgalore/$id.read_1.trimming_report.txt" - must_exist: false - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--trim_log_2" - info: null - default: - - "trimgalore/$id.read_2.trimming_report.txt" - must_exist: false - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--trim_html_1" info: null @@ -1022,6 +989,52 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--trim_log_1" + info: null + default: + - "trimgalore/$id.read_1.trimming_report.txt" + must_exist: false + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--trim_log_2" + info: null + default: + - "trimgalore/$id.read_2.trimming_report.txt" + must_exist: false + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--fastp_trim_json" + description: "The fastp json format report file name" + info: null + default: + - "fastp/$id_out.json" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--fastp_trim_html" + description: "The fastp html format report file name" + info: null + default: + - "fastp/$id_out.html" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" - type: "file" name: "--sortmerna_log" description: "Sortmerna log file." @@ -1038,7 +1051,7 @@ argument_groups: name: "--star_alignment" info: null default: - - "STAR_alignment/$id" + - "STAR/$id" must_exist: true create_parent: true required: false @@ -1049,7 +1062,7 @@ argument_groups: name: "--genome_bam_sorted" info: null default: - - "STAR_alignment/genome_processed/$id.genome.bam" + - "STAR/genome_processed/$id.genome.bam" must_exist: true create_parent: true required: false @@ -1060,7 +1073,29 @@ argument_groups: name: "--genome_bam_index" info: null default: - - "STAR_alignment/genome_processed/$id.genome.bam.bai" + - "STAR/genome_processed/$id.genome.bam.bai" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--transcriptome_bam" + info: null + default: + - "STAR/transcriptome_processed/$id.transcriptome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--transcriptome_bam_index" + info: null + default: + - "STAR/transcriptome_processed/$id.transcriptome.bam.bai" must_exist: true create_parent: true required: false @@ -1100,28 +1135,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--transcriptome_bam" - info: null - default: - - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--transcriptome_bam_index" - info: null - default: - - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam.bai" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--transcriptome_bam_stats" info: null @@ -1159,7 +1172,89 @@ argument_groups: name: "--salmon_quant_results" info: null default: - - "salmon/$id" + - "STAR_Salmon/$id" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--salmon_quant_results_file" + info: null + default: + - "STAR_Salmon/$id/quant.sf" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_quant_results" + info: null + default: + - "Pseudo_align_quant/$id" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + default: + - "RSEM/$id.genes.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_transcripts" + description: "Expression counts on transcript level" + info: null + default: + - "RSEM/$id.isoforms.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_star_rsem" + description: "BAM file generated by STAR (from RSEM)" + info: null + default: + - "RSEM/$id.STAR.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_genome_rsem" + description: "Genome BAM file (from RSEM)" + info: null + default: + - "RSEM/$id.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_transcript_rsem" + description: "Transcript BAM file (from RSEM)" + info: null + default: + - "RSEM/$id.transcript.bam" must_exist: true create_parent: true required: false @@ -1170,7 +1265,7 @@ argument_groups: name: "--tpm_gene" info: null default: - - "salmon/gene_tpm.tsv" + - "transcript_quantification/gene_tpm.tsv" must_exist: true create_parent: true required: false @@ -1181,7 +1276,7 @@ argument_groups: name: "--counts_gene" info: null default: - - "salmon/gene_counts.tsv" + - "transcript_quantification/gene_counts.tsv" must_exist: true create_parent: true required: false @@ -1192,7 +1287,7 @@ argument_groups: name: "--counts_gene_length_scaled" info: null default: - - "salmon/gene_counts_length_scaled.tsv" + - "transcript_quantification/gene_counts_length_scaled.tsv" must_exist: true create_parent: true required: false @@ -1203,7 +1298,7 @@ argument_groups: name: "--counts_gene_scaled" info: null default: - - "salmon/gene_counts_scaled.tsv" + - "transcript_quantification/gene_counts_scaled.tsv" must_exist: true create_parent: true required: false @@ -1214,7 +1309,7 @@ argument_groups: name: "--tpm_transcript" info: null default: - - "salmon/transcript_tpm.tsv" + - "transcript_quantification/transcript_tpm.tsv" must_exist: true create_parent: true required: false @@ -1225,7 +1320,7 @@ argument_groups: name: "--counts_transcript" info: null default: - - "salmon/transcript_counts.tsv" + - "transcript_quantification/transcript_counts.tsv" must_exist: true create_parent: true required: false @@ -1233,10 +1328,10 @@ argument_groups: multiple: false multiple_sep: ";" - type: "file" - name: "--salmon_merged_summarizedexperiment" + name: "--quant_merged_summarizedexperiment" info: null default: - - "salmon/summarizedexperiment" + - "transcript_quantification/summarizedexperiment" must_exist: true create_parent: true required: false @@ -1247,7 +1342,7 @@ argument_groups: name: "--markduplicates_metrics" info: null default: - - "picard/$id.sorted.MarkDuplicates.metrics.txt" + - "picard/$id.MarkDuplicates.metrics.txt" must_exist: true create_parent: true required: false @@ -1840,9 +1935,66 @@ argument_groups: multiple: false multiple_sep: ";" - type: "file" - name: "--versions" + name: "--pseudo_counts_gene" info: null - must_exist: false + default: + - "pseudo_alignment_quantification/gene_counts.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_gene_length_scaled" + info: null + default: + - "pseudo_alignment_quantification/gene_counts_length_scaled.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_gene_scaled" + info: null + default: + - "pseudo_alignment_quantification/gene_counts_scaled.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_tpm_transcript" + info: null + default: + - "pseudo_alignment_quantification/transcript_tpm.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_transcript" + info: null + default: + - "pseudo_alignment_quantification/transcript_counts.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_quant_merged_summarizedexperiment" + info: null + default: + - "pseudo_alignment_quantification/quant_merged_summarizedexperiment" + must_exist: true create_parent: true required: false direction: "output" @@ -1965,8 +2117,8 @@ build_info: output: "target/executable/workflows/rnaseq" executable: "target/executable/workflows/rnaseq/rnaseq" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/workflows/prepare_genome" - "target/nextflow/cat_fastq" diff --git a/target/executable/workflows/rnaseq/rnaseq b/target/executable/workflows/rnaseq/rnaseq index 0c48d41..e50bfb9 100755 --- a/target/executable/workflows/rnaseq/rnaseq +++ b/target/executable/workflows/rnaseq/rnaseq @@ -444,13 +444,7 @@ function ViashHelp { echo " type: boolean_true" echo " Skip all of the pseudo-alignment-based processes within the pipeline." echo "" - echo " extra_rsem_prepare_reference_args" - echo " type: string" - echo " default: --star" - echo " Extra arguments to pass to rsem-prepare-reference command in addition to" - echo " defaults defined by the pipeline." - echo "" - echo " extra_rsem_calculate_expression_args" + echo " --extra_rsem_calculate_expression_args" echo " type: string" echo " default: --star --star-output-genome-bam --star-gzipped-read-file" echo "--estimate-rspd --seed 1" @@ -594,38 +588,38 @@ function ViashHelp { echo "Output:" echo " --output_fasta" echo " type: file, output, file must exist" - echo " default: genome/reference_genome.fasta" + echo " default: reference/genome.fasta" echo "" echo " --output_gtf" echo " type: file, output, file must exist" - echo " default: genome/gene_annotation.gtf" + echo " default: reference/gene_annotation.gtf" echo "" echo " --output_transcript_fasta" echo " type: file, output, file must exist" - echo " default: genome/transcriptome.fasta" + echo " default: reference/transcriptome.fasta" echo "" echo " --output_gene_bed" echo " type: file, output, file must exist" - echo " default: genome/gene_annotation.bed" + echo " default: reference/gene_annotation.bed" echo "" echo " --output_star_index" echo " type: file, output, file must exist" - echo " default: genome/index/STAR" + echo " default: reference/index/STAR" echo " Path to STAR index." echo "" echo " --output_salmon_index" echo " type: file, output, file must exist" - echo " default: genome/index/Salmon" + echo " default: reference/index/Salmon" echo " Path to Salmon index." echo "" echo " --output_bbsplit_index" echo " type: file, output, file must exist" - echo " default: genome/index/BBSplit" + echo " default: reference/index/BBSplit" echo " Path to BBSplit index." echo "" echo " --output_kallisto_index" echo " type: file, output, file must exist" - echo " default: genome/index/Kallisto" + echo " default: reference/index/Kallisto" echo " Path to Kallisto index." echo "" echo " --output_fastq_1" @@ -658,14 +652,6 @@ function ViashHelp { echo " default: fastqc_raw/\$id.read_2.fastqc.zip" echo " FastQC report archive for read 2." echo "" - echo " --trim_log_1" - echo " type: file, output" - echo " default: trimgalore/\$id.read_1.trimming_report.txt" - echo "" - echo " --trim_log_2" - echo " type: file, output" - echo " default: trimgalore/\$id.read_2.trimming_report.txt" - echo "" echo " --trim_html_1" echo " type: file, output" echo " default: fastqc_trim/\$id.read_1.trimmed_fastqc.html" @@ -682,6 +668,24 @@ function ViashHelp { echo " type: file, output" echo " default: fastqc_trim/\$id.read_2.trimmed_fastqc.zip" echo "" + echo " --trim_log_1" + echo " type: file, output" + echo " default: trimgalore/\$id.read_1.trimming_report.txt" + echo "" + echo " --trim_log_2" + echo " type: file, output" + echo " default: trimgalore/\$id.read_2.trimming_report.txt" + echo "" + echo " --fastp_trim_json" + echo " type: file, output, file must exist" + echo " default: fastp/\$id_out.json" + echo " The fastp json format report file name" + echo "" + echo " --fastp_trim_html" + echo " type: file, output, file must exist" + echo " default: fastp/\$id_out.html" + echo " The fastp html format report file name" + echo "" echo " --sortmerna_log" echo " type: file, output" echo " default: sortmerna/\$id.log" @@ -689,15 +693,23 @@ function ViashHelp { echo "" echo " --star_alignment" echo " type: file, output, file must exist" - echo " default: STAR_alignment/\$id" + echo " default: STAR/\$id" echo "" echo " --genome_bam_sorted" echo " type: file, output, file must exist" - echo " default: STAR_alignment/genome_processed/\$id.genome.bam" + echo " default: STAR/genome_processed/\$id.genome.bam" echo "" echo " --genome_bam_index" echo " type: file, output, file must exist" - echo " default: STAR_alignment/genome_processed/\$id.genome.bam.bai" + echo " default: STAR/genome_processed/\$id.genome.bam.bai" + echo "" + echo " --transcriptome_bam" + echo " type: file, output, file must exist" + echo " default: STAR/transcriptome_processed/\$id.transcriptome.bam" + echo "" + echo " --transcriptome_bam_index" + echo " type: file, output, file must exist" + echo " default: STAR/transcriptome_processed/\$id.transcriptome.bam.bai" echo "" echo " --genome_bam_stats" echo " type: file, output, file must exist" @@ -711,15 +723,6 @@ function ViashHelp { echo " type: file, output, file must exist" echo " default: samtools_stats/\$id.genome.idxstats" echo "" - echo " --transcriptome_bam" - echo " type: file, output, file must exist" - echo " default: STAR_alignment/transcriptome_processed/\$id.transcriptome.bam" - echo "" - echo " --transcriptome_bam_index" - echo " type: file, output, file must exist" - echo " default:" - echo "STAR_alignment/transcriptome_processed/\$id.transcriptome.bam.bai" - echo "" echo " --transcriptome_bam_stats" echo " type: file, output, file must exist" echo " default: samtools_stats/\$id.transcriptome.stats" @@ -734,39 +737,72 @@ function ViashHelp { echo "" echo " --salmon_quant_results" echo " type: file, output, file must exist" - echo " default: salmon/\$id" + echo " default: STAR_Salmon/\$id" + echo "" + echo " --salmon_quant_results_file" + echo " type: file, output, file must exist" + echo " default: STAR_Salmon/\$id/quant.sf" + echo "" + echo " --pseudo_quant_results" + echo " type: file, output, file must exist" + echo " default: Pseudo_align_quant/\$id" + echo "" + echo " --rsem_counts_gene" + echo " type: file, output, file must exist" + echo " default: RSEM/\$id.genes.results" + echo " Expression counts on gene level" + echo "" + echo " --rsem_counts_transcripts" + echo " type: file, output, file must exist" + echo " default: RSEM/\$id.isoforms.results" + echo " Expression counts on transcript level" + echo "" + echo " --bam_star_rsem" + echo " type: file, output, file must exist" + echo " default: RSEM/\$id.STAR.genome.bam" + echo " BAM file generated by STAR (from RSEM)" + echo "" + echo " --bam_genome_rsem" + echo " type: file, output, file must exist" + echo " default: RSEM/\$id.genome.bam" + echo " Genome BAM file (from RSEM)" + echo "" + echo " --bam_transcript_rsem" + echo " type: file, output, file must exist" + echo " default: RSEM/\$id.transcript.bam" + echo " Transcript BAM file (from RSEM)" echo "" echo " --tpm_gene" echo " type: file, output, file must exist" - echo " default: salmon/gene_tpm.tsv" + echo " default: transcript_quantification/gene_tpm.tsv" echo "" echo " --counts_gene" echo " type: file, output, file must exist" - echo " default: salmon/gene_counts.tsv" + echo " default: transcript_quantification/gene_counts.tsv" echo "" echo " --counts_gene_length_scaled" echo " type: file, output, file must exist" - echo " default: salmon/gene_counts_length_scaled.tsv" + echo " default: transcript_quantification/gene_counts_length_scaled.tsv" echo "" echo " --counts_gene_scaled" echo " type: file, output, file must exist" - echo " default: salmon/gene_counts_scaled.tsv" + echo " default: transcript_quantification/gene_counts_scaled.tsv" echo "" echo " --tpm_transcript" echo " type: file, output, file must exist" - echo " default: salmon/transcript_tpm.tsv" + echo " default: transcript_quantification/transcript_tpm.tsv" echo "" echo " --counts_transcript" echo " type: file, output, file must exist" - echo " default: salmon/transcript_counts.tsv" + echo " default: transcript_quantification/transcript_counts.tsv" echo "" - echo " --salmon_merged_summarizedexperiment" + echo " --quant_merged_summarizedexperiment" echo " type: file, output, file must exist" - echo " default: salmon/summarizedexperiment" + echo " default: transcript_quantification/summarizedexperiment" echo "" echo " --markduplicates_metrics" echo " type: file, output, file must exist" - echo " default: picard/\$id.sorted.MarkDuplicates.metrics.txt" + echo " default: picard/\$id.MarkDuplicates.metrics.txt" echo "" echo " --stringtie_transcript_gtf" echo " type: file, output, file must exist" @@ -1005,8 +1041,30 @@ function ViashHelp { echo " --multiqc_versions" echo " type: file, output, file must exist" echo "" - echo " --versions" - echo " type: file, output" + echo " --pseudo_counts_gene" + echo " type: file, output, file must exist" + echo " default: pseudo_alignment_quantification/gene_counts.tsv" + echo "" + echo " --pseudo_counts_gene_length_scaled" + echo " type: file, output, file must exist" + echo " default: pseudo_alignment_quantification/gene_counts_length_scaled.tsv" + echo "" + echo " --pseudo_counts_gene_scaled" + echo " type: file, output, file must exist" + echo " default: pseudo_alignment_quantification/gene_counts_scaled.tsv" + echo "" + echo " --pseudo_tpm_transcript" + echo " type: file, output, file must exist" + echo " default: pseudo_alignment_quantification/transcript_tpm.tsv" + echo "" + echo " --pseudo_counts_transcript" + echo " type: file, output, file must exist" + echo " default: pseudo_alignment_quantification/transcript_counts.tsv" + echo "" + echo " --pseudo_quant_merged_summarizedexperiment" + echo " type: file, output, file must exist" + echo " default:" + echo "pseudo_alignment_quantification/quant_merged_summarizedexperiment" } # initialise variables @@ -1551,6 +1609,17 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_SKIP_PSEUDO_ALIGNMENT=true shift 1 ;; + --extra_rsem_calculate_expression_args) + [ -n "$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS" ] && ViashError Bad arguments for option \'--extra_rsem_calculate_expression_args\': \'$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --extra_rsem_calculate_expression_args. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --extra_rsem_calculate_expression_args=*) + [ -n "$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS" ] && ViashError Bad arguments for option \'--extra_rsem_calculate_expression_args=*\': \'$VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS=$(ViashRemoveFlags "$1") + shift 1 + ;; --skip_fastqc) [ -n "$VIASH_PAR_SKIP_FASTQC" ] && ViashError Bad arguments for option \'--skip_fastqc\': \'$VIASH_PAR_SKIP_FASTQC\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_SKIP_FASTQC="$2" @@ -1938,28 +2007,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_FASTQC_ZIP_2=$(ViashRemoveFlags "$1") shift 1 ;; - --trim_log_1) - [ -n "$VIASH_PAR_TRIM_LOG_1" ] && ViashError Bad arguments for option \'--trim_log_1\': \'$VIASH_PAR_TRIM_LOG_1\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRIM_LOG_1="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_log_1. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --trim_log_1=*) - [ -n "$VIASH_PAR_TRIM_LOG_1" ] && ViashError Bad arguments for option \'--trim_log_1=*\': \'$VIASH_PAR_TRIM_LOG_1\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRIM_LOG_1=$(ViashRemoveFlags "$1") - shift 1 - ;; - --trim_log_2) - [ -n "$VIASH_PAR_TRIM_LOG_2" ] && ViashError Bad arguments for option \'--trim_log_2\': \'$VIASH_PAR_TRIM_LOG_2\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRIM_LOG_2="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_log_2. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --trim_log_2=*) - [ -n "$VIASH_PAR_TRIM_LOG_2" ] && ViashError Bad arguments for option \'--trim_log_2=*\': \'$VIASH_PAR_TRIM_LOG_2\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRIM_LOG_2=$(ViashRemoveFlags "$1") - shift 1 - ;; --trim_html_1) [ -n "$VIASH_PAR_TRIM_HTML_1" ] && ViashError Bad arguments for option \'--trim_html_1\': \'$VIASH_PAR_TRIM_HTML_1\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_TRIM_HTML_1="$2" @@ -2004,6 +2051,50 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_TRIM_ZIP_2=$(ViashRemoveFlags "$1") shift 1 ;; + --trim_log_1) + [ -n "$VIASH_PAR_TRIM_LOG_1" ] && ViashError Bad arguments for option \'--trim_log_1\': \'$VIASH_PAR_TRIM_LOG_1\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_LOG_1="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_log_1. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --trim_log_1=*) + [ -n "$VIASH_PAR_TRIM_LOG_1" ] && ViashError Bad arguments for option \'--trim_log_1=*\': \'$VIASH_PAR_TRIM_LOG_1\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_LOG_1=$(ViashRemoveFlags "$1") + shift 1 + ;; + --trim_log_2) + [ -n "$VIASH_PAR_TRIM_LOG_2" ] && ViashError Bad arguments for option \'--trim_log_2\': \'$VIASH_PAR_TRIM_LOG_2\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_LOG_2="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --trim_log_2. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --trim_log_2=*) + [ -n "$VIASH_PAR_TRIM_LOG_2" ] && ViashError Bad arguments for option \'--trim_log_2=*\': \'$VIASH_PAR_TRIM_LOG_2\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRIM_LOG_2=$(ViashRemoveFlags "$1") + shift 1 + ;; + --fastp_trim_json) + [ -n "$VIASH_PAR_FASTP_TRIM_JSON" ] && ViashError Bad arguments for option \'--fastp_trim_json\': \'$VIASH_PAR_FASTP_TRIM_JSON\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_FASTP_TRIM_JSON="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --fastp_trim_json. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --fastp_trim_json=*) + [ -n "$VIASH_PAR_FASTP_TRIM_JSON" ] && ViashError Bad arguments for option \'--fastp_trim_json=*\': \'$VIASH_PAR_FASTP_TRIM_JSON\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_FASTP_TRIM_JSON=$(ViashRemoveFlags "$1") + shift 1 + ;; + --fastp_trim_html) + [ -n "$VIASH_PAR_FASTP_TRIM_HTML" ] && ViashError Bad arguments for option \'--fastp_trim_html\': \'$VIASH_PAR_FASTP_TRIM_HTML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_FASTP_TRIM_HTML="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --fastp_trim_html. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --fastp_trim_html=*) + [ -n "$VIASH_PAR_FASTP_TRIM_HTML" ] && ViashError Bad arguments for option \'--fastp_trim_html=*\': \'$VIASH_PAR_FASTP_TRIM_HTML\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_FASTP_TRIM_HTML=$(ViashRemoveFlags "$1") + shift 1 + ;; --sortmerna_log) [ -n "$VIASH_PAR_SORTMERNA_LOG" ] && ViashError Bad arguments for option \'--sortmerna_log\': \'$VIASH_PAR_SORTMERNA_LOG\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_SORTMERNA_LOG="$2" @@ -2048,6 +2139,28 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_GENOME_BAM_INDEX=$(ViashRemoveFlags "$1") shift 1 ;; + --transcriptome_bam) + [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && ViashError Bad arguments for option \'--transcriptome_bam\': \'$VIASH_PAR_TRANSCRIPTOME_BAM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRANSCRIPTOME_BAM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --transcriptome_bam. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --transcriptome_bam=*) + [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && ViashError Bad arguments for option \'--transcriptome_bam=*\': \'$VIASH_PAR_TRANSCRIPTOME_BAM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRANSCRIPTOME_BAM=$(ViashRemoveFlags "$1") + shift 1 + ;; + --transcriptome_bam_index) + [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && ViashError Bad arguments for option \'--transcriptome_bam_index\': \'$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRANSCRIPTOME_BAM_INDEX="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --transcriptome_bam_index. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --transcriptome_bam_index=*) + [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && ViashError Bad arguments for option \'--transcriptome_bam_index=*\': \'$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_TRANSCRIPTOME_BAM_INDEX=$(ViashRemoveFlags "$1") + shift 1 + ;; --genome_bam_stats) [ -n "$VIASH_PAR_GENOME_BAM_STATS" ] && ViashError Bad arguments for option \'--genome_bam_stats\': \'$VIASH_PAR_GENOME_BAM_STATS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_GENOME_BAM_STATS="$2" @@ -2081,28 +2194,6 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_GENOME_BAM_IDXSTATS=$(ViashRemoveFlags "$1") shift 1 ;; - --transcriptome_bam) - [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && ViashError Bad arguments for option \'--transcriptome_bam\': \'$VIASH_PAR_TRANSCRIPTOME_BAM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRANSCRIPTOME_BAM="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --transcriptome_bam. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --transcriptome_bam=*) - [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && ViashError Bad arguments for option \'--transcriptome_bam=*\': \'$VIASH_PAR_TRANSCRIPTOME_BAM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRANSCRIPTOME_BAM=$(ViashRemoveFlags "$1") - shift 1 - ;; - --transcriptome_bam_index) - [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && ViashError Bad arguments for option \'--transcriptome_bam_index\': \'$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRANSCRIPTOME_BAM_INDEX="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --transcriptome_bam_index. Use "--help" to get more information on the parameters. && exit 1 - shift 2 - ;; - --transcriptome_bam_index=*) - [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && ViashError Bad arguments for option \'--transcriptome_bam_index=*\': \'$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_TRANSCRIPTOME_BAM_INDEX=$(ViashRemoveFlags "$1") - shift 1 - ;; --transcriptome_bam_stats) [ -n "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS" ] && ViashError Bad arguments for option \'--transcriptome_bam_stats\': \'$VIASH_PAR_TRANSCRIPTOME_BAM_STATS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_TRANSCRIPTOME_BAM_STATS="$2" @@ -2147,6 +2238,83 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_SALMON_QUANT_RESULTS=$(ViashRemoveFlags "$1") shift 1 ;; + --salmon_quant_results_file) + [ -n "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE" ] && ViashError Bad arguments for option \'--salmon_quant_results_file\': \'$VIASH_PAR_SALMON_QUANT_RESULTS_FILE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_SALMON_QUANT_RESULTS_FILE="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --salmon_quant_results_file. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --salmon_quant_results_file=*) + [ -n "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE" ] && ViashError Bad arguments for option \'--salmon_quant_results_file=*\': \'$VIASH_PAR_SALMON_QUANT_RESULTS_FILE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_SALMON_QUANT_RESULTS_FILE=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_quant_results) + [ -n "$VIASH_PAR_PSEUDO_QUANT_RESULTS" ] && ViashError Bad arguments for option \'--pseudo_quant_results\': \'$VIASH_PAR_PSEUDO_QUANT_RESULTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_QUANT_RESULTS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_quant_results. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_quant_results=*) + [ -n "$VIASH_PAR_PSEUDO_QUANT_RESULTS" ] && ViashError Bad arguments for option \'--pseudo_quant_results=*\': \'$VIASH_PAR_PSEUDO_QUANT_RESULTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_QUANT_RESULTS=$(ViashRemoveFlags "$1") + shift 1 + ;; + --rsem_counts_gene) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_counts_gene. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_counts_gene=*) + [ -n "$VIASH_PAR_RSEM_COUNTS_GENE" ] && ViashError Bad arguments for option \'--rsem_counts_gene=*\': \'$VIASH_PAR_RSEM_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_GENE=$(ViashRemoveFlags "$1") + shift 1 + ;; + --rsem_counts_transcripts) + [ -n "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--rsem_counts_transcripts\': \'$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --rsem_counts_transcripts. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --rsem_counts_transcripts=*) + [ -n "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && ViashError Bad arguments for option \'--rsem_counts_transcripts=*\': \'$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_star_rsem) + [ -n "$VIASH_PAR_BAM_STAR_RSEM" ] && ViashError Bad arguments for option \'--bam_star_rsem\': \'$VIASH_PAR_BAM_STAR_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_STAR_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_star_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_star_rsem=*) + [ -n "$VIASH_PAR_BAM_STAR_RSEM" ] && ViashError Bad arguments for option \'--bam_star_rsem=*\': \'$VIASH_PAR_BAM_STAR_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_STAR_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_genome_rsem) + [ -n "$VIASH_PAR_BAM_GENOME_RSEM" ] && ViashError Bad arguments for option \'--bam_genome_rsem\': \'$VIASH_PAR_BAM_GENOME_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_GENOME_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_genome_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_genome_rsem=*) + [ -n "$VIASH_PAR_BAM_GENOME_RSEM" ] && ViashError Bad arguments for option \'--bam_genome_rsem=*\': \'$VIASH_PAR_BAM_GENOME_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_GENOME_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; + --bam_transcript_rsem) + [ -n "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && ViashError Bad arguments for option \'--bam_transcript_rsem\': \'$VIASH_PAR_BAM_TRANSCRIPT_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_TRANSCRIPT_RSEM="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --bam_transcript_rsem. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --bam_transcript_rsem=*) + [ -n "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && ViashError Bad arguments for option \'--bam_transcript_rsem=*\': \'$VIASH_PAR_BAM_TRANSCRIPT_RSEM\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_BAM_TRANSCRIPT_RSEM=$(ViashRemoveFlags "$1") + shift 1 + ;; --tpm_gene) [ -n "$VIASH_PAR_TPM_GENE" ] && ViashError Bad arguments for option \'--tpm_gene\': \'$VIASH_PAR_TPM_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 VIASH_PAR_TPM_GENE="$2" @@ -2213,15 +2381,15 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_COUNTS_TRANSCRIPT=$(ViashRemoveFlags "$1") shift 1 ;; - --salmon_merged_summarizedexperiment) - [ -n "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--salmon_merged_summarizedexperiment\': \'$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --salmon_merged_summarizedexperiment. Use "--help" to get more information on the parameters. && exit 1 + --quant_merged_summarizedexperiment) + [ -n "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--quant_merged_summarizedexperiment\': \'$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --quant_merged_summarizedexperiment. Use "--help" to get more information on the parameters. && exit 1 shift 2 ;; - --salmon_merged_summarizedexperiment=*) - [ -n "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--salmon_merged_summarizedexperiment=*\': \'$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT=$(ViashRemoveFlags "$1") + --quant_merged_summarizedexperiment=*) + [ -n "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--quant_merged_summarizedexperiment=*\': \'$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT=$(ViashRemoveFlags "$1") shift 1 ;; --markduplicates_metrics) @@ -2785,15 +2953,70 @@ while [[ $# -gt 0 ]]; do VIASH_PAR_MULTIQC_VERSIONS=$(ViashRemoveFlags "$1") shift 1 ;; - --versions) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS="$2" - [ $# -lt 2 ] && ViashError Not enough arguments passed to --versions. Use "--help" to get more information on the parameters. && exit 1 + --pseudo_counts_gene) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE" ] && ViashError Bad arguments for option \'--pseudo_counts_gene\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_counts_gene. Use "--help" to get more information on the parameters. && exit 1 shift 2 ;; - --versions=*) - [ -n "$VIASH_PAR_VERSIONS" ] && ViashError Bad arguments for option \'--versions=*\': \'$VIASH_PAR_VERSIONS\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 - VIASH_PAR_VERSIONS=$(ViashRemoveFlags "$1") + --pseudo_counts_gene=*) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE" ] && ViashError Bad arguments for option \'--pseudo_counts_gene=*\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_counts_gene_length_scaled) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED" ] && ViashError Bad arguments for option \'--pseudo_counts_gene_length_scaled\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_counts_gene_length_scaled. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_counts_gene_length_scaled=*) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED" ] && ViashError Bad arguments for option \'--pseudo_counts_gene_length_scaled=*\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_counts_gene_scaled) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED" ] && ViashError Bad arguments for option \'--pseudo_counts_gene_scaled\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_counts_gene_scaled. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_counts_gene_scaled=*) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED" ] && ViashError Bad arguments for option \'--pseudo_counts_gene_scaled=*\': \'$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_tpm_transcript) + [ -n "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT" ] && ViashError Bad arguments for option \'--pseudo_tpm_transcript\': \'$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_TPM_TRANSCRIPT="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_tpm_transcript. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_tpm_transcript=*) + [ -n "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT" ] && ViashError Bad arguments for option \'--pseudo_tpm_transcript=*\': \'$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_TPM_TRANSCRIPT=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_counts_transcript) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT" ] && ViashError Bad arguments for option \'--pseudo_counts_transcript\': \'$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_counts_transcript. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_counts_transcript=*) + [ -n "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT" ] && ViashError Bad arguments for option \'--pseudo_counts_transcript=*\': \'$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT=$(ViashRemoveFlags "$1") + shift 1 + ;; + --pseudo_quant_merged_summarizedexperiment) + [ -n "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--pseudo_quant_merged_summarizedexperiment\': \'$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT="$2" + [ $# -lt 2 ] && ViashError Not enough arguments passed to --pseudo_quant_merged_summarizedexperiment. Use "--help" to get more information on the parameters. && exit 1 + shift 2 + ;; + --pseudo_quant_merged_summarizedexperiment=*) + [ -n "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && ViashError Bad arguments for option \'--pseudo_quant_merged_summarizedexperiment=*\': \'$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1 + VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT=$(ViashRemoveFlags "$1") shift 1 ;; ---engine) @@ -2899,14 +3122,6 @@ fi # storing leftover values in positionals -if [[ $# -gt 0 ]]; then - VIASH_PAR_EXTRA_RSEM_PREPARE_REFERENCE_ARGS="$1" - shift 1 -fi -if [[ $# -gt 0 ]]; then - VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS="$1" - shift 1 -fi if [[ $# -gt 0 ]]; then VIASH_PAR_SKIP_DUPRADAR="$1" shift 1 @@ -3043,9 +3258,6 @@ fi if [ -z ${VIASH_PAR_SKIP_PSEUDO_ALIGNMENT+x} ]; then VIASH_PAR_SKIP_PSEUDO_ALIGNMENT="false" fi -if [ -z ${VIASH_PAR_EXTRA_RSEM_PREPARE_REFERENCE_ARGS+x} ]; then - VIASH_PAR_EXTRA_RSEM_PREPARE_REFERENCE_ARGS="--star" -fi if [ -z ${VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS+x} ]; then VIASH_PAR_EXTRA_RSEM_CALCULATE_EXPRESSION_ARGS="--star --star-output-genome-bam --star-gzipped-read-file --estimate-rspd --seed 1" fi @@ -3131,28 +3343,28 @@ if [ -z ${VIASH_PAR_MULTIQC_METHODS_DESCRIPTION+x} ]; then VIASH_PAR_MULTIQC_METHODS_DESCRIPTION="assets/methods_description_template.yml" fi if [ -z ${VIASH_PAR_OUTPUT_FASTA+x} ]; then - VIASH_PAR_OUTPUT_FASTA="genome/reference_genome.fasta" + VIASH_PAR_OUTPUT_FASTA="reference/genome.fasta" fi if [ -z ${VIASH_PAR_OUTPUT_GTF+x} ]; then - VIASH_PAR_OUTPUT_GTF="genome/gene_annotation.gtf" + VIASH_PAR_OUTPUT_GTF="reference/gene_annotation.gtf" fi if [ -z ${VIASH_PAR_OUTPUT_TRANSCRIPT_FASTA+x} ]; then - VIASH_PAR_OUTPUT_TRANSCRIPT_FASTA="genome/transcriptome.fasta" + VIASH_PAR_OUTPUT_TRANSCRIPT_FASTA="reference/transcriptome.fasta" fi if [ -z ${VIASH_PAR_OUTPUT_GENE_BED+x} ]; then - VIASH_PAR_OUTPUT_GENE_BED="genome/gene_annotation.bed" + VIASH_PAR_OUTPUT_GENE_BED="reference/gene_annotation.bed" fi if [ -z ${VIASH_PAR_OUTPUT_STAR_INDEX+x} ]; then - VIASH_PAR_OUTPUT_STAR_INDEX="genome/index/STAR" + VIASH_PAR_OUTPUT_STAR_INDEX="reference/index/STAR" fi if [ -z ${VIASH_PAR_OUTPUT_SALMON_INDEX+x} ]; then - VIASH_PAR_OUTPUT_SALMON_INDEX="genome/index/Salmon" + VIASH_PAR_OUTPUT_SALMON_INDEX="reference/index/Salmon" fi if [ -z ${VIASH_PAR_OUTPUT_BBSPLIT_INDEX+x} ]; then - VIASH_PAR_OUTPUT_BBSPLIT_INDEX="genome/index/BBSplit" + VIASH_PAR_OUTPUT_BBSPLIT_INDEX="reference/index/BBSplit" fi if [ -z ${VIASH_PAR_OUTPUT_KALLISTO_INDEX+x} ]; then - VIASH_PAR_OUTPUT_KALLISTO_INDEX="genome/index/Kallisto" + VIASH_PAR_OUTPUT_KALLISTO_INDEX="reference/index/Kallisto" fi if [ -z ${VIASH_PAR_OUTPUT_FASTQ_1+x} ]; then VIASH_PAR_OUTPUT_FASTQ_1="fastq/\$id.read_1.fastq" @@ -3172,12 +3384,6 @@ fi if [ -z ${VIASH_PAR_FASTQC_ZIP_2+x} ]; then VIASH_PAR_FASTQC_ZIP_2="fastqc_raw/\$id.read_2.fastqc.zip" fi -if [ -z ${VIASH_PAR_TRIM_LOG_1+x} ]; then - VIASH_PAR_TRIM_LOG_1="trimgalore/\$id.read_1.trimming_report.txt" -fi -if [ -z ${VIASH_PAR_TRIM_LOG_2+x} ]; then - VIASH_PAR_TRIM_LOG_2="trimgalore/\$id.read_2.trimming_report.txt" -fi if [ -z ${VIASH_PAR_TRIM_HTML_1+x} ]; then VIASH_PAR_TRIM_HTML_1="fastqc_trim/\$id.read_1.trimmed_fastqc.html" fi @@ -3190,17 +3396,35 @@ fi if [ -z ${VIASH_PAR_TRIM_ZIP_2+x} ]; then VIASH_PAR_TRIM_ZIP_2="fastqc_trim/\$id.read_2.trimmed_fastqc.zip" fi +if [ -z ${VIASH_PAR_TRIM_LOG_1+x} ]; then + VIASH_PAR_TRIM_LOG_1="trimgalore/\$id.read_1.trimming_report.txt" +fi +if [ -z ${VIASH_PAR_TRIM_LOG_2+x} ]; then + VIASH_PAR_TRIM_LOG_2="trimgalore/\$id.read_2.trimming_report.txt" +fi +if [ -z ${VIASH_PAR_FASTP_TRIM_JSON+x} ]; then + VIASH_PAR_FASTP_TRIM_JSON="fastp/\$id_out.json" +fi +if [ -z ${VIASH_PAR_FASTP_TRIM_HTML+x} ]; then + VIASH_PAR_FASTP_TRIM_HTML="fastp/\$id_out.html" +fi if [ -z ${VIASH_PAR_SORTMERNA_LOG+x} ]; then VIASH_PAR_SORTMERNA_LOG="sortmerna/\$id.log" fi if [ -z ${VIASH_PAR_STAR_ALIGNMENT+x} ]; then - VIASH_PAR_STAR_ALIGNMENT="STAR_alignment/\$id" + VIASH_PAR_STAR_ALIGNMENT="STAR/\$id" fi if [ -z ${VIASH_PAR_GENOME_BAM_SORTED+x} ]; then - VIASH_PAR_GENOME_BAM_SORTED="STAR_alignment/genome_processed/\$id.genome.bam" + VIASH_PAR_GENOME_BAM_SORTED="STAR/genome_processed/\$id.genome.bam" fi if [ -z ${VIASH_PAR_GENOME_BAM_INDEX+x} ]; then - VIASH_PAR_GENOME_BAM_INDEX="STAR_alignment/genome_processed/\$id.genome.bam.bai" + VIASH_PAR_GENOME_BAM_INDEX="STAR/genome_processed/\$id.genome.bam.bai" +fi +if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM+x} ]; then + VIASH_PAR_TRANSCRIPTOME_BAM="STAR/transcriptome_processed/\$id.transcriptome.bam" +fi +if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM_INDEX+x} ]; then + VIASH_PAR_TRANSCRIPTOME_BAM_INDEX="STAR/transcriptome_processed/\$id.transcriptome.bam.bai" fi if [ -z ${VIASH_PAR_GENOME_BAM_STATS+x} ]; then VIASH_PAR_GENOME_BAM_STATS="samtools_stats/\$id.genome.stats" @@ -3211,12 +3435,6 @@ fi if [ -z ${VIASH_PAR_GENOME_BAM_IDXSTATS+x} ]; then VIASH_PAR_GENOME_BAM_IDXSTATS="samtools_stats/\$id.genome.idxstats" fi -if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM+x} ]; then - VIASH_PAR_TRANSCRIPTOME_BAM="STAR_alignment/transcriptome_processed/\$id.transcriptome.bam" -fi -if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM_INDEX+x} ]; then - VIASH_PAR_TRANSCRIPTOME_BAM_INDEX="STAR_alignment/transcriptome_processed/\$id.transcriptome.bam.bai" -fi if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM_STATS+x} ]; then VIASH_PAR_TRANSCRIPTOME_BAM_STATS="samtools_stats/\$id.transcriptome.stats" fi @@ -3227,31 +3445,52 @@ if [ -z ${VIASH_PAR_TRANSCRIPTOME_BAM_IDXSTATS+x} ]; then VIASH_PAR_TRANSCRIPTOME_BAM_IDXSTATS="samtools_stats/\$id.transcriptome.idxstats" fi if [ -z ${VIASH_PAR_SALMON_QUANT_RESULTS+x} ]; then - VIASH_PAR_SALMON_QUANT_RESULTS="salmon/\$id" + VIASH_PAR_SALMON_QUANT_RESULTS="STAR_Salmon/\$id" +fi +if [ -z ${VIASH_PAR_SALMON_QUANT_RESULTS_FILE+x} ]; then + VIASH_PAR_SALMON_QUANT_RESULTS_FILE="STAR_Salmon/\$id/quant.sf" +fi +if [ -z ${VIASH_PAR_PSEUDO_QUANT_RESULTS+x} ]; then + VIASH_PAR_PSEUDO_QUANT_RESULTS="Pseudo_align_quant/\$id" +fi +if [ -z ${VIASH_PAR_RSEM_COUNTS_GENE+x} ]; then + VIASH_PAR_RSEM_COUNTS_GENE="RSEM/\$id.genes.results" +fi +if [ -z ${VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS+x} ]; then + VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS="RSEM/\$id.isoforms.results" +fi +if [ -z ${VIASH_PAR_BAM_STAR_RSEM+x} ]; then + VIASH_PAR_BAM_STAR_RSEM="RSEM/\$id.STAR.genome.bam" +fi +if [ -z ${VIASH_PAR_BAM_GENOME_RSEM+x} ]; then + VIASH_PAR_BAM_GENOME_RSEM="RSEM/\$id.genome.bam" +fi +if [ -z ${VIASH_PAR_BAM_TRANSCRIPT_RSEM+x} ]; then + VIASH_PAR_BAM_TRANSCRIPT_RSEM="RSEM/\$id.transcript.bam" fi if [ -z ${VIASH_PAR_TPM_GENE+x} ]; then - VIASH_PAR_TPM_GENE="salmon/gene_tpm.tsv" + VIASH_PAR_TPM_GENE="transcript_quantification/gene_tpm.tsv" fi if [ -z ${VIASH_PAR_COUNTS_GENE+x} ]; then - VIASH_PAR_COUNTS_GENE="salmon/gene_counts.tsv" + VIASH_PAR_COUNTS_GENE="transcript_quantification/gene_counts.tsv" fi if [ -z ${VIASH_PAR_COUNTS_GENE_LENGTH_SCALED+x} ]; then - VIASH_PAR_COUNTS_GENE_LENGTH_SCALED="salmon/gene_counts_length_scaled.tsv" + VIASH_PAR_COUNTS_GENE_LENGTH_SCALED="transcript_quantification/gene_counts_length_scaled.tsv" fi if [ -z ${VIASH_PAR_COUNTS_GENE_SCALED+x} ]; then - VIASH_PAR_COUNTS_GENE_SCALED="salmon/gene_counts_scaled.tsv" + VIASH_PAR_COUNTS_GENE_SCALED="transcript_quantification/gene_counts_scaled.tsv" fi if [ -z ${VIASH_PAR_TPM_TRANSCRIPT+x} ]; then - VIASH_PAR_TPM_TRANSCRIPT="salmon/transcript_tpm.tsv" + VIASH_PAR_TPM_TRANSCRIPT="transcript_quantification/transcript_tpm.tsv" fi if [ -z ${VIASH_PAR_COUNTS_TRANSCRIPT+x} ]; then - VIASH_PAR_COUNTS_TRANSCRIPT="salmon/transcript_counts.tsv" + VIASH_PAR_COUNTS_TRANSCRIPT="transcript_quantification/transcript_counts.tsv" fi -if [ -z ${VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT+x} ]; then - VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT="salmon/summarizedexperiment" +if [ -z ${VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT+x} ]; then + VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT="transcript_quantification/summarizedexperiment" fi if [ -z ${VIASH_PAR_MARKDUPLICATES_METRICS+x} ]; then - VIASH_PAR_MARKDUPLICATES_METRICS="picard/\$id.sorted.MarkDuplicates.metrics.txt" + VIASH_PAR_MARKDUPLICATES_METRICS="picard/\$id.MarkDuplicates.metrics.txt" fi if [ -z ${VIASH_PAR_STRINGTIE_TRANSCRIPT_GTF+x} ]; then VIASH_PAR_STRINGTIE_TRANSCRIPT_GTF="stringtie/\$id.transcripts.gtf" @@ -3400,6 +3639,24 @@ fi if [ -z ${VIASH_PAR_MULTIQC_PLOTS+x} ]; then VIASH_PAR_MULTIQC_PLOTS="multiqc/multiqc_plots" fi +if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE+x} ]; then + VIASH_PAR_PSEUDO_COUNTS_GENE="pseudo_alignment_quantification/gene_counts.tsv" +fi +if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED+x} ]; then + VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED="pseudo_alignment_quantification/gene_counts_length_scaled.tsv" +fi +if [ -z ${VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED+x} ]; then + VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED="pseudo_alignment_quantification/gene_counts_scaled.tsv" +fi +if [ -z ${VIASH_PAR_PSEUDO_TPM_TRANSCRIPT+x} ]; then + VIASH_PAR_PSEUDO_TPM_TRANSCRIPT="pseudo_alignment_quantification/transcript_tpm.tsv" +fi +if [ -z ${VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT+x} ]; then + VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT="pseudo_alignment_quantification/transcript_counts.tsv" +fi +if [ -z ${VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT+x} ]; then + VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT="pseudo_alignment_quantification/quant_merged_summarizedexperiment" +fi # check whether required files exist if [ ! -z "$VIASH_PAR_FASTQ_1" ]; then @@ -3889,12 +4146,6 @@ fi if [ ! -z "$VIASH_PAR_FASTQC_ZIP_2" ] && [ ! -d "$(dirname "$VIASH_PAR_FASTQC_ZIP_2")" ]; then mkdir -p "$(dirname "$VIASH_PAR_FASTQC_ZIP_2")" fi -if [ ! -z "$VIASH_PAR_TRIM_LOG_1" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_LOG_1")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_TRIM_LOG_1")" -fi -if [ ! -z "$VIASH_PAR_TRIM_LOG_2" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_LOG_2")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_TRIM_LOG_2")" -fi if [ ! -z "$VIASH_PAR_TRIM_HTML_1" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_HTML_1")" ]; then mkdir -p "$(dirname "$VIASH_PAR_TRIM_HTML_1")" fi @@ -3907,6 +4158,18 @@ fi if [ ! -z "$VIASH_PAR_TRIM_ZIP_2" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_ZIP_2")" ]; then mkdir -p "$(dirname "$VIASH_PAR_TRIM_ZIP_2")" fi +if [ ! -z "$VIASH_PAR_TRIM_LOG_1" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_LOG_1")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRIM_LOG_1")" +fi +if [ ! -z "$VIASH_PAR_TRIM_LOG_2" ] && [ ! -d "$(dirname "$VIASH_PAR_TRIM_LOG_2")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRIM_LOG_2")" +fi +if [ ! -z "$VIASH_PAR_FASTP_TRIM_JSON" ] && [ ! -d "$(dirname "$VIASH_PAR_FASTP_TRIM_JSON")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_FASTP_TRIM_JSON")" +fi +if [ ! -z "$VIASH_PAR_FASTP_TRIM_HTML" ] && [ ! -d "$(dirname "$VIASH_PAR_FASTP_TRIM_HTML")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_FASTP_TRIM_HTML")" +fi if [ ! -z "$VIASH_PAR_SORTMERNA_LOG" ] && [ ! -d "$(dirname "$VIASH_PAR_SORTMERNA_LOG")" ]; then mkdir -p "$(dirname "$VIASH_PAR_SORTMERNA_LOG")" fi @@ -3919,6 +4182,12 @@ fi if [ ! -z "$VIASH_PAR_GENOME_BAM_INDEX" ] && [ ! -d "$(dirname "$VIASH_PAR_GENOME_BAM_INDEX")" ]; then mkdir -p "$(dirname "$VIASH_PAR_GENOME_BAM_INDEX")" fi +if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && [ ! -d "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM")" +fi +if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && [ ! -d "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX")" +fi if [ ! -z "$VIASH_PAR_GENOME_BAM_STATS" ] && [ ! -d "$(dirname "$VIASH_PAR_GENOME_BAM_STATS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_GENOME_BAM_STATS")" fi @@ -3928,12 +4197,6 @@ fi if [ ! -z "$VIASH_PAR_GENOME_BAM_IDXSTATS" ] && [ ! -d "$(dirname "$VIASH_PAR_GENOME_BAM_IDXSTATS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_GENOME_BAM_IDXSTATS")" fi -if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && [ ! -d "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM")" -fi -if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && [ ! -d "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX")" -fi if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS" ] && [ ! -d "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS")" fi @@ -3946,6 +4209,27 @@ fi if [ ! -z "$VIASH_PAR_SALMON_QUANT_RESULTS" ] && [ ! -d "$(dirname "$VIASH_PAR_SALMON_QUANT_RESULTS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_SALMON_QUANT_RESULTS")" fi +if [ ! -z "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE" ] && [ ! -d "$(dirname "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_QUANT_RESULTS" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_QUANT_RESULTS")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_QUANT_RESULTS")" +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_GENE" ] && [ ! -d "$(dirname "$VIASH_PAR_RSEM_COUNTS_GENE")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_RSEM_COUNTS_GENE")" +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && [ ! -d "$(dirname "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS")" +fi +if [ ! -z "$VIASH_PAR_BAM_STAR_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_STAR_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_STAR_RSEM")" +fi +if [ ! -z "$VIASH_PAR_BAM_GENOME_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_GENOME_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_GENOME_RSEM")" +fi +if [ ! -z "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && [ ! -d "$(dirname "$VIASH_PAR_BAM_TRANSCRIPT_RSEM")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_BAM_TRANSCRIPT_RSEM")" +fi if [ ! -z "$VIASH_PAR_TPM_GENE" ] && [ ! -d "$(dirname "$VIASH_PAR_TPM_GENE")" ]; then mkdir -p "$(dirname "$VIASH_PAR_TPM_GENE")" fi @@ -3964,8 +4248,8 @@ fi if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPT" ] && [ ! -d "$(dirname "$VIASH_PAR_COUNTS_TRANSCRIPT")" ]; then mkdir -p "$(dirname "$VIASH_PAR_COUNTS_TRANSCRIPT")" fi -if [ ! -z "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -d "$(dirname "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT")" +if [ ! -z "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -d "$(dirname "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT")" fi if [ ! -z "$VIASH_PAR_MARKDUPLICATES_METRICS" ] && [ ! -d "$(dirname "$VIASH_PAR_MARKDUPLICATES_METRICS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_MARKDUPLICATES_METRICS")" @@ -4120,8 +4404,23 @@ fi if [ ! -z "$VIASH_PAR_MULTIQC_VERSIONS" ] && [ ! -d "$(dirname "$VIASH_PAR_MULTIQC_VERSIONS")" ]; then mkdir -p "$(dirname "$VIASH_PAR_MULTIQC_VERSIONS")" fi -if [ ! -z "$VIASH_PAR_VERSIONS" ] && [ ! -d "$(dirname "$VIASH_PAR_VERSIONS")" ]; then - mkdir -p "$(dirname "$VIASH_PAR_VERSIONS")" +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT")" +fi +if [ ! -z "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -d "$(dirname "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT")" ]; then + mkdir -p "$(dirname "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT")" fi if [ "$VIASH_ENGINE_ID" == "native" ] ; then @@ -4185,27 +4484,27 @@ workflow run_wf { | map { list -> [ "ref", - [ fasta: list[1][-1].fasta, - gtf: list[1][-1].gtf, - gff: list[1][-1].gff, - additional_fasta: list[1][-1].additional_fasta, - transcript_fasta: list[1][-1].transcript_fasta, - gene_bed: list[1][-1].gene_bed, - bbsplit_fasta_list: list[1][-1].bbsplit_fasta_list, - aligner: list[1][-1].aligner, - pseudo_aligner: list[1][-1].pseudo_aligner, - star_index: list[1][-1].star_index, - rsem_index: list[1][-1].rsem_index, - salmon_index: list[1][-1].salmon_index, - kallisto_index: list[1][-1].kallisto_index, - // splicesites: list[1][-1].splicesites, - // hisat2_index: list[1][-1].hisat2_index, - bbsplit_index: list[1][-1].bbsplit_index, - skip_bbsplit: list[1][-1].skip_bbsplit, - gencode: list[1][-1].gencode, - biotype: list[1][-1].biotype, - filter_gtf: list[1][-1].filter_gtf, - pseudo_aligner_kmer_size: list[1][-1].pseudo_aligner_kmer_size ] + [ fasta: list.collect { id, state -> state.fasta }.unique()[0], + gtf: list.collect { id, state -> state.gtf }.unique()[0], + gff: list.collect { id, state -> state.gff }.unique()[0], + additional_fasta: list.collect { id, state -> state.additional_fasta }.unique()[0], + transcript_fasta:list.collect { id, state -> state.transcript_fasta }.unique()[0], + gene_bed: list.collect { id, state -> state.gene_bed }.unique()[0], + bbsplit_fasta_list: list.collect { id, state -> state.bbsplit_fasta_list }.unique()[0], + aligner: list.collect { id, state -> state.aligner }.unique()[0], + pseudo_aligner: list.collect { id, state -> state.pseudo_aligner }.unique()[0], + star_index: list.collect { id, state -> state.star_index }.unique()[0], + rsem_index: list.collect { id, state -> state.rsem_index }.unique()[0], + salmon_index: list.collect { id, state -> state.salmon_index }.unique()[0], + kallisto_index: list.collect { id, state -> state.kallisto_index }.unique()[0], + // splicesites: list.collect { id, state -> state.splicesites }.unique()[0], + // hisat2_index: list.collect { id, state -> state.hisat2_index }.unique()[0], + bbsplit_index: list.collect { id, state -> state.bbsplit_index }.unique()[0], + skip_bbsplit: list.collect { id, state -> state.skip_bbsplit }.unique()[0], + gencode: list.collect { id, state -> state.gencode }.unique()[0], + biotype: list.collect { id, state -> state.biotype }.unique()[0], + filter_gtf: list.collect { id, state -> state.filter_gtf }.unique()[0], + pseudo_aligner_kmer_size: list.collect { id, state -> state.pseudo_aligner_kmer_size }.unique()[0] ] ] } @@ -4376,11 +4675,14 @@ workflow run_wf { "gtf_group_features": "gtf_group_features", "gtf_extra_attributes": "gtf_extra_attributes", "salmon_quant_libtype": "salmon_quant_libtype", - "salmon_index": "salmon_index" + "salmon_index": "salmon_index", + "extra_rsem_calculate_expression_args": "extra_rsem_calculate_expression_args" ], toState: [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", + "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -4392,7 +4694,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) @@ -4402,7 +4708,7 @@ workflow run_wf { def passed_mapping = (percent_mapped >= state.min_mapped_reads) ? true : false [ id, state + [percent_mapped: percent_mapped, passed_mapping: passed_mapping] ] } - + // Pseudo-alignment and quantification | pseudo_alignment_and_quant.run ( runIf: { id, state -> !state.skip_pseudo_alignment && state.passed_trimmed_reads }, @@ -4494,16 +4800,23 @@ workflow run_wf { "skip_align": "skip_alignment", "skip_pseudo_align": "skip_pseudo_alignment", "gtf": "gtf", + "num_trimmed_reads": "num_trimmed_reads", + "passed_trimmed_reads": "passed_trimmed_reads", + "passed_mapping": "passed_mapping", + "percent_mapped": "percent_mapped", "genome_bam": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "quant_out_dir": "quant_out_dir", + "salmon_multiqc": "salmon_multiqc", "quant_results_file": "quant_results_file", + "rsem_multiqc": "rsem_multiqc", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "pseudo_multiqc": "pseudo_multiqc", "pseudo_quant_out_dir": "pseudo_quant_out_dir", "pseudo_salmon_quant_results_file": "pseudo_salmon_quant_results_file", "pseudo_kallisto_quant_results_file": "pseudo_kallisto_quant_results_file", "aligner": "aligner", "pseudo_aligner": "pseudo_aligner", - "pseudo_multiqc": "pseudo_multiqc", "gene_bed": "gene_bed", "extra_preseq_args": "extra_preseq_args", "extra_featurecounts_args": "extra_featurecounts_args", @@ -4531,11 +4844,7 @@ workflow run_wf { "genome_bam_flagstat": "genome_bam_flagstat", "genome_bam_idxstats": "genome_bam_idxstats", "markduplicates_multiqc": "markduplicates_metrics", - "rseqc_modules": "rseqc_modules", - "num_trimmed_reads": "num_trimmed_reads", - "passed_trimmed_reads": "passed_trimmed_reads", - "passed_mapping": "passed_mapping", - "percent_mapped": "percent_mapped" + "rseqc_modules": "rseqc_modules" ], toState: [ "preseq_output": "preseq_output", @@ -4581,7 +4890,7 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment", + "qunat_merged_summarizedexperiment": "quant_merged_summarizedexperiment", "deseq2_output": "deseq2_output", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", @@ -4620,15 +4929,17 @@ workflow run_wf { "star_alignment": "star_alignment", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "genome_bam_stats": "samtools_stats", - "genome_bam_flagstat": "samtools_flagstat", - "genome_bam_idxstats": "samtools_idxstats", + "genome_bam_stats": "genome_bam_stats", + "genome_bam_flagstat": "genome_bam_flagstat", + "genome_bam_idxstats": "genome_bam_idxstats", "transcriptome_bam": "transcriptome_bam", "transcriptome_bam_index": "transcriptome_bam_index", "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": "quant_out_dir", + "pseudo_quant_results": "pseudo_quant_out_dir", + "markduplicates_metrics": "markduplicates_metrics", "stringtie_transcript_gtf": "stringtie_transcript_gtf", "stringtie_coverage_gtf": "stringtie_coverage_gtf", "stringtie_abundance": "stringtie_abundance", @@ -4694,8 +5005,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) @@ -4774,7 +5084,7 @@ def getFastpReadsAfterFiltering(json_file) { } // -// Function that parses and returns the alignment rate from the STAR log output +// Function that parses and returns the alignment rate from the STAR log outputs // def getStarPercentMapped(align_log) { def percent_aligned = 0 @@ -4827,6 +5137,14 @@ if [ ! -z "$VIASH_PAR_OUTPUT_KALLISTO_INDEX" ] && [ ! -e "$VIASH_PAR_OUTPUT_KALL ViashError "Output file '$VIASH_PAR_OUTPUT_KALLISTO_INDEX' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_FASTP_TRIM_JSON" ] && [ ! -e "$VIASH_PAR_FASTP_TRIM_JSON" ]; then + ViashError "Output file '$VIASH_PAR_FASTP_TRIM_JSON' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_FASTP_TRIM_HTML" ] && [ ! -e "$VIASH_PAR_FASTP_TRIM_HTML" ]; then + ViashError "Output file '$VIASH_PAR_FASTP_TRIM_HTML' does not exist." + exit 1 +fi if [ ! -z "$VIASH_PAR_STAR_ALIGNMENT" ] && [ ! -e "$VIASH_PAR_STAR_ALIGNMENT" ]; then ViashError "Output file '$VIASH_PAR_STAR_ALIGNMENT' does not exist." exit 1 @@ -4839,6 +5157,14 @@ if [ ! -z "$VIASH_PAR_GENOME_BAM_INDEX" ] && [ ! -e "$VIASH_PAR_GENOME_BAM_INDEX ViashError "Output file '$VIASH_PAR_GENOME_BAM_INDEX' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && [ ! -e "$VIASH_PAR_TRANSCRIPTOME_BAM" ]; then + ViashError "Output file '$VIASH_PAR_TRANSCRIPTOME_BAM' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && [ ! -e "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ]; then + ViashError "Output file '$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX' does not exist." + exit 1 +fi if [ ! -z "$VIASH_PAR_GENOME_BAM_STATS" ] && [ ! -e "$VIASH_PAR_GENOME_BAM_STATS" ]; then ViashError "Output file '$VIASH_PAR_GENOME_BAM_STATS' does not exist." exit 1 @@ -4851,14 +5177,6 @@ if [ ! -z "$VIASH_PAR_GENOME_BAM_IDXSTATS" ] && [ ! -e "$VIASH_PAR_GENOME_BAM_ID ViashError "Output file '$VIASH_PAR_GENOME_BAM_IDXSTATS' does not exist." exit 1 fi -if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM" ] && [ ! -e "$VIASH_PAR_TRANSCRIPTOME_BAM" ]; then - ViashError "Output file '$VIASH_PAR_TRANSCRIPTOME_BAM' does not exist." - exit 1 -fi -if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ] && [ ! -e "$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX" ]; then - ViashError "Output file '$VIASH_PAR_TRANSCRIPTOME_BAM_INDEX' does not exist." - exit 1 -fi if [ ! -z "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS" ] && [ ! -e "$VIASH_PAR_TRANSCRIPTOME_BAM_STATS" ]; then ViashError "Output file '$VIASH_PAR_TRANSCRIPTOME_BAM_STATS' does not exist." exit 1 @@ -4875,6 +5193,34 @@ if [ ! -z "$VIASH_PAR_SALMON_QUANT_RESULTS" ] && [ ! -e "$VIASH_PAR_SALMON_QUANT ViashError "Output file '$VIASH_PAR_SALMON_QUANT_RESULTS' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE" ] && [ ! -e "$VIASH_PAR_SALMON_QUANT_RESULTS_FILE" ]; then + ViashError "Output file '$VIASH_PAR_SALMON_QUANT_RESULTS_FILE' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_QUANT_RESULTS" ] && [ ! -e "$VIASH_PAR_PSEUDO_QUANT_RESULTS" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_QUANT_RESULTS' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_GENE" ] && [ ! -e "$VIASH_PAR_RSEM_COUNTS_GENE" ]; then + ViashError "Output file '$VIASH_PAR_RSEM_COUNTS_GENE' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ] && [ ! -e "$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS" ]; then + ViashError "Output file '$VIASH_PAR_RSEM_COUNTS_TRANSCRIPTS' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_STAR_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_STAR_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_STAR_RSEM' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_GENOME_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_GENOME_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_GENOME_RSEM' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ] && [ ! -e "$VIASH_PAR_BAM_TRANSCRIPT_RSEM" ]; then + ViashError "Output file '$VIASH_PAR_BAM_TRANSCRIPT_RSEM' does not exist." + exit 1 +fi if [ ! -z "$VIASH_PAR_TPM_GENE" ] && [ ! -e "$VIASH_PAR_TPM_GENE" ]; then ViashError "Output file '$VIASH_PAR_TPM_GENE' does not exist." exit 1 @@ -4899,8 +5245,8 @@ if [ ! -z "$VIASH_PAR_COUNTS_TRANSCRIPT" ] && [ ! -e "$VIASH_PAR_COUNTS_TRANSCRI ViashError "Output file '$VIASH_PAR_COUNTS_TRANSCRIPT' does not exist." exit 1 fi -if [ ! -z "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -e "$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT" ]; then - ViashError "Output file '$VIASH_PAR_SALMON_MERGED_SUMMARIZEDEXPERIMENT' does not exist." +if [ ! -z "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -e "$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ]; then + ViashError "Output file '$VIASH_PAR_QUANT_MERGED_SUMMARIZEDEXPERIMENT' does not exist." exit 1 fi if [ ! -z "$VIASH_PAR_MARKDUPLICATES_METRICS" ] && [ ! -e "$VIASH_PAR_MARKDUPLICATES_METRICS" ]; then @@ -5075,6 +5421,30 @@ if [ ! -z "$VIASH_PAR_MULTIQC_VERSIONS" ] && [ ! -e "$VIASH_PAR_MULTIQC_VERSIONS ViashError "Output file '$VIASH_PAR_MULTIQC_VERSIONS' does not exist." exit 1 fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE" ] && [ ! -e "$VIASH_PAR_PSEUDO_COUNTS_GENE" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_COUNTS_GENE' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED" ] && [ ! -e "$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_COUNTS_GENE_LENGTH_SCALED' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED" ] && [ ! -e "$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_COUNTS_GENE_SCALED' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT" ] && [ ! -e "$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_TPM_TRANSCRIPT' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT" ] && [ ! -e "$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_COUNTS_TRANSCRIPT' does not exist." + exit 1 +fi +if [ ! -z "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ] && [ ! -e "$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT" ]; then + ViashError "Output file '$VIASH_PAR_PSEUDO_QUANT_MERGED_SUMMARIZEDEXPERIMENT' does not exist." + exit 1 +fi exit 0 diff --git a/target/nextflow/bbmap_bbsplit/.config.vsh.yaml b/target/nextflow/bbmap_bbsplit/.config.vsh.yaml index 33d70df..58336eb 100644 --- a/target/nextflow/bbmap_bbsplit/.config.vsh.yaml +++ b/target/nextflow/bbmap_bbsplit/.config.vsh.yaml @@ -238,8 +238,8 @@ build_info: output: "target/nextflow/bbmap_bbsplit" executable: "target/nextflow/bbmap_bbsplit/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/bbmap_bbsplit/main.nf b/target/nextflow/bbmap_bbsplit/main.nf index a6da168..5a8b993 100644 --- a/target/nextflow/bbmap_bbsplit/main.nf +++ b/target/nextflow/bbmap_bbsplit/main.nf @@ -3104,8 +3104,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/bbmap_bbsplit", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/bedtools_genomecov/.config.vsh.yaml b/target/nextflow/bedtools_genomecov/.config.vsh.yaml index 0207914..a8ba404 100644 --- a/target/nextflow/bedtools_genomecov/.config.vsh.yaml +++ b/target/nextflow/bedtools_genomecov/.config.vsh.yaml @@ -178,8 +178,8 @@ build_info: output: "target/nextflow/bedtools_genomecov" executable: "target/nextflow/bedtools_genomecov/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/bedtools_genomecov/main.nf b/target/nextflow/bedtools_genomecov/main.nf index 1e4c561..baacec5 100644 --- a/target/nextflow/bedtools_genomecov/main.nf +++ b/target/nextflow/bedtools_genomecov/main.nf @@ -3031,8 +3031,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/bedtools_genomecov", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/cat_additional_fasta/.config.vsh.yaml b/target/nextflow/cat_additional_fasta/.config.vsh.yaml index cb8671a..7996df6 100644 --- a/target/nextflow/cat_additional_fasta/.config.vsh.yaml +++ b/target/nextflow/cat_additional_fasta/.config.vsh.yaml @@ -182,8 +182,8 @@ build_info: output: "target/nextflow/cat_additional_fasta" executable: "target/nextflow/cat_additional_fasta/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/cat_additional_fasta/main.nf b/target/nextflow/cat_additional_fasta/main.nf index 441b4fb..6d16023 100644 --- a/target/nextflow/cat_additional_fasta/main.nf +++ b/target/nextflow/cat_additional_fasta/main.nf @@ -3032,8 +3032,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/cat_additional_fasta", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/cat_fastq/.config.vsh.yaml b/target/nextflow/cat_fastq/.config.vsh.yaml index 3e39bec..c53e9f7 100644 --- a/target/nextflow/cat_fastq/.config.vsh.yaml +++ b/target/nextflow/cat_fastq/.config.vsh.yaml @@ -30,7 +30,7 @@ argument_groups: description: "Concatenated read 1 fastq" info: null default: - - "$id.read_1.merged.fastq" + - "$id_r1.fastq" must_exist: true create_parent: true required: false @@ -42,7 +42,7 @@ argument_groups: description: "Concatenated read 2 fastq" info: null default: - - "$id.read_2.merged.fastq" + - "$id_r2.fastq" must_exist: false create_parent: true required: false @@ -169,8 +169,8 @@ build_info: output: "target/nextflow/cat_fastq" executable: "target/nextflow/cat_fastq/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/cat_fastq/main.nf b/target/nextflow/cat_fastq/main.nf index 17f2230..f88157f 100644 --- a/target/nextflow/cat_fastq/main.nf +++ b/target/nextflow/cat_fastq/main.nf @@ -2842,7 +2842,7 @@ meta = [ "name" : "--fastq_1", "description" : "Concatenated read 1 fastq", "default" : [ - "$id.read_1.merged.fastq" + "$id_r1.fastq" ], "must_exist" : true, "create_parent" : true, @@ -2856,7 +2856,7 @@ meta = [ "name" : "--fastq_2", "description" : "Concatenated read 2 fastq", "default" : [ - "$id.read_2.merged.fastq" + "$id_r2.fastq" ], "must_exist" : false, "create_parent" : true, @@ -3023,8 +3023,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/cat_fastq", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/deseq2_qc/.config.vsh.yaml b/target/nextflow/deseq2_qc/.config.vsh.yaml index afc3df5..af85432 100644 --- a/target/nextflow/deseq2_qc/.config.vsh.yaml +++ b/target/nextflow/deseq2_qc/.config.vsh.yaml @@ -237,8 +237,8 @@ build_info: output: "target/nextflow/deseq2_qc" executable: "target/nextflow/deseq2_qc/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/deseq2_qc/main.nf b/target/nextflow/deseq2_qc/main.nf index 4b35d37..eaef2ff 100644 --- a/target/nextflow/deseq2_qc/main.nf +++ b/target/nextflow/deseq2_qc/main.nf @@ -3110,8 +3110,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/deseq2_qc", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/dupradar/.config.vsh.yaml b/target/nextflow/dupradar/.config.vsh.yaml index 20d4598..fb73433 100644 --- a/target/nextflow/dupradar/.config.vsh.yaml +++ b/target/nextflow/dupradar/.config.vsh.yaml @@ -266,8 +266,8 @@ build_info: output: "target/nextflow/dupradar" executable: "target/nextflow/dupradar/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/dupradar/main.nf b/target/nextflow/dupradar/main.nf index 29c67aa..1c22cd0 100644 --- a/target/nextflow/dupradar/main.nf +++ b/target/nextflow/dupradar/main.nf @@ -3136,8 +3136,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/dupradar", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/fastqc/.config.vsh.yaml b/target/nextflow/fastqc/.config.vsh.yaml index 035421f..e896689 100644 --- a/target/nextflow/fastqc/.config.vsh.yaml +++ b/target/nextflow/fastqc/.config.vsh.yaml @@ -198,8 +198,8 @@ build_info: output: "target/nextflow/fastqc" executable: "target/nextflow/fastqc/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/fastqc/main.nf b/target/nextflow/fastqc/main.nf index a01299d..82e14ba 100644 --- a/target/nextflow/fastqc/main.nf +++ b/target/nextflow/fastqc/main.nf @@ -3056,8 +3056,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/fastqc", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3166,13 +3166,15 @@ fastqc -o \\$tmpdir \\${input[*]} file1=\\$(basename -- "\\${input[0]}") read1="\\${file1%.fastq*}" -file2=\\$(basename -- "\\${input[1]}") -read2="\\${file2%.fastq*}" - [[ -e "\\${tmpdir}/\\${read1}_fastqc.html" ]] && cp "\\${tmpdir}/\\${read1}_fastqc.html" \\$par_fastqc_html_1 -[[ -e "\\${tmpdir}/\\${read2}_fastqc.html" ]] && cp "\\${tmpdir}/\\${read2}_fastqc.html" \\$par_fastqc_html_2 [[ -e "\\${tmpdir}/\\${read1}_fastqc.zip" ]] && cp "\\${tmpdir}/\\${read1}_fastqc.zip" \\$par_fastqc_zip_1 -[[ -e "\\${tmpdir}/\\${read2}_fastqc.zip" ]] && cp "\\${tmpdir}/\\${read2}_fastqc.zip" \\$par_fastqc_zip_2 + +if \\$par_paired; then + file2=\\$(basename -- "\\${input[1]}") + read2="\\${file2%.fastq*}" + [[ -e "\\${tmpdir}/\\${read2}_fastqc.html" ]] && cp "\\${tmpdir}/\\${read2}_fastqc.html" \\$par_fastqc_html_2 + [[ -e "\\${tmpdir}/\\${read2}_fastqc.zip" ]] && cp "\\${tmpdir}/\\${read2}_fastqc.zip" \\$par_fastqc_zip_2 +fi VIASHMAIN bash "$tempscript" ''' diff --git a/target/nextflow/fq_subsample/.config.vsh.yaml b/target/nextflow/fq_subsample/.config.vsh.yaml index 552ae85..b58b9ea 100644 --- a/target/nextflow/fq_subsample/.config.vsh.yaml +++ b/target/nextflow/fq_subsample/.config.vsh.yaml @@ -177,8 +177,8 @@ build_info: output: "target/nextflow/fq_subsample" executable: "target/nextflow/fq_subsample/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/fq_subsample/main.nf b/target/nextflow/fq_subsample/main.nf index 64a3f87..c88f9c3 100644 --- a/target/nextflow/fq_subsample/main.nf +++ b/target/nextflow/fq_subsample/main.nf @@ -3027,8 +3027,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/fq_subsample", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/getchromsizes/.config.vsh.yaml b/target/nextflow/getchromsizes/.config.vsh.yaml index 2d726cc..9abe4e5 100644 --- a/target/nextflow/getchromsizes/.config.vsh.yaml +++ b/target/nextflow/getchromsizes/.config.vsh.yaml @@ -167,8 +167,8 @@ build_info: output: "target/nextflow/getchromsizes" executable: "target/nextflow/getchromsizes/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/getchromsizes/main.nf b/target/nextflow/getchromsizes/main.nf index 808374e..dc90cd8 100644 --- a/target/nextflow/getchromsizes/main.nf +++ b/target/nextflow/getchromsizes/main.nf @@ -3013,8 +3013,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/getchromsizes", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/gtf2bed/.config.vsh.yaml b/target/nextflow/gtf2bed/.config.vsh.yaml index fa20291..d4ba96a 100644 --- a/target/nextflow/gtf2bed/.config.vsh.yaml +++ b/target/nextflow/gtf2bed/.config.vsh.yaml @@ -145,8 +145,8 @@ build_info: output: "target/nextflow/gtf2bed" executable: "target/nextflow/gtf2bed/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/gtf2bed/main.nf b/target/nextflow/gtf2bed/main.nf index 85cd58b..3ef4070 100644 --- a/target/nextflow/gtf2bed/main.nf +++ b/target/nextflow/gtf2bed/main.nf @@ -2995,8 +2995,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/gtf2bed", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/gtf_filter/.config.vsh.yaml b/target/nextflow/gtf_filter/.config.vsh.yaml index 1ad0607..46b22c6 100644 --- a/target/nextflow/gtf_filter/.config.vsh.yaml +++ b/target/nextflow/gtf_filter/.config.vsh.yaml @@ -155,8 +155,8 @@ build_info: output: "target/nextflow/gtf_filter" executable: "target/nextflow/gtf_filter/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/gtf_filter/main.nf b/target/nextflow/gtf_filter/main.nf index 963a628..b876cef 100644 --- a/target/nextflow/gtf_filter/main.nf +++ b/target/nextflow/gtf_filter/main.nf @@ -3003,8 +3003,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/gtf_filter", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/gunzip/.config.vsh.yaml b/target/nextflow/gunzip/.config.vsh.yaml index cfde6ac..df04e35 100644 --- a/target/nextflow/gunzip/.config.vsh.yaml +++ b/target/nextflow/gunzip/.config.vsh.yaml @@ -144,8 +144,8 @@ build_info: output: "target/nextflow/gunzip" executable: "target/nextflow/gunzip/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/gunzip/main.nf b/target/nextflow/gunzip/main.nf index fbd2a90..398f951 100644 --- a/target/nextflow/gunzip/main.nf +++ b/target/nextflow/gunzip/main.nf @@ -2992,8 +2992,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/gunzip", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/kallisto/kallisto_index/.config.vsh.yaml b/target/nextflow/kallisto/kallisto_index/.config.vsh.yaml index 818ab98..eec3a34 100644 --- a/target/nextflow/kallisto/kallisto_index/.config.vsh.yaml +++ b/target/nextflow/kallisto/kallisto_index/.config.vsh.yaml @@ -155,8 +155,8 @@ build_info: output: "target/nextflow/kallisto/kallisto_index" executable: "target/nextflow/kallisto/kallisto_index/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/kallisto/kallisto_index/main.nf b/target/nextflow/kallisto/kallisto_index/main.nf index 19ac654..d30b9ca 100644 --- a/target/nextflow/kallisto/kallisto_index/main.nf +++ b/target/nextflow/kallisto/kallisto_index/main.nf @@ -3002,8 +3002,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/kallisto/kallisto_index", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/kallisto/kallisto_quant/.config.vsh.yaml b/target/nextflow/kallisto/kallisto_quant/.config.vsh.yaml index 18ae671..f0ff052 100644 --- a/target/nextflow/kallisto/kallisto_quant/.config.vsh.yaml +++ b/target/nextflow/kallisto/kallisto_quant/.config.vsh.yaml @@ -253,8 +253,8 @@ build_info: output: "target/nextflow/kallisto/kallisto_quant" executable: "target/nextflow/kallisto/kallisto_quant/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/kallisto/kallisto_quant/main.nf b/target/nextflow/kallisto/kallisto_quant/main.nf index 8abdbd4..87f5106 100644 --- a/target/nextflow/kallisto/kallisto_quant/main.nf +++ b/target/nextflow/kallisto/kallisto_quant/main.nf @@ -3114,8 +3114,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/kallisto/kallisto_quant", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3223,16 +3223,7 @@ if [[ "\\$par_extra_args" != *"--fr-stranded"* ]] && [[ "\\$par_extra_args" != * fi mkdir -p \\$par_output -echo "kallisto quant \\\\ - \\${meta_cpus:+--threads \\$meta_cpus} \\\\ - --index \\$par_index \\\\ - \\${par_gtf:+--gtf \\$par_gtf} \\\\ - \\${par_chromosomes:+--chromosomes \\$par_chromosomes} \\\\ - \\$single_end_params \\\\ - \\$strandedness \\\\ - \\$par_extra_args \\\\ - -o \\$par_output \\\\ - \\${input[*]} 2> >(tee -a \\${par_output}/kallisto_quant.log >&2)" + kallisto quant \\\\ \\${meta_cpus:+--threads \\$meta_cpus} \\\\ --index \\$par_index \\\\ diff --git a/target/nextflow/multiqc_custom_biotype/.config.vsh.yaml b/target/nextflow/multiqc_custom_biotype/.config.vsh.yaml index 8086d24..6e4312b 100644 --- a/target/nextflow/multiqc_custom_biotype/.config.vsh.yaml +++ b/target/nextflow/multiqc_custom_biotype/.config.vsh.yaml @@ -170,8 +170,8 @@ build_info: output: "target/nextflow/multiqc_custom_biotype" executable: "target/nextflow/multiqc_custom_biotype/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/multiqc_custom_biotype/main.nf b/target/nextflow/multiqc_custom_biotype/main.nf index 03957b0..e1dc491 100644 --- a/target/nextflow/multiqc_custom_biotype/main.nf +++ b/target/nextflow/multiqc_custom_biotype/main.nf @@ -3020,8 +3020,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/multiqc_custom_biotype", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/picard_markduplicates/.config.vsh.yaml b/target/nextflow/picard_markduplicates/.config.vsh.yaml index 5611b63..2aa1a86 100644 --- a/target/nextflow/picard_markduplicates/.config.vsh.yaml +++ b/target/nextflow/picard_markduplicates/.config.vsh.yaml @@ -207,8 +207,8 @@ build_info: output: "target/nextflow/picard_markduplicates" executable: "target/nextflow/picard_markduplicates/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/picard_markduplicates/main.nf b/target/nextflow/picard_markduplicates/main.nf index ed870ec..e9ab878 100644 --- a/target/nextflow/picard_markduplicates/main.nf +++ b/target/nextflow/picard_markduplicates/main.nf @@ -3063,8 +3063,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/picard_markduplicates", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/prepare_multiqc_input/.config.vsh.yaml b/target/nextflow/prepare_multiqc_input/.config.vsh.yaml index 5038103..aab0543 100644 --- a/target/nextflow/prepare_multiqc_input/.config.vsh.yaml +++ b/target/nextflow/prepare_multiqc_input/.config.vsh.yaml @@ -409,8 +409,8 @@ build_info: output: "target/nextflow/prepare_multiqc_input" executable: "target/nextflow/prepare_multiqc_input/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/prepare_multiqc_input/main.nf b/target/nextflow/prepare_multiqc_input/main.nf index 5e0d835..2db2b7b 100644 --- a/target/nextflow/prepare_multiqc_input/main.nf +++ b/target/nextflow/prepare_multiqc_input/main.nf @@ -3277,8 +3277,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/prepare_multiqc_input", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3409,6 +3409,8 @@ IFS="," read -ra rsem_multiqc <<< \\$par_rsem_multiqc && for file in "\\${rsem_m IFS="," read -ra salmon_multiqc <<< \\$par_salmon_multiqc && for file in "\\${salmon_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done +IFS="," read -ra pseudo_multiqc <<< \\$par_pseudo_multiqc && for file in "\\${pseudo_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done + IFS="," read -ra samtools_stats <<< \\$par_samtools_stats && for file in "\\${samtools_stats[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" \\$par_output/; done IFS="," read -ra samtools_flagstat <<< \\$par_samtools_flagstat && for file in "\\${samtools_flagstat[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" \\$par_output/; done @@ -3417,12 +3419,9 @@ IFS="," read -ra samtools_idxstats <<< \\$par_samtools_idxstats && for file in " IFS="," read -ra markduplicates_multiqc <<< \\$par_markduplicates_multiqc && for file in "\\${markduplicates_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done -IFS="," read -ra pseudo_multiqc <<< \\$par_pseudo_multiqc && for file in "\\${pseudo_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done - - IFS="," read -ra featurecounts_multiqc <<< \\$par_featurecounts_multiqc && for file in "\\${featurecounts_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done -IFS="," read -ra featurecounts_rrna_multiqc <<< \\$par_featurecounts_rrna_multiqc&& for file in "\\${featurecounts_rrna_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done +IFS="," read -ra featurecounts_rrna_multiqc <<< \\$par_featurecounts_rrna_multiqc && for file in "\\${featurecounts_rrna_multiqc[@]}"; do [ -e "\\$file" ] && cp -r "\\$file" "\\$par_output/"; done [ -e "\\$par_aligner_pca_multiqc" ] && cp -r "\\$par_aligner_pca_multiqc" "\\$par_output/" diff --git a/target/nextflow/preprocess_transcripts_fasta/.config.vsh.yaml b/target/nextflow/preprocess_transcripts_fasta/.config.vsh.yaml index e430781..7e6958d 100644 --- a/target/nextflow/preprocess_transcripts_fasta/.config.vsh.yaml +++ b/target/nextflow/preprocess_transcripts_fasta/.config.vsh.yaml @@ -138,8 +138,8 @@ build_info: output: "target/nextflow/preprocess_transcripts_fasta" executable: "target/nextflow/preprocess_transcripts_fasta/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/preprocess_transcripts_fasta/main.nf b/target/nextflow/preprocess_transcripts_fasta/main.nf index b7b5280..c235488 100644 --- a/target/nextflow/preprocess_transcripts_fasta/main.nf +++ b/target/nextflow/preprocess_transcripts_fasta/main.nf @@ -2982,8 +2982,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/preprocess_transcripts_fasta", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/preseq_lcextrap/.config.vsh.yaml b/target/nextflow/preseq_lcextrap/.config.vsh.yaml index d4b8cd8..8310108 100644 --- a/target/nextflow/preseq_lcextrap/.config.vsh.yaml +++ b/target/nextflow/preseq_lcextrap/.config.vsh.yaml @@ -191,8 +191,8 @@ build_info: output: "target/nextflow/preseq_lcextrap" executable: "target/nextflow/preseq_lcextrap/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/preseq_lcextrap/main.nf b/target/nextflow/preseq_lcextrap/main.nf index ac51f5c..155c0f9 100644 --- a/target/nextflow/preseq_lcextrap/main.nf +++ b/target/nextflow/preseq_lcextrap/main.nf @@ -3035,8 +3035,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/preseq_lcextrap", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/qualimap/.config.vsh.yaml b/target/nextflow/qualimap/.config.vsh.yaml index e2d825d..006f995 100644 --- a/target/nextflow/qualimap/.config.vsh.yaml +++ b/target/nextflow/qualimap/.config.vsh.yaml @@ -271,8 +271,8 @@ build_info: output: "target/nextflow/qualimap" executable: "target/nextflow/qualimap/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/qualimap/main.nf b/target/nextflow/qualimap/main.nf index d79ee45..5bd600c 100644 --- a/target/nextflow/qualimap/main.nf +++ b/target/nextflow/qualimap/main.nf @@ -3144,8 +3144,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/qualimap", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rsem/rsem_calculate_expression/.config.vsh.yaml b/target/nextflow/rsem/rsem_calculate_expression/.config.vsh.yaml index 6d01064..0df5912 100644 --- a/target/nextflow/rsem/rsem_calculate_expression/.config.vsh.yaml +++ b/target/nextflow/rsem/rsem_calculate_expression/.config.vsh.yaml @@ -60,15 +60,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--versions" - info: null - must_exist: false - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - name: "Output" arguments: - type: "file" @@ -308,8 +299,8 @@ build_info: output: "target/nextflow/rsem/rsem_calculate_expression" executable: "target/nextflow/rsem/rsem_calculate_expression/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rsem/rsem_calculate_expression/main.nf b/target/nextflow/rsem/rsem_calculate_expression/main.nf index b061a82..69faf78 100644 --- a/target/nextflow/rsem/rsem_calculate_expression/main.nf +++ b/target/nextflow/rsem/rsem_calculate_expression/main.nf @@ -2873,16 +2873,6 @@ meta = [ "direction" : "input", "multiple" : false, "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--versions", - "must_exist" : false, - "create_parent" : true, - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" } ] }, @@ -3173,8 +3163,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rsem/rsem_calculate_expression", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3231,7 +3221,6 @@ $( if [ ! -z ${VIASH_PAR_PAIRED+x} ]; then echo "${VIASH_PAR_PAIRED}" | sed "s#' $( if [ ! -z ${VIASH_PAR_INPUT+x} ]; then echo "${VIASH_PAR_INPUT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_input='&'#" ; else echo "# par_input="; fi ) $( if [ ! -z ${VIASH_PAR_INDEX+x} ]; then echo "${VIASH_PAR_INDEX}" | sed "s#'#'\\"'\\"'#g;s#.*#par_index='&'#" ; else echo "# par_index="; fi ) $( if [ ! -z ${VIASH_PAR_EXTRA_ARGS+x} ]; then echo "${VIASH_PAR_EXTRA_ARGS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_extra_args='&'#" ; else echo "# par_extra_args="; fi ) -$( if [ ! -z ${VIASH_PAR_VERSIONS+x} ]; then echo "${VIASH_PAR_VERSIONS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_versions='&'#" ; else echo "# par_versions="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_GENE+x} ]; then echo "${VIASH_PAR_COUNTS_GENE}" | sed "s#'#'\\"'\\"'#g;s#.*#par_counts_gene='&'#" ; else echo "# par_counts_gene="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_TRANSCRIPTS+x} ]; then echo "${VIASH_PAR_COUNTS_TRANSCRIPTS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_counts_transcripts='&'#" ; else echo "# par_counts_transcripts="; fi ) $( if [ ! -z ${VIASH_PAR_STAT+x} ]; then echo "${VIASH_PAR_STAT}" | sed "s#'#'\\"'\\"'#g;s#.*#par_stat='&'#" ; else echo "# par_stat="; fi ) @@ -3280,10 +3269,10 @@ fi IFS="," read -ra input <<< \\$par_input -INDEX=\\`find -L \\$meta_resources_dir/ -name "*.grp" | sed 's/\\\\.grp\\$//'\\` +INDEX=\\`find -L \\$par_index/ -name "*.grp" | sed 's/\\\\.grp\\$//'\\` rsem-calculate-expression \\\\ - \\${meta_cpus:+--num-theads \\$meta_cpus} \\\\ + \\${meta_cpus:+--num-threads \\$meta_cpus} \\\\ \\$strandedness \\\\ \\${par_paired:+--paired-end} \\\\ \\$par_extra_args \\\\ @@ -3291,6 +3280,13 @@ rsem-calculate-expression \\\\ \\$INDEX \\\\ \\$par_id +[[ -e "\\${par_id}.genes.results" ]] && mv "\\${par_id}.genes.results" \\$par_counts_gene +[[ -e "\\${par_id}id.isoforms.results" ]] && mv "\\${par_id}id.isoforms.results" \\$par_counts_transcripts +[[ -e "\\${par_id}.stat" ]] && mv -r "\\${par_id}.stat" \\$par_stat +# [[ -e "\\${par_id}.log" ]] && mv "\\${par_id}.log" \\$par_logs +[[ -e "\\${par_id}.STAR.genome.bam" ]] && mv "\\${par_id}.STAR.genome.bam" \\$par_bam_star +[[ -e "\\${par_id}.genome.bam" ]] && mv "\\${par_id}.genome.bam" \\$par_bam_genome +[[ -e "\\${par_id}.transcript.bam" ]] && mv "\\${par_id}.transcript.bam" \\$par_bam_transcript VIASHMAIN bash "$tempscript" ''' diff --git a/target/nextflow/rsem/rsem_calculate_expression/nextflow_schema.json b/target/nextflow/rsem/rsem_calculate_expression/nextflow_schema.json index 8980420..968f94d 100644 --- a/target/nextflow/rsem/rsem_calculate_expression/nextflow_schema.json +++ b/target/nextflow/rsem/rsem_calculate_expression/nextflow_schema.json @@ -75,16 +75,6 @@ } - , - "versions": { - "type": - "string", - "description": "Type: `file`. ", - "help_text": "Type: `file`. " - - } - - } }, diff --git a/target/nextflow/rsem/rsem_merge_counts/.config.vsh.yaml b/target/nextflow/rsem/rsem_merge_counts/.config.vsh.yaml index d8237ab..1260b81 100644 --- a/target/nextflow/rsem/rsem_merge_counts/.config.vsh.yaml +++ b/target/nextflow/rsem/rsem_merge_counts/.config.vsh.yaml @@ -24,15 +24,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--versions" - info: null - must_exist: false - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - name: "Output" arguments: - type: "file" @@ -83,17 +74,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--updated_versions" - info: null - default: - - "versions.yml" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" resources: - type: "bash_script" path: "script.sh" @@ -202,8 +182,8 @@ build_info: output: "target/nextflow/rsem/rsem_merge_counts" executable: "target/nextflow/rsem/rsem_merge_counts/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rsem/rsem_merge_counts/main.nf b/target/nextflow/rsem/rsem_merge_counts/main.nf index 00da3ff..ae04731 100644 --- a/target/nextflow/rsem/rsem_merge_counts/main.nf +++ b/target/nextflow/rsem/rsem_merge_counts/main.nf @@ -2832,16 +2832,6 @@ meta = [ "direction" : "input", "multiple" : false, "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--versions", - "must_exist" : false, - "create_parent" : true, - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" } ] }, @@ -2903,19 +2893,6 @@ meta = [ "direction" : "output", "multiple" : false, "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--updated_versions", - "default" : [ - "versions.yml" - ], - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" } ] } @@ -3051,8 +3028,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rsem/rsem_merge_counts", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3105,12 +3082,10 @@ cat > "$tempscript" << VIASHMAIN # The following code has been auto-generated by Viash. $( if [ ! -z ${VIASH_PAR_COUNTS_GENE+x} ]; then echo "${VIASH_PAR_COUNTS_GENE}" | sed "s#'#'\\"'\\"'#g;s#.*#par_counts_gene='&'#" ; else echo "# par_counts_gene="; fi ) $( if [ ! -z ${VIASH_PAR_COUNTS_TRANSCRIPTS+x} ]; then echo "${VIASH_PAR_COUNTS_TRANSCRIPTS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_counts_transcripts='&'#" ; else echo "# par_counts_transcripts="; fi ) -$( if [ ! -z ${VIASH_PAR_VERSIONS+x} ]; then echo "${VIASH_PAR_VERSIONS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_versions='&'#" ; else echo "# par_versions="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_GENE_COUNTS+x} ]; then echo "${VIASH_PAR_MERGED_GENE_COUNTS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_merged_gene_counts='&'#" ; else echo "# par_merged_gene_counts="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_GENE_TPM+x} ]; then echo "${VIASH_PAR_MERGED_GENE_TPM}" | sed "s#'#'\\"'\\"'#g;s#.*#par_merged_gene_tpm='&'#" ; else echo "# par_merged_gene_tpm="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_TRANSCRIPT_COUNTS+x} ]; then echo "${VIASH_PAR_MERGED_TRANSCRIPT_COUNTS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_merged_transcript_counts='&'#" ; else echo "# par_merged_transcript_counts="; fi ) $( if [ ! -z ${VIASH_PAR_MERGED_TRANSCRIPT_TPM+x} ]; then echo "${VIASH_PAR_MERGED_TRANSCRIPT_TPM}" | sed "s#'#'\\"'\\"'#g;s#.*#par_merged_transcript_tpm='&'#" ; else echo "# par_merged_transcript_tpm="; fi ) -$( if [ ! -z ${VIASH_PAR_UPDATED_VERSIONS+x} ]; then echo "${VIASH_PAR_UPDATED_VERSIONS}" | sed "s#'#'\\"'\\"'#g;s#.*#par_updated_versions='&'#" ; else echo "# par_updated_versions="; fi ) $( if [ ! -z ${VIASH_META_NAME+x} ]; then echo "${VIASH_META_NAME}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_name='&'#" ; else echo "# meta_name="; fi ) $( if [ ! -z ${VIASH_META_FUNCTIONALITY_NAME+x} ]; then echo "${VIASH_META_FUNCTIONALITY_NAME}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_functionality_name='&'#" ; else echo "# meta_functionality_name="; fi ) $( if [ ! -z ${VIASH_META_RESOURCES_DIR+x} ]; then echo "${VIASH_META_RESOURCES_DIR}" | sed "s#'#'\\"'\\"'#g;s#.*#meta_resources_dir='&'#" ; else echo "# meta_resources_dir="; fi ) diff --git a/target/nextflow/rsem/rsem_merge_counts/nextflow_schema.json b/target/nextflow/rsem/rsem_merge_counts/nextflow_schema.json index 45daf59..6d8506c 100644 --- a/target/nextflow/rsem/rsem_merge_counts/nextflow_schema.json +++ b/target/nextflow/rsem/rsem_merge_counts/nextflow_schema.json @@ -33,16 +33,6 @@ } - , - "versions": { - "type": - "string", - "description": "Type: `file`. ", - "help_text": "Type: `file`. " - - } - - } }, @@ -97,17 +87,6 @@ } - , - "updated_versions": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.updated_versions.yml`. ", - "help_text": "Type: `file`, default: `$id.$key.updated_versions.yml`. " - , - "default": "$id.$key.updated_versions.yml" - } - - } }, diff --git a/target/nextflow/rseqc/rseqc_bamstat/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_bamstat/.config.vsh.yaml index 0e16cf4..edb53fb 100644 --- a/target/nextflow/rseqc/rseqc_bamstat/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_bamstat/.config.vsh.yaml @@ -163,8 +163,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_bamstat" executable: "target/nextflow/rseqc/rseqc_bamstat/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_bamstat/main.nf b/target/nextflow/rseqc/rseqc_bamstat/main.nf index df4c049..acc6d08 100644 --- a/target/nextflow/rseqc/rseqc_bamstat/main.nf +++ b/target/nextflow/rseqc/rseqc_bamstat/main.nf @@ -3016,8 +3016,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_bamstat", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_inferexperiment/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_inferexperiment/.config.vsh.yaml index 4e440d0..56c160a 100644 --- a/target/nextflow/rseqc/rseqc_inferexperiment/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_inferexperiment/.config.vsh.yaml @@ -186,8 +186,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_inferexperiment" executable: "target/nextflow/rseqc/rseqc_inferexperiment/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_inferexperiment/main.nf b/target/nextflow/rseqc/rseqc_inferexperiment/main.nf index 7471372..0aac828 100644 --- a/target/nextflow/rseqc/rseqc_inferexperiment/main.nf +++ b/target/nextflow/rseqc/rseqc_inferexperiment/main.nf @@ -3044,8 +3044,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_inferexperiment", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_innerdistance/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_innerdistance/.config.vsh.yaml index d634cef..30677e3 100644 --- a/target/nextflow/rseqc/rseqc_innerdistance/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_innerdistance/.config.vsh.yaml @@ -272,8 +272,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_innerdistance" executable: "target/nextflow/rseqc/rseqc_innerdistance/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_innerdistance/main.nf b/target/nextflow/rseqc/rseqc_innerdistance/main.nf index e17d1c3..e8bfe39 100644 --- a/target/nextflow/rseqc/rseqc_innerdistance/main.nf +++ b/target/nextflow/rseqc/rseqc_innerdistance/main.nf @@ -3137,8 +3137,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_innerdistance", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_junctionannotation/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_junctionannotation/.config.vsh.yaml index f1a7ae4..80122c1 100644 --- a/target/nextflow/rseqc/rseqc_junctionannotation/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_junctionannotation/.config.vsh.yaml @@ -260,8 +260,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_junctionannotation" executable: "target/nextflow/rseqc/rseqc_junctionannotation/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_junctionannotation/main.nf b/target/nextflow/rseqc/rseqc_junctionannotation/main.nf index cdb4475..75b41b1 100644 --- a/target/nextflow/rseqc/rseqc_junctionannotation/main.nf +++ b/target/nextflow/rseqc/rseqc_junctionannotation/main.nf @@ -3128,8 +3128,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_junctionannotation", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_junctionsaturation/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_junctionsaturation/.config.vsh.yaml index a07bbfd..6b3f5fe 100644 --- a/target/nextflow/rseqc/rseqc_junctionsaturation/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_junctionsaturation/.config.vsh.yaml @@ -249,8 +249,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_junctionsaturation" executable: "target/nextflow/rseqc/rseqc_junctionsaturation/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_junctionsaturation/main.nf b/target/nextflow/rseqc/rseqc_junctionsaturation/main.nf index eb3f03f..d226b6e 100644 --- a/target/nextflow/rseqc/rseqc_junctionsaturation/main.nf +++ b/target/nextflow/rseqc/rseqc_junctionsaturation/main.nf @@ -3113,8 +3113,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_junctionsaturation", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_readdistribution/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_readdistribution/.config.vsh.yaml index f786a8d..ef65802 100644 --- a/target/nextflow/rseqc/rseqc_readdistribution/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_readdistribution/.config.vsh.yaml @@ -162,8 +162,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_readdistribution" executable: "target/nextflow/rseqc/rseqc_readdistribution/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_readdistribution/main.nf b/target/nextflow/rseqc/rseqc_readdistribution/main.nf index b8e4a39..70813d2 100644 --- a/target/nextflow/rseqc/rseqc_readdistribution/main.nf +++ b/target/nextflow/rseqc/rseqc_readdistribution/main.nf @@ -3017,8 +3017,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_readdistribution", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_readduplication/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_readduplication/.config.vsh.yaml index b078e3a..dbc5476 100644 --- a/target/nextflow/rseqc/rseqc_readduplication/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_readduplication/.config.vsh.yaml @@ -211,8 +211,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_readduplication" executable: "target/nextflow/rseqc/rseqc_readduplication/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_readduplication/main.nf b/target/nextflow/rseqc/rseqc_readduplication/main.nf index b5baaf1..d98b685 100644 --- a/target/nextflow/rseqc/rseqc_readduplication/main.nf +++ b/target/nextflow/rseqc/rseqc_readduplication/main.nf @@ -3071,8 +3071,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_readduplication", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/rseqc/rseqc_tin/.config.vsh.yaml b/target/nextflow/rseqc/rseqc_tin/.config.vsh.yaml index 08be1ee..c32fafb 100644 --- a/target/nextflow/rseqc/rseqc_tin/.config.vsh.yaml +++ b/target/nextflow/rseqc/rseqc_tin/.config.vsh.yaml @@ -214,8 +214,8 @@ build_info: output: "target/nextflow/rseqc/rseqc_tin" executable: "target/nextflow/rseqc/rseqc_tin/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/rseqc/rseqc_tin/main.nf b/target/nextflow/rseqc/rseqc_tin/main.nf index da4796c..e43dd8a 100644 --- a/target/nextflow/rseqc/rseqc_tin/main.nf +++ b/target/nextflow/rseqc/rseqc_tin/main.nf @@ -3076,8 +3076,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/rseqc/rseqc_tin", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/sortmerna/.config.vsh.yaml b/target/nextflow/sortmerna/.config.vsh.yaml index 4ccc1ea..2cb796f 100644 --- a/target/nextflow/sortmerna/.config.vsh.yaml +++ b/target/nextflow/sortmerna/.config.vsh.yaml @@ -198,8 +198,8 @@ build_info: output: "target/nextflow/sortmerna" executable: "target/nextflow/sortmerna/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/sortmerna/main.nf b/target/nextflow/sortmerna/main.nf index 319745a..70beeca 100644 --- a/target/nextflow/sortmerna/main.nf +++ b/target/nextflow/sortmerna/main.nf @@ -3050,8 +3050,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/sortmerna", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/stringtie/.config.vsh.yaml b/target/nextflow/stringtie/.config.vsh.yaml index 3c0adbe..34765d3 100644 --- a/target/nextflow/stringtie/.config.vsh.yaml +++ b/target/nextflow/stringtie/.config.vsh.yaml @@ -216,8 +216,8 @@ build_info: output: "target/nextflow/stringtie" executable: "target/nextflow/stringtie/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/stringtie/main.nf b/target/nextflow/stringtie/main.nf index 9171ea8..41e0ba2 100644 --- a/target/nextflow/stringtie/main.nf +++ b/target/nextflow/stringtie/main.nf @@ -3073,8 +3073,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/stringtie", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/summarizedexperiment/.config.vsh.yaml b/target/nextflow/summarizedexperiment/.config.vsh.yaml index ad51409..7e10d25 100644 --- a/target/nextflow/summarizedexperiment/.config.vsh.yaml +++ b/target/nextflow/summarizedexperiment/.config.vsh.yaml @@ -199,8 +199,8 @@ build_info: output: "target/nextflow/summarizedexperiment" executable: "target/nextflow/summarizedexperiment/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/summarizedexperiment/main.nf b/target/nextflow/summarizedexperiment/main.nf index eac1854..f7f38e3 100644 --- a/target/nextflow/summarizedexperiment/main.nf +++ b/target/nextflow/summarizedexperiment/main.nf @@ -3054,8 +3054,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/summarizedexperiment", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/trimgalore/.config.vsh.yaml b/target/nextflow/trimgalore/.config.vsh.yaml index da2ceb2..2d98568 100644 --- a/target/nextflow/trimgalore/.config.vsh.yaml +++ b/target/nextflow/trimgalore/.config.vsh.yaml @@ -540,7 +540,7 @@ argument_groups: \ files (paired-end) are specified, but not for longer lists." info: null example: - - "read_1.fastq" + - "read_1.fastq.gz" must_exist: true create_parent: true required: false @@ -553,7 +553,7 @@ argument_groups: \ files (paired-end) are specified, but not for longer lists." info: null example: - - "read_2.fastq" + - "read_2.fastq.gz" must_exist: true create_parent: true required: false @@ -788,8 +788,8 @@ build_info: output: "target/nextflow/trimgalore" executable: "target/nextflow/trimgalore/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/trimgalore/main.nf b/target/nextflow/trimgalore/main.nf index 0fd48e1..7050ae6 100644 --- a/target/nextflow/trimgalore/main.nf +++ b/target/nextflow/trimgalore/main.nf @@ -3291,7 +3291,7 @@ meta = [ "name" : "--trimmed_r1", "description" : "Output file for read 1. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists.", "example" : [ - "read_1.fastq" + "read_1.fastq.gz" ], "must_exist" : true, "create_parent" : true, @@ -3305,7 +3305,7 @@ meta = [ "name" : "--trimmed_r2", "description" : "Output file for read 2. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists.", "example" : [ - "read_2.fastq" + "read_2.fastq.gz" ], "must_exist" : true, "create_parent" : true, @@ -3576,8 +3576,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/trimgalore", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/trimgalore/nextflow_schema.json b/target/nextflow/trimgalore/nextflow_schema.json index 4f9b09d..feb3442 100644 --- a/target/nextflow/trimgalore/nextflow_schema.json +++ b/target/nextflow/trimgalore/nextflow_schema.json @@ -498,10 +498,10 @@ "trimmed_r1": { "type": "string", - "description": "Type: `file`, default: `$id.$key.trimmed_r1.fastq`, example: `read_1.fastq`. Output file for read 1", - "help_text": "Type: `file`, default: `$id.$key.trimmed_r1.fastq`, example: `read_1.fastq`. Output file for read 1. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists." + "description": "Type: `file`, default: `$id.$key.trimmed_r1.gz`, example: `read_1.fastq.gz`. Output file for read 1", + "help_text": "Type: `file`, default: `$id.$key.trimmed_r1.gz`, example: `read_1.fastq.gz`. Output file for read 1. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists." , - "default": "$id.$key.trimmed_r1.fastq" + "default": "$id.$key.trimmed_r1.gz" } @@ -509,10 +509,10 @@ "trimmed_r2": { "type": "string", - "description": "Type: `file`, default: `$id.$key.trimmed_r2.fastq`, example: `read_2.fastq`. Output file for read 2", - "help_text": "Type: `file`, default: `$id.$key.trimmed_r2.fastq`, example: `read_2.fastq`. Output file for read 2. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists." + "description": "Type: `file`, default: `$id.$key.trimmed_r2.gz`, example: `read_2.fastq.gz`. Output file for read 2", + "help_text": "Type: `file`, default: `$id.$key.trimmed_r2.gz`, example: `read_2.fastq.gz`. Output file for read 2. Only works when 1 file (single-end) or 2 files (paired-end) are specified, but not for longer lists." , - "default": "$id.$key.trimmed_r2.fastq" + "default": "$id.$key.trimmed_r2.gz" } diff --git a/target/nextflow/tx2gene/.config.vsh.yaml b/target/nextflow/tx2gene/.config.vsh.yaml index 8e5b485..ab6ff2b 100644 --- a/target/nextflow/tx2gene/.config.vsh.yaml +++ b/target/nextflow/tx2gene/.config.vsh.yaml @@ -192,8 +192,8 @@ build_info: output: "target/nextflow/tx2gene" executable: "target/nextflow/tx2gene/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/tx2gene/main.nf b/target/nextflow/tx2gene/main.nf index cf181e3..de6ae4b 100644 --- a/target/nextflow/tx2gene/main.nf +++ b/target/nextflow/tx2gene/main.nf @@ -3049,8 +3049,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/tx2gene", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/tximport/.config.vsh.yaml b/target/nextflow/tximport/.config.vsh.yaml index 14df736..889ee89 100644 --- a/target/nextflow/tximport/.config.vsh.yaml +++ b/target/nextflow/tximport/.config.vsh.yaml @@ -247,8 +247,8 @@ build_info: output: "target/nextflow/tximport" executable: "target/nextflow/tximport/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/tximport/main.nf b/target/nextflow/tximport/main.nf index 8a059f1..d6f7922 100644 --- a/target/nextflow/tximport/main.nf +++ b/target/nextflow/tximport/main.nf @@ -3114,8 +3114,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/tximport", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/ucsc/bedclip/.config.vsh.yaml b/target/nextflow/ucsc/bedclip/.config.vsh.yaml index 230fdd1..f13cb3e 100644 --- a/target/nextflow/ucsc/bedclip/.config.vsh.yaml +++ b/target/nextflow/ucsc/bedclip/.config.vsh.yaml @@ -164,8 +164,8 @@ build_info: output: "target/nextflow/ucsc/bedclip" executable: "target/nextflow/ucsc/bedclip/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/ucsc/bedclip/main.nf b/target/nextflow/ucsc/bedclip/main.nf index 494b255..8471274 100644 --- a/target/nextflow/ucsc/bedclip/main.nf +++ b/target/nextflow/ucsc/bedclip/main.nf @@ -3018,8 +3018,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/ucsc/bedclip", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/ucsc/bedgraphtobigwig/.config.vsh.yaml b/target/nextflow/ucsc/bedgraphtobigwig/.config.vsh.yaml index a7806cf..e4ef8b3 100644 --- a/target/nextflow/ucsc/bedgraphtobigwig/.config.vsh.yaml +++ b/target/nextflow/ucsc/bedgraphtobigwig/.config.vsh.yaml @@ -164,8 +164,8 @@ build_info: output: "target/nextflow/ucsc/bedgraphtobigwig" executable: "target/nextflow/ucsc/bedgraphtobigwig/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/ucsc/bedgraphtobigwig/main.nf b/target/nextflow/ucsc/bedgraphtobigwig/main.nf index fc3c288..035a399 100644 --- a/target/nextflow/ucsc/bedgraphtobigwig/main.nf +++ b/target/nextflow/ucsc/bedgraphtobigwig/main.nf @@ -3018,8 +3018,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/ucsc/bedgraphtobigwig", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/umitools/umitools_dedup/.config.vsh.yaml b/target/nextflow/umitools/umitools_dedup/.config.vsh.yaml index 901f128..e1ddfd5 100644 --- a/target/nextflow/umitools/umitools_dedup/.config.vsh.yaml +++ b/target/nextflow/umitools/umitools_dedup/.config.vsh.yaml @@ -195,8 +195,8 @@ build_info: output: "target/nextflow/umitools/umitools_dedup" executable: "target/nextflow/umitools/umitools_dedup/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/umitools/umitools_dedup/main.nf b/target/nextflow/umitools/umitools_dedup/main.nf index 6337ddd..d892c73 100644 --- a/target/nextflow/umitools/umitools_dedup/main.nf +++ b/target/nextflow/umitools/umitools_dedup/main.nf @@ -3054,8 +3054,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/umitools/umitools_dedup", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/umitools/umitools_extract/.config.vsh.yaml b/target/nextflow/umitools/umitools_extract/.config.vsh.yaml index e87f302..46f28eb 100644 --- a/target/nextflow/umitools/umitools_extract/.config.vsh.yaml +++ b/target/nextflow/umitools/umitools_extract/.config.vsh.yaml @@ -253,8 +253,8 @@ build_info: output: "target/nextflow/umitools/umitools_extract" executable: "target/nextflow/umitools/umitools_extract/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/umitools/umitools_extract/main.nf b/target/nextflow/umitools/umitools_extract/main.nf index 96e62b9..4173fba 100644 --- a/target/nextflow/umitools/umitools_extract/main.nf +++ b/target/nextflow/umitools/umitools_extract/main.nf @@ -3119,8 +3119,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/umitools/umitools_extract", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/umitools_prepareforquant/.config.vsh.yaml b/target/nextflow/umitools_prepareforquant/.config.vsh.yaml index 8d55921..18bc501 100644 --- a/target/nextflow/umitools_prepareforquant/.config.vsh.yaml +++ b/target/nextflow/umitools_prepareforquant/.config.vsh.yaml @@ -156,8 +156,8 @@ build_info: output: "target/nextflow/umitools_prepareforquant" executable: "target/nextflow/umitools_prepareforquant/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" package_config: version: "main" info: diff --git a/target/nextflow/umitools_prepareforquant/main.nf b/target/nextflow/umitools_prepareforquant/main.nf index 37bec02..06a3f3b 100644 --- a/target/nextflow/umitools_prepareforquant/main.nf +++ b/target/nextflow/umitools_prepareforquant/main.nf @@ -3007,8 +3007,8 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/umitools_prepareforquant", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/workflows/genome_alignment_and_quant/.config.vsh.yaml b/target/nextflow/workflows/genome_alignment_and_quant/.config.vsh.yaml index 25175be..b2a4d5e 100644 --- a/target/nextflow/workflows/genome_alignment_and_quant/.config.vsh.yaml +++ b/target/nextflow/workflows/genome_alignment_and_quant/.config.vsh.yaml @@ -193,7 +193,7 @@ argument_groups: multiple: false multiple_sep: ";" - type: "string" - name: "extra_rsem_calculate_expression_args" + name: "--extra_rsem_calculate_expression_args" description: "Extra arguments to pass to rsem-calculate-expression command in\ \ addition to defaults defined by the pipeline." info: null @@ -242,7 +242,7 @@ argument_groups: name: "--star_multiqc" info: null default: - - "$id.star_align.log" + - "$id_star.log" must_exist: true create_parent: true required: false @@ -381,6 +381,87 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--salmon_multiqc" + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + default: + - "$id.genes.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--counts_transcripts" + description: "Expression counts on transcript level" + info: null + default: + - "$id.isoforms.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_multiqc" + description: "RSEM statistics" + info: null + default: + - "$id.stat" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_star_rsem" + description: "BAM file generated by STAR (optional)" + info: null + default: + - "$id.STAR.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_genome_rsem" + description: "Genome BAM file (optional)" + info: null + default: + - "$id.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_transcript_rsem" + description: "Transcript BAM file (optional)" + info: null + default: + - "$id.transcript.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" resources: - type: "nextflow_script" path: "main.nf" @@ -522,8 +603,8 @@ build_info: output: "target/nextflow/workflows/genome_alignment_and_quant" executable: "target/nextflow/workflows/genome_alignment_and_quant/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/star/star_align_reads" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/samtools/samtools_sort" diff --git a/target/nextflow/workflows/genome_alignment_and_quant/main.nf b/target/nextflow/workflows/genome_alignment_and_quant/main.nf index 03fc08e..4cf00f5 100644 --- a/target/nextflow/workflows/genome_alignment_and_quant/main.nf +++ b/target/nextflow/workflows/genome_alignment_and_quant/main.nf @@ -3023,7 +3023,7 @@ meta = [ }, { "type" : "string", - "name" : "extra_rsem_calculate_expression_args", + "name" : "--extra_rsem_calculate_expression_args", "description" : "Extra arguments to pass to rsem-calculate-expression command in addition to defaults defined by the pipeline.", "required" : false, "direction" : "input", @@ -3078,7 +3078,7 @@ meta = [ "type" : "file", "name" : "--star_multiqc", "default" : [ - "$id.star_align.log" + "$id_star.log" ], "must_exist" : true, "create_parent" : true, @@ -3242,6 +3242,100 @@ meta = [ "direction" : "output", "multiple" : false, "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--salmon_multiqc", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_counts_gene", + "description" : "Expression counts on gene level", + "default" : [ + "$id.genes.results" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--counts_transcripts", + "description" : "Expression counts on transcript level", + "default" : [ + "$id.isoforms.results" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_multiqc", + "description" : "RSEM statistics", + "default" : [ + "$id.stat" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_star_rsem", + "description" : "BAM file generated by STAR (optional)", + "default" : [ + "$id.STAR.genome.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_genome_rsem", + "description" : "Genome BAM file (optional)", + "default" : [ + "$id.genome.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_transcript_rsem", + "description" : "Transcript BAM file (optional)", + "default" : [ + "$id.transcript.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" } ] } @@ -3437,8 +3531,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/genome_alignment_and_quant", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3775,6 +3869,11 @@ workflow run_wf { ] ) + | map { id, state -> + def mod_state = (state.aligner == 'star_salmon') ? state + [salmon_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | rsem_calculate_expression.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, fromState: [ @@ -3795,7 +3894,7 @@ workflow run_wf { "bam_transcript_rsem": "bam_transcript" ] ) - + // RSEM_Star BAM | samtools_sort.run ( runIf: { id, state -> state.aligner == 'star_rsem' }, @@ -3852,6 +3951,7 @@ workflow run_wf { [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -3863,7 +3963,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" ] + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) emit: diff --git a/target/nextflow/workflows/genome_alignment_and_quant/nextflow_schema.json b/target/nextflow/workflows/genome_alignment_and_quant/nextflow_schema.json index 2055cf8..dfe1afe 100644 --- a/target/nextflow/workflows/genome_alignment_and_quant/nextflow_schema.json +++ b/target/nextflow/workflows/genome_alignment_and_quant/nextflow_schema.json @@ -399,6 +399,83 @@ } + , + "salmon_multiqc": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.salmon_multiqc.salmon_multiqc`. ", + "help_text": "Type: `file`, default: `$id.$key.salmon_multiqc.salmon_multiqc`. " + , + "default": "$id.$key.salmon_multiqc.salmon_multiqc" + } + + + , + "rsem_counts_gene": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.rsem_counts_gene.results`. Expression counts on gene level", + "help_text": "Type: `file`, default: `$id.$key.rsem_counts_gene.results`. Expression counts on gene level" + , + "default": "$id.$key.rsem_counts_gene.results" + } + + + , + "counts_transcripts": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.counts_transcripts.results`. Expression counts on transcript level", + "help_text": "Type: `file`, default: `$id.$key.counts_transcripts.results`. Expression counts on transcript level" + , + "default": "$id.$key.counts_transcripts.results" + } + + + , + "rsem_multiqc": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.rsem_multiqc.stat`. RSEM statistics", + "help_text": "Type: `file`, default: `$id.$key.rsem_multiqc.stat`. RSEM statistics" + , + "default": "$id.$key.rsem_multiqc.stat" + } + + + , + "bam_star_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_star_rsem.bam`. BAM file generated by STAR (optional)", + "help_text": "Type: `file`, default: `$id.$key.bam_star_rsem.bam`. BAM file generated by STAR (optional)" + , + "default": "$id.$key.bam_star_rsem.bam" + } + + + , + "bam_genome_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_genome_rsem.bam`. Genome BAM file (optional)", + "help_text": "Type: `file`, default: `$id.$key.bam_genome_rsem.bam`. Genome BAM file (optional)" + , + "default": "$id.$key.bam_genome_rsem.bam" + } + + + , + "bam_transcript_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_transcript_rsem.bam`. Transcript BAM file (optional)", + "help_text": "Type: `file`, default: `$id.$key.bam_transcript_rsem.bam`. Transcript BAM file (optional)" + , + "default": "$id.$key.bam_transcript_rsem.bam" + } + + } }, diff --git a/target/nextflow/workflows/merge_quant_results/.config.vsh.yaml b/target/nextflow/workflows/merge_quant_results/.config.vsh.yaml index 6ed8743..693e16a 100644 --- a/target/nextflow/workflows/merge_quant_results/.config.vsh.yaml +++ b/target/nextflow/workflows/merge_quant_results/.config.vsh.yaml @@ -278,8 +278,8 @@ build_info: output: "target/nextflow/workflows/merge_quant_results" executable: "target/nextflow/workflows/merge_quant_results/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/tx2gene" - "target/nextflow/tximport" diff --git a/target/nextflow/workflows/merge_quant_results/main.nf b/target/nextflow/workflows/merge_quant_results/main.nf index 1e4e635..b106e33 100644 --- a/target/nextflow/workflows/merge_quant_results/main.nf +++ b/target/nextflow/workflows/merge_quant_results/main.nf @@ -3149,8 +3149,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/merge_quant_results", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", diff --git a/target/nextflow/workflows/post_processing/.config.vsh.yaml b/target/nextflow/workflows/post_processing/.config.vsh.yaml index 44536e2..74b5e5e 100644 --- a/target/nextflow/workflows/post_processing/.config.vsh.yaml +++ b/target/nextflow/workflows/post_processing/.config.vsh.yaml @@ -199,7 +199,7 @@ argument_groups: name: "--processed_genome_bam" info: null default: - - "$id.markdup.sorted.bam" + - "$id.genome.bam" must_exist: true create_parent: true required: false @@ -210,7 +210,7 @@ argument_groups: name: "--genome_bam_index" info: null default: - - "$id.markdup.sorted.bam" + - "$id.genome.bam.bai" must_exist: true create_parent: true required: false @@ -221,7 +221,7 @@ argument_groups: name: "--genome_bam_stats" info: null default: - - "$id.markdup.sorted.bam.stats" + - "$id.genome.stats" must_exist: true create_parent: true required: false @@ -232,7 +232,7 @@ argument_groups: name: "--genome_bam_flagstat" info: null default: - - "$id.markdup.sorted.bam.flagstat" + - "$id.genome.flagstat" must_exist: true create_parent: true required: false @@ -243,7 +243,7 @@ argument_groups: name: "--genome_bam_idxstats" info: null default: - - "$id.markdup.sorted.bam.idxstats" + - "$id.genome.idxstats" must_exist: true create_parent: true required: false @@ -254,7 +254,7 @@ argument_groups: name: "--markduplicates_metrics" info: null default: - - "$id.markdup.sorted.MarkDuplicates.metrics.txt" + - "$id.MarkDuplicates.metrics.txt" must_exist: true create_parent: true required: false @@ -486,8 +486,8 @@ build_info: output: "target/nextflow/workflows/post_processing" executable: "target/nextflow/workflows/post_processing/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/picard_markduplicates" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/samtools/samtools_sort" diff --git a/target/nextflow/workflows/post_processing/main.nf b/target/nextflow/workflows/post_processing/main.nf index c4f1f78..59147dd 100644 --- a/target/nextflow/workflows/post_processing/main.nf +++ b/target/nextflow/workflows/post_processing/main.nf @@ -3029,7 +3029,7 @@ meta = [ "type" : "file", "name" : "--processed_genome_bam", "default" : [ - "$id.markdup.sorted.bam" + "$id.genome.bam" ], "must_exist" : true, "create_parent" : true, @@ -3042,7 +3042,7 @@ meta = [ "type" : "file", "name" : "--genome_bam_index", "default" : [ - "$id.markdup.sorted.bam" + "$id.genome.bam.bai" ], "must_exist" : true, "create_parent" : true, @@ -3055,7 +3055,7 @@ meta = [ "type" : "file", "name" : "--genome_bam_stats", "default" : [ - "$id.markdup.sorted.bam.stats" + "$id.genome.stats" ], "must_exist" : true, "create_parent" : true, @@ -3068,7 +3068,7 @@ meta = [ "type" : "file", "name" : "--genome_bam_flagstat", "default" : [ - "$id.markdup.sorted.bam.flagstat" + "$id.genome.flagstat" ], "must_exist" : true, "create_parent" : true, @@ -3081,7 +3081,7 @@ meta = [ "type" : "file", "name" : "--genome_bam_idxstats", "default" : [ - "$id.markdup.sorted.bam.idxstats" + "$id.genome.idxstats" ], "must_exist" : true, "create_parent" : true, @@ -3094,7 +3094,7 @@ meta = [ "type" : "file", "name" : "--markduplicates_metrics", "default" : [ - "$id.markdup.sorted.MarkDuplicates.metrics.txt" + "$id.MarkDuplicates.metrics.txt" ], "must_exist" : true, "create_parent" : true, @@ -3397,8 +3397,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/post_processing", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3471,20 +3471,20 @@ workflow run_wf { "extra_picard_args": "extra_picard_args" ], toState: [ - "genome_bam": "output_bam", + "processed_genome_bam": "output_bam", "markduplicates_metrics": "metrics" ] ) | samtools_sort.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, - fromState: [ "input": "genome_bam" ], - toState: [ "genome_bam": "output" ], + fromState: [ "input": "processed_genome_bam" ], + toState: [ "processed_genome_bam": "output" ], key: "genome_sorted_MarkDuplicates" ) | samtools_index.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "csi": "bam_csi_index" ], toState: [ "genome_bam_index": "output" ], @@ -3493,7 +3493,7 @@ workflow run_wf { | samtools_stats.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "input": "genome_bam", + "input": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_stats": "output" ], @@ -3502,7 +3502,7 @@ workflow run_wf { | samtools_flagstat.run ( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_flagstat": "output" ], @@ -3511,7 +3511,7 @@ workflow run_wf { | samtools_idxstats.run( runIf: { id, state -> !state.skip_markduplicates && !state.with_umi }, fromState: [ - "bam": "genome_bam", + "bam": "processed_genome_bam", "bai": "genome_bam_index" ], toState: [ "genome_bam_idxstats": "output" ], @@ -3522,7 +3522,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_stringtie }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "annotation_gtf": "gtf", "extra_stringtie_args": "extra_stringtie_args" ], @@ -3540,7 +3540,7 @@ workflow run_wf { runIf: { id, state -> !state.skip_bigwig }, fromState: [ "strandedness": "strandedness", - "bam": "genome_bam", + "bam": "processed_genome_bam", "extra_bedtools_args": "extra_bedtools_args" ], toState: [ @@ -3595,7 +3595,7 @@ workflow run_wf { } | setState ( - "processed_genome_bam": "genome_bam", + "processed_genome_bam": "processed_genome_bam", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", "genome_bam_flagstat": "genome_bam_flagstat", diff --git a/target/nextflow/workflows/post_processing/nextflow_schema.json b/target/nextflow/workflows/post_processing/nextflow_schema.json index 26bdcd3..ca7d7bf 100644 --- a/target/nextflow/workflows/post_processing/nextflow_schema.json +++ b/target/nextflow/workflows/post_processing/nextflow_schema.json @@ -244,10 +244,10 @@ "genome_bam_index": { "type": "string", - "description": "Type: `file`, default: `$id.$key.genome_bam_index.bam`. ", - "help_text": "Type: `file`, default: `$id.$key.genome_bam_index.bam`. " + "description": "Type: `file`, default: `$id.$key.genome_bam_index.bai`. ", + "help_text": "Type: `file`, default: `$id.$key.genome_bam_index.bai`. " , - "default": "$id.$key.genome_bam_index.bam" + "default": "$id.$key.genome_bam_index.bai" } diff --git a/target/nextflow/workflows/pre_processing/.config.vsh.yaml b/target/nextflow/workflows/pre_processing/.config.vsh.yaml index 6d4413f..7107944 100644 --- a/target/nextflow/workflows/pre_processing/.config.vsh.yaml +++ b/target/nextflow/workflows/pre_processing/.config.vsh.yaml @@ -323,26 +323,16 @@ argument_groups: multiple_sep: ";" - name: "Read filtering options" arguments: - - type: "boolean" + - type: "boolean_true" name: "--skip_bbsplit" description: "Skip BBSplit for removal of non-reference genome reads." info: null - default: - - true - required: false direction: "input" - multiple: false - multiple_sep: ";" - - type: "boolean" + - type: "boolean_true" name: "--remove_ribo_rna" description: "Enable the removal of reads derived from ribosomal RNA using SortMeRNA." info: null - default: - - false - required: false direction: "input" - multiple: false - multiple_sep: ";" - name: "Other options" arguments: - type: "string" @@ -363,7 +353,7 @@ argument_groups: description: "Path to output directory" info: null default: - - "$id.$key.read_1.fastq" + - "$id.read_1.fastq" must_exist: false create_parent: true required: false @@ -375,7 +365,7 @@ argument_groups: description: "Path to output directory" info: null default: - - "$id.$key.read_2.fastq" + - "$id.read_2.fastq" must_exist: false create_parent: true required: false @@ -520,6 +510,40 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--trim_json" + description: "The fastp json format report file name" + info: null + default: + - "$id.fastp_out.json" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--trim_html" + description: "The fastp html format report file name" + info: null + default: + - "$id.fastp_out.html" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--merged_out" + description: "File name to store merged fastp output." + info: null + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" resources: - type: "nextflow_script" path: "main.nf" @@ -538,6 +562,11 @@ dependencies: - name: "umitools/umitools_extract" repository: type: "local" +- name: "umi_tools/umi_tools_extract" + repository: + type: "vsh" + repo: "vsh/biobox" + tag: "v0.2.0" - name: "trimgalore" repository: type: "local" @@ -644,11 +673,12 @@ build_info: output: "target/nextflow/workflows/pre_processing" executable: "target/nextflow/workflows/pre_processing/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/fastqc" - "target/nextflow/umitools/umitools_extract" + - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract" - "target/nextflow/trimgalore" - "target/nextflow/bbmap_bbsplit" - "target/nextflow/sortmerna" diff --git a/target/nextflow/workflows/pre_processing/main.nf b/target/nextflow/workflows/pre_processing/main.nf index e7e6725..3f94236 100644 --- a/target/nextflow/workflows/pre_processing/main.nf +++ b/target/nextflow/workflows/pre_processing/main.nf @@ -3184,28 +3184,16 @@ meta = [ "name" : "Read filtering options", "arguments" : [ { - "type" : "boolean", + "type" : "boolean_true", "name" : "--skip_bbsplit", "description" : "Skip BBSplit for removal of non-reference genome reads.", - "default" : [ - true - ], - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" + "direction" : "input" }, { - "type" : "boolean", + "type" : "boolean_true", "name" : "--remove_ribo_rna", "description" : "Enable the removal of reads derived from ribosomal RNA using SortMeRNA.", - "default" : [ - false - ], - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" + "direction" : "input" } ] }, @@ -3234,7 +3222,7 @@ meta = [ "name" : "--qc_output1", "description" : "Path to output directory", "default" : [ - "$id.$key.read_1.fastq" + "$id.read_1.fastq" ], "must_exist" : false, "create_parent" : true, @@ -3248,7 +3236,7 @@ meta = [ "name" : "--qc_output2", "description" : "Path to output directory", "default" : [ - "$id.$key.read_2.fastq" + "$id.read_2.fastq" ], "must_exist" : false, "create_parent" : true, @@ -3418,6 +3406,45 @@ meta = [ "direction" : "output", "multiple" : false, "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--trim_json", + "description" : "The fastp json format report file name", + "default" : [ + "$id.fastp_out.json" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--trim_html", + "description" : "The fastp html format report file name", + "default" : [ + "$id.fastp_out.html" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--merged_out", + "description" : "File name to store merged fastp output.", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" } ] } @@ -3450,6 +3477,14 @@ meta = [ "type" : "local" } }, + { + "name" : "umi_tools/umi_tools_extract", + "repository" : { + "type" : "vsh", + "repo" : "vsh/biobox", + "tag" : "v0.2.0" + } + }, { "name" : "trimgalore", "repository" : { @@ -3591,8 +3626,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/pre_processing", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3636,6 +3671,7 @@ meta = [ meta["root_dir"] = getRootDir() include { fastqc } from "${meta.resources_dir}/../../../nextflow/fastqc/main.nf" include { umitools_extract } from "${meta.resources_dir}/../../../nextflow/umitools/umitools_extract/main.nf" +include { umi_tools_extract } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/umi_tools/umi_tools_extract/main.nf" include { trimgalore } from "${meta.resources_dir}/../../../nextflow/trimgalore/main.nf" include { bbmap_bbsplit } from "${meta.resources_dir}/../../../nextflow/bbmap_bbsplit/main.nf" include { sortmerna } from "${meta.resources_dir}/../../../nextflow/sortmerna/main.nf" @@ -3721,7 +3757,8 @@ workflow run_wf { "trim_zip_2": "trimmed_fastqc_zip_2", "trim_html_1": "trimmed_fastqc_html_1", "trim_html_2": "trimmed_fastqc_html_2" - ] + ], + args: [gzip: true, fastqc: true] ) // Trim reads using fastp @@ -3737,7 +3774,7 @@ workflow run_wf { ], toState: [ "fastq_1": "out1", - // "fastq_2": "out2", + "fastq_2": "out2", "failed_trim": "failed_out", "failed_trim_unpaired1": "unpaired1", "failed_trim_unpaired2": "unpaired2", @@ -3801,8 +3838,10 @@ workflow run_wf { runIf: { id, state -> state.strandedness == 'auto' }, fromState: { id, state -> def input = state.paired ? [ state.fastq_1, state.fastq_2 ] : [ state.fastq_1 ] - [ input: input, - extra_args: state.extra_fq_subsample_args ] + [ + input: input, + extra_args: state.extra_fq_subsample_args + ] }, toState: [ "subsampled_fastq_1": "output_1", @@ -3836,9 +3875,8 @@ workflow run_wf { def mates1 = state.paired ? state.subsampled_fastq_1 : null def mates2 = state.paired ? state.subsampled_fastq_2 : null [ unmated_reads: unmated_reads, - mates1: state.fastq1, - mates2: state.fastq2, - targets: state.transcript_fasta, + mates1: mates1, + mates2: mates2, gene_map: state.gtf, index: state.salmon_index, lib_type: state.lib_type ] diff --git a/target/nextflow/workflows/pre_processing/nextflow_schema.json b/target/nextflow/workflows/pre_processing/nextflow_schema.json index 1452936..1b49356 100644 --- a/target/nextflow/workflows/pre_processing/nextflow_schema.json +++ b/target/nextflow/workflows/pre_processing/nextflow_schema.json @@ -381,10 +381,10 @@ "skip_bbsplit": { "type": "boolean", - "description": "Type: `boolean`, default: `true`. Skip BBSplit for removal of non-reference genome reads", - "help_text": "Type: `boolean`, default: `true`. Skip BBSplit for removal of non-reference genome reads." + "description": "Type: `boolean_true`, default: `false`. Skip BBSplit for removal of non-reference genome reads", + "help_text": "Type: `boolean_true`, default: `false`. Skip BBSplit for removal of non-reference genome reads." , - "default": "True" + "default": "False" } @@ -392,8 +392,8 @@ "remove_ribo_rna": { "type": "boolean", - "description": "Type: `boolean`, default: `false`. Enable the removal of reads derived from ribosomal RNA using SortMeRNA", - "help_text": "Type: `boolean`, default: `false`. Enable the removal of reads derived from ribosomal RNA using SortMeRNA." + "description": "Type: `boolean_true`, default: `false`. Enable the removal of reads derived from ribosomal RNA using SortMeRNA", + "help_text": "Type: `boolean_true`, default: `false`. Enable the removal of reads derived from ribosomal RNA using SortMeRNA." , "default": "False" } @@ -584,6 +584,39 @@ } + , + "trim_json": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.trim_json.json`. The fastp json format report file name", + "help_text": "Type: `file`, default: `$id.$key.trim_json.json`. The fastp json format report file name" + , + "default": "$id.$key.trim_json.json" + } + + + , + "trim_html": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.trim_html.html`. The fastp html format report file name", + "help_text": "Type: `file`, default: `$id.$key.trim_html.html`. The fastp html format report file name" + , + "default": "$id.$key.trim_html.html" + } + + + , + "merged_out": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.merged_out.merged_out`. File name to store merged fastp output", + "help_text": "Type: `file`, default: `$id.$key.merged_out.merged_out`. File name to store merged fastp output." + , + "default": "$id.$key.merged_out.merged_out" + } + + } }, diff --git a/target/nextflow/workflows/prepare_genome/.config.vsh.yaml b/target/nextflow/workflows/prepare_genome/.config.vsh.yaml index d1125ef..5dc4666 100644 --- a/target/nextflow/workflows/prepare_genome/.config.vsh.yaml +++ b/target/nextflow/workflows/prepare_genome/.config.vsh.yaml @@ -496,8 +496,8 @@ build_info: output: "target/nextflow/workflows/prepare_genome" executable: "target/nextflow/workflows/prepare_genome/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/gunzip" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/gffread" diff --git a/target/nextflow/workflows/prepare_genome/main.nf b/target/nextflow/workflows/prepare_genome/main.nf index f79c2ef..96a50b0 100644 --- a/target/nextflow/workflows/prepare_genome/main.nf +++ b/target/nextflow/workflows/prepare_genome/main.nf @@ -3407,8 +3407,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/prepare_genome", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3503,9 +3503,15 @@ workflow run_wf { // gff to gtf | gffread.run ( runIf: {id, state -> !state.gtf && state.gff}, - fromState: [ "input": "annotation" ], + fromState: [ + "input": "gff", + "genome": "fasta" + ], toState: [ "gtf": "outfile" ], - args: [output: "gene_annotation.gtf"] + args: [ + outfile: "gene_annotation.gtf", + gtf_output: true + ] ) | gtf_filter.run( @@ -3584,13 +3590,19 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.transcript_fasta}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "transcript_fasta": "transcript_fasta" ], - key: "make_transcript_fasta", - args: [transcript_fasta: "transcriptome.fasta"] + toState: [ "make_transcript_fasta_output": "output" ], + key: "make_transcript_fasta",\ + args: [reference_name: "genome"] ) + | map { id, state -> + def transcript_fasta = (!state.transcript_fasta) ? + state.make_transcript_fasta_output.listFiles().find{it.name == "genome.transcripts.fa"} : + state.transcript_fasta + [ id, state + [transcript_fasta: transcript_fasta] ] + } // chromosome size and fai index | getchromsizes.run ( @@ -3663,11 +3675,12 @@ workflow run_wf { | rsem_prepare_reference.run ( runIf: {id, state -> !state.rsem_index && state.aligner == 'star_rsem'}, fromState: [ - "fasta": "fasta", + "reference_fasta_files": "fasta", "gtf": "gtf" ], - toState: [ "rsem_index": "rsem" ], + toState: [ "rsem_index": "output" ], key: "generate_rsem_index", + args: [reference_name: "genome"] ) // TODO: Uncompress HISAT2 index or generate from scratch if required @@ -3697,10 +3710,7 @@ workflow run_wf { // Uncompress Kallisto index or generate from scratch if required | untar.run ( runIf: {id, state -> state.kallisto_index}, - fromState: [ - "input": "kallisto_index", - "pseudo_aligner_kmer_size": "pseudo_aligner_kmer_size" - ], + fromState: [ "input": "kallisto_index" ], toState: [ "kallisto_index": "output" ], key: "untar_kallisto_index", args: [output: "Kallisto_index"] diff --git a/target/nextflow/workflows/pseudo_alignment_and_quant/.config.vsh.yaml b/target/nextflow/workflows/pseudo_alignment_and_quant/.config.vsh.yaml index 3dc54ca..460673c 100644 --- a/target/nextflow/workflows/pseudo_alignment_and_quant/.config.vsh.yaml +++ b/target/nextflow/workflows/pseudo_alignment_and_quant/.config.vsh.yaml @@ -139,8 +139,6 @@ argument_groups: - type: "file" name: "--pseudo_multiqc" info: null - default: - - "$id.quant.log" must_exist: true create_parent: true required: false @@ -151,7 +149,7 @@ argument_groups: name: "--quant_out_dir" info: null default: - - "$id.salmon_quant" + - "$id.quant" must_exist: true create_parent: true required: false @@ -285,8 +283,8 @@ build_info: output: "target/nextflow/workflows/pseudo_alignment_and_quant" executable: "target/nextflow/workflows/pseudo_alignment_and_quant/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/salmon/salmon_quant" - "target/nextflow/kallisto/kallisto_quant" diff --git a/target/nextflow/workflows/pseudo_alignment_and_quant/main.nf b/target/nextflow/workflows/pseudo_alignment_and_quant/main.nf index 11d3143..a20b161 100644 --- a/target/nextflow/workflows/pseudo_alignment_and_quant/main.nf +++ b/target/nextflow/workflows/pseudo_alignment_and_quant/main.nf @@ -2963,9 +2963,6 @@ meta = [ { "type" : "file", "name" : "--pseudo_multiqc", - "default" : [ - "$id.quant.log" - ], "must_exist" : true, "create_parent" : true, "required" : false, @@ -2977,7 +2974,7 @@ meta = [ "type" : "file", "name" : "--quant_out_dir", "default" : [ - "$id.salmon_quant" + "$id.quant" ], "must_exist" : true, "create_parent" : true, @@ -3146,8 +3143,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/pseudo_alignment_and_quant", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -3242,11 +3239,16 @@ workflow run_wf { lib_type: state.lib_type ] }, toState: [ - "quant_results_dir": "output", + "quant_out_dir": "output", "salmon_quant_results_file": "quant_results" ] ) + | map { id, state -> + def mod_state = (state.pseudo_aligner == 'salmon') ? state + [pseudo_multiqc: state.quant_out_dir] : state + [ id, mod_state ] + } + | kallisto_quant.run ( runIf: { id, state -> state.pseudo_aligner == 'kallisto'}, fromState: [ diff --git a/target/nextflow/workflows/pseudo_alignment_and_quant/nextflow_schema.json b/target/nextflow/workflows/pseudo_alignment_and_quant/nextflow_schema.json index 64e44b3..bbfd08f 100644 --- a/target/nextflow/workflows/pseudo_alignment_and_quant/nextflow_schema.json +++ b/target/nextflow/workflows/pseudo_alignment_and_quant/nextflow_schema.json @@ -153,10 +153,10 @@ "pseudo_multiqc": { "type": "string", - "description": "Type: `file`, default: `$id.$key.pseudo_multiqc.log`. ", - "help_text": "Type: `file`, default: `$id.$key.pseudo_multiqc.log`. " + "description": "Type: `file`, default: `$id.$key.pseudo_multiqc.pseudo_multiqc`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_multiqc.pseudo_multiqc`. " , - "default": "$id.$key.pseudo_multiqc.log" + "default": "$id.$key.pseudo_multiqc.pseudo_multiqc" } @@ -164,10 +164,10 @@ "quant_out_dir": { "type": "string", - "description": "Type: `file`, default: `$id.$key.quant_out_dir.salmon_quant`. ", - "help_text": "Type: `file`, default: `$id.$key.quant_out_dir.salmon_quant`. " + "description": "Type: `file`, default: `$id.$key.quant_out_dir.quant`. ", + "help_text": "Type: `file`, default: `$id.$key.quant_out_dir.quant`. " , - "default": "$id.$key.quant_out_dir.salmon_quant" + "default": "$id.$key.quant_out_dir.quant" } diff --git a/target/nextflow/workflows/quality_control/.config.vsh.yaml b/target/nextflow/workflows/quality_control/.config.vsh.yaml index 12fd152..ccb0e4e 100644 --- a/target/nextflow/workflows/quality_control/.config.vsh.yaml +++ b/target/nextflow/workflows/quality_control/.config.vsh.yaml @@ -97,7 +97,7 @@ argument_groups: multiple_sep: ";" - type: "file" name: "--quant_out_dir" - description: "Directory containing quantification results." + description: "Directory containing Salmon quantification results." info: null must_exist: true create_parent: true @@ -107,7 +107,7 @@ argument_groups: multiple_sep: ";" - type: "file" name: "--quant_results_file" - description: "Quantification file." + description: "Salmon quantification file." info: null must_exist: true create_parent: true @@ -155,12 +155,32 @@ argument_groups: multiple_sep: ";" - type: "string" name: "--pseudo_aligner" - description: "Method used for [seudo alignment and quantification." + description: "Method used for pseudo alignment and quantification." info: null required: false direction: "input" multiple: false multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_transcripts" + description: "Expression counts on transcript level" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" - type: "boolean" name: "--skip_qc" info: null @@ -612,25 +632,6 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" - - type: "file" - name: "--mqc_yml" - description: "Software versions" - info: null - must_exist: true - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--workflow_summary" - info: null - must_exist: true - create_parent: true - required: false - direction: "input" - multiple: false - multiple_sep: ";" - type: "boolean" name: "--passed_trimmed_reads" info: null @@ -731,6 +732,15 @@ argument_groups: direction: "input" multiple: false multiple_sep: ";" + - type: "file" + name: "--rsem_multiqc" + info: null + must_exist: true + create_parent: true + required: false + direction: "input" + multiple: false + multiple_sep: ";" - type: "file" name: "--genome_bam_stats" info: null @@ -1233,15 +1243,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--multiqc_versions" - info: null - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--featurecounts" info: null @@ -1367,7 +1368,7 @@ argument_groups: name: "--pseudo_tpm_gene" info: null default: - - "salmon.merged.pseudo_gene_tpm.tsv" + - "pseudo_gene_tpm.tsv" must_exist: true create_parent: true required: false @@ -1378,7 +1379,7 @@ argument_groups: name: "--pseudo_counts_gene" info: null default: - - "salmon.merged.pseudo_gene_counts.tsv" + - "pseudo_gene_counts.tsv" must_exist: true create_parent: true required: false @@ -1389,7 +1390,7 @@ argument_groups: name: "--pseudo_counts_gene_length_scaled" info: null default: - - "salmon.merged.pseudo_gene_counts_length_scaled.tsv" + - "pseudo_gene_counts_length_scaled.tsv" must_exist: true create_parent: true required: false @@ -1400,7 +1401,7 @@ argument_groups: name: "--pseudo_counts_gene_scaled" info: null default: - - "salmon.merged.pseudo_gene_counts_scaled.tsv" + - "pseudo_gene_counts_scaled.tsv" must_exist: true create_parent: true required: false @@ -1411,7 +1412,7 @@ argument_groups: name: "--pseudo_tpm_transcript" info: null default: - - "salmon.merged.pseudo_transcript_tpm.tsv" + - "pseudo_transcript_tpm.tsv" must_exist: true create_parent: true required: false @@ -1422,7 +1423,7 @@ argument_groups: name: "--pseudo_counts_transcript" info: null default: - - "salmon.merged.pseudo_transcript_counts.tsv" + - "pseudo_transcript_counts.tsv" must_exist: true create_parent: true required: false @@ -1505,6 +1506,9 @@ dependencies: type: "vsh" repo: "vsh/biobox" tag: "v0.2.0" +- name: "rsem/rsem_merge_counts" + repository: + type: "local" - name: "workflows/merge_quant_results" repository: type: "local" @@ -1592,8 +1596,8 @@ build_info: output: "target/nextflow/workflows/quality_control" executable: "target/nextflow/workflows/quality_control/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/rseqc/rseqc_bamstat" - "target/nextflow/rseqc/rseqc_inferexperiment" @@ -1611,6 +1615,7 @@ build_info: - "target/nextflow/deseq2_qc" - "target/nextflow/prepare_multiqc_input" - "target/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc" + - "target/nextflow/rsem/rsem_merge_counts" - "target/nextflow/workflows/merge_quant_results" package_config: version: "main" diff --git a/target/nextflow/workflows/quality_control/main.nf b/target/nextflow/workflows/quality_control/main.nf index 8012b7c..e304852 100644 --- a/target/nextflow/workflows/quality_control/main.nf +++ b/target/nextflow/workflows/quality_control/main.nf @@ -2915,7 +2915,7 @@ meta = [ { "type" : "file", "name" : "--quant_out_dir", - "description" : "Directory containing quantification results.", + "description" : "Directory containing Salmon quantification results.", "must_exist" : true, "create_parent" : true, "required" : false, @@ -2926,7 +2926,7 @@ meta = [ { "type" : "file", "name" : "--quant_results_file", - "description" : "Quantification file.", + "description" : "Salmon quantification file.", "must_exist" : true, "create_parent" : true, "required" : false, @@ -2979,7 +2979,29 @@ meta = [ { "type" : "string", "name" : "--pseudo_aligner", - "description" : "Method used for [seudo alignment and quantification.", + "description" : "Method used for pseudo alignment and quantification.", + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_counts_gene", + "description" : "Expression counts on gene level", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_counts_transcripts", + "description" : "Expression counts on transcript level", + "must_exist" : true, + "create_parent" : true, "required" : false, "direction" : "input", "multiple" : false, @@ -3488,27 +3510,6 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, - { - "type" : "file", - "name" : "--mqc_yml", - "description" : "Software versions", - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--workflow_summary", - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" - }, { "type" : "boolean", "name" : "--passed_trimmed_reads", @@ -3621,6 +3622,16 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, + { + "type" : "file", + "name" : "--rsem_multiqc", + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "input", + "multiple" : false, + "multiple_sep" : ";" + }, { "type" : "file", "name" : "--genome_bam_stats", @@ -4199,16 +4210,6 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, - { - "type" : "file", - "name" : "--multiqc_versions", - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" - }, { "type" : "file", "name" : "--featurecounts", @@ -4356,7 +4357,7 @@ meta = [ "type" : "file", "name" : "--pseudo_tpm_gene", "default" : [ - "salmon.merged.pseudo_gene_tpm.tsv" + "pseudo_gene_tpm.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4369,7 +4370,7 @@ meta = [ "type" : "file", "name" : "--pseudo_counts_gene", "default" : [ - "salmon.merged.pseudo_gene_counts.tsv" + "pseudo_gene_counts.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4382,7 +4383,7 @@ meta = [ "type" : "file", "name" : "--pseudo_counts_gene_length_scaled", "default" : [ - "salmon.merged.pseudo_gene_counts_length_scaled.tsv" + "pseudo_gene_counts_length_scaled.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4395,7 +4396,7 @@ meta = [ "type" : "file", "name" : "--pseudo_counts_gene_scaled", "default" : [ - "salmon.merged.pseudo_gene_counts_scaled.tsv" + "pseudo_gene_counts_scaled.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4408,7 +4409,7 @@ meta = [ "type" : "file", "name" : "--pseudo_tpm_transcript", "default" : [ - "salmon.merged.pseudo_transcript_tpm.tsv" + "pseudo_transcript_tpm.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4421,7 +4422,7 @@ meta = [ "type" : "file", "name" : "--pseudo_counts_transcript", "default" : [ - "salmon.merged.pseudo_transcript_counts.tsv" + "pseudo_transcript_counts.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4562,6 +4563,12 @@ meta = [ "tag" : "v0.2.0" } }, + { + "name" : "rsem/rsem_merge_counts", + "repository" : { + "type" : "local" + } + }, { "name" : "workflows/merge_quant_results", "repository" : { @@ -4669,8 +4676,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/quality_control", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -4728,6 +4735,7 @@ include { multiqc_custom_biotype } from "${meta.resources_dir}/../../../nextflow include { deseq2_qc } from "${meta.resources_dir}/../../../nextflow/deseq2_qc/main.nf" include { prepare_multiqc_input } from "${meta.resources_dir}/../../../nextflow/prepare_multiqc_input/main.nf" include { multiqc } from "${meta.root_dir}/dependencies/vsh/vsh/biobox/v0.2.0/nextflow/multiqc/main.nf" +include { rsem_merge_counts } from "${meta.resources_dir}/../../../nextflow/rsem/rsem_merge_counts/main.nf" include { merge_quant_results } from "${meta.resources_dir}/../../../nextflow/workflows/merge_quant_results/main.nf" // inner workflow @@ -4789,7 +4797,7 @@ workflow run_wf { "input": "genome_bam", "extra_preseq_args": "extra_preseq_args" ], - toState: [ "preseq_output": "output" ], + toState: [ "preseq_output": "output" ] ) | rseqc_bamstat.run ( @@ -4948,10 +4956,49 @@ workflow run_wf { merged_ch = qc_ch | toSortedList - | map { list -> def ids = list.collect { id, state -> state.id } def strandedness = list.collect { id, state -> state.strandedness } + def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + def passed_mapping = list.collect { id, state -> state.passed_mapping } + def percent_mapped = list.collect { id, state -> state.percent_mapped } + def inferred_strand = list.collect { id, state -> state.inferred_strand } + def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + def gtf = list.collect { id, state -> state.gtf }.unique()[0] + def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + def aligner = list.collect { id, state -> state.aligner }.unique()[0] + def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + def quant_results = list.collect { id, state -> + (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + state.quant_results_file : + null } + def rsem_counts_gene = list.collect { id, state -> + (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + state.rsem_counts_gene : + null } + def rsem_counts_transcripts = list.collect { id, state -> + (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + state.rsem_counts_transcripts : + null } + def pseudo_salmon_quant_results = list.collect { id, state -> + (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + state.pseudo_salmon_quant_results_file : + null } + def pseudo_kallisto_quant_results = list.collect { id, state -> + (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + state.pseudo_kallisto_quant_results_file : + null } def fastqc_zip_1 = list.collect { id, state -> (state.fastqc_zip_1 instanceof java.nio.file.Path && state.fastqc_zip_1.exists()) ? state.fastqc_zip_1 : @@ -4976,26 +5023,14 @@ workflow run_wf { (state.trim_log_2 instanceof java.nio.file.Path && state.trim_log_2.exists()) ? state.trim_log_2 : null } - def sortmerna_log = list.collect { id, state -> - (state.sortmerna_log instanceof java.nio.file.Path && state.sortmerna_log.exists()) ? - state.sortmerna_log : + def sortmerna_multiqc = list.collect { id, state -> + (state.sortmerna_multiqc instanceof java.nio.file.Path && state.sortmerna_multiqc.exists()) ? + state.sortmerna_multiqc : null } def star_multiqc = list.collect { id, state -> (state.star_multiqc instanceof java.nio.file.Path && state.star_multiqc.exists()) ? state.star_multiqc : null } - def quant_results = list.collect { id, state -> - (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? - state.quant_results_file : - null } - def pseudo_salmon_quant_results = list.collect { id, state -> - (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? - state.pseudo_salmon_quant_results_file : - null } - def pseudo_kallisto_quant_results = list.collect { id, state -> - (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? - state.pseudo_kallisto_quant_results_file : - null } def genome_bam_stats = list.collect { id, state -> (state.genome_bam_stats instanceof java.nio.file.Path && state.genome_bam_stats.exists()) ? state.genome_bam_stats : @@ -5012,6 +5047,14 @@ workflow run_wf { (state.markduplicates_multiqc instanceof java.nio.file.Path && state.markduplicates_multiqc.exists()) ? state.markduplicates_multiqc : null } + def salmon_multiqc = list.collect { id, state -> + (state.salmon_multiqc instanceof java.nio.file.Path && state.salmon_multiqc.exists()) ? + state.salmon_multiqc : + null } + def rsem_multiqc = list.collect { id, state -> + (state.rsem_multiqc instanceof java.nio.file.Path && state.rsem_multiqc.exists()) ? + state.rsem_multiqc : + null } def pseudo_multiqc = list.collect { id, state -> (state.pseudo_multiqc instanceof java.nio.file.Path && state.pseudo_multiqc.exists()) ? state.pseudo_multiqc : @@ -5072,40 +5115,45 @@ workflow run_wf { (state.tin_output_summary instanceof java.nio.file.Path && state.tin_output_summary.exists()) ? state.tin_output_summary : null } - def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } - def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } - def passed_mapping = list.collect { id, state -> state.passed_mapping } - def percent_mapped = list.collect { id, state -> state.percent_mapped } - def inferred_strand = list.collect { id, state -> state.inferred_strand } - def passed_strand_check = list.collect { id, state -> state.passed_strand_check } - def gtf = list.collect { id, state -> state.gtf }.unique()[0] - def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] - def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] - def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] - def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc } .unique()[0] - def aligner = list.collect { id, state -> state.aligner } .unique()[0] - def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner } .unique()[0] - def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] - 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 multiqc_custom_config = list.collect { id, state -> state.multiqc_custom_config }.unique()[0] - def skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] - def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] - def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] ["merged", [ ids: ids, strandedness: strandedness, + num_trimmed_reads: num_trimmed_reads, + passed_trimmed_reads: passed_trimmed_reads, + passed_mapping: passed_mapping, + percent_mapped: percent_mapped, + inferred_strand: inferred_strand, + passed_strand_check: passed_strand_check, + skip_align: skip_align, + skip_pseudo_align: skip_pseudo_align, + quant_results: quant_results, + rsem_counts_gene: rsem_counts_gene, + rsem_counts_transcripts: rsem_counts_transcripts, + pseudo_salmon_quant_results: pseudo_salmon_quant_results, + pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + gtf: gtf, + gtf_extra_attributes: gtf_extra_attributes, + gtf_group_features: gtf_group_features, + pca_header_multiqc: pca_header_multiqc, + clustering_header_multiqc: clustering_header_multiqc, + aligner: aligner, + pseudo_aligner: pseudo_aligner, + deseq2_vst: deseq2_vst, + extra_deseq2_args: extra_deseq2_args, + extra_deseq2_args2: extra_deseq2_args2, + skip_deseq2_qc: skip_deseq2_qc, fastqc_zip: fastqc_zip_1 + fastqc_zip_2, trim_zip: trim_zip_1 + trim_zip_2, trim_log: trim_log_1 + trim_log_2, - sortmerna_log: sortmerna_log, + sortmerna_multiqc: sortmerna_multiqc, star_multiqc: star_multiqc, - salmon_multiqc: quant_results, genome_bam_stats: genome_bam_stats, genome_bam_flagstat: genome_bam_flagstat, genome_bam_idxstats: genome_bam_idxstats, markduplicates_multiqc: markduplicates_multiqc, + salmon_multiqc: salmon_multiqc, + rsem_multiqc: rsem_multiqc, pseudo_multiqc: pseudo_multiqc, featurecounts_multiqc: featurecounts_multiqc, featurecounts_rrna_multiqc: featurecounts_rrna_multiqc, @@ -5121,32 +5169,114 @@ workflow run_wf { read_distribution_output: read_distribution_output, read_duplication_output_duplication_rate_mapping: read_duplication_output_duplication_rate_mapping, tin_output_summary: tin_output_summary, - quant_results: quant_results, - pseudo_salmon_quant_results: pseudo_salmon_quant_results, - pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, - gtf: gtf, - gtf_extra_attributes: gtf_extra_attributes, - gtf_group_features: gtf_group_features, - pca_header_multiqc: pca_header_multiqc, - clustering_header_multiqc: clustering_header_multiqc, - aligner: aligner, - pseudo_aligner: pseudo_aligner, - deseq2_vst: deseq2_vst, - extra_deseq2_args: extra_deseq2_args, - extra_deseq2_args2: extra_deseq2_args2, - skip_deseq2_qc: skip_deseq2_qc, - num_trimmed_reads: num_trimmed_reads, - passed_trimmed_reads: passed_trimmed_reads, - passed_mapping: passed_mapping, - percent_mapped: percent_mapped, - inferred_strand: inferred_strand, - passed_strand_check: passed_strand_check, - multiqc_custom_config: multiqc_custom_config, - skip_align: skip_align, - skip_pseudo_align: skip_pseudo_align + multiqc_custom_config: multiqc_custom_config ] ] } - + + // | map { list -> + // def ids = list.collect { id, state -> state.id } + // def strandedness = list.collect { id, state -> state.strandedness } + // def num_trimmed_reads = list.collect { id, state -> state.num_trimmed_reads } + // def passed_trimmed_reads = list.collect { id, state -> state.passed_trimmed_reads } + // def passed_mapping = list.collect { id, state -> state.passed_mapping } + // def percent_mapped = list.collect { id, state -> state.percent_mapped } + // def inferred_strand = list.collect { id, state -> state.inferred_strand } + // def passed_strand_check = list.collect { id, state -> state.passed_strand_check } + // def gtf = list.collect { id, state -> state.gtf }.unique()[0] + // def gtf_extra_attributes = list.collect { id, state -> state.gtf_extra_attributes }.unique()[0] + // def gtf_group_features = list.collect { id, state -> state.gtf_group_features }.unique()[0] + // def pca_header_multiqc = list.collect { id, state -> state.pca_header_multiqc }.unique()[0] + // def clustering_header_multiqc = list.collect { id, state -> state.clustering_header_multiqc }.unique()[0] + // def aligner = list.collect { id, state -> state.aligner }.unique()[0] + // def pseudo_aligner = list.collect { id, state -> state.pseudo_aligner }.unique()[0] + // def deseq2_vst = list.collect { id, state -> state.deseq2_vst }.unique()[0] + // 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 skip_qc = list.collect { id, state -> state.skip_qc }.unique()[0] + // def skip_align = list.collect { id, state -> state.skip_align }.unique()[0] + // def skip_pseudo_align = list.collect { id, state -> state.skip_pseudo_align }.unique()[0] + // def quant_results = list.collect { id, state -> + // (state.quant_results_file instanceof java.nio.file.Path && state.quant_results_file.exists()) ? + // state.quant_results_file : + // null } + // def rsem_counts_gene = list.collect { id, state -> + // (state.rsem_counts_gene instanceof java.nio.file.Path && state.rsem_counts_gene.exists()) ? + // state.rsem_counts_gene : + // null } + // def rsem_counts_transcripts = list.collect { id, state -> + // (state.rsem_counts_transcripts instanceof java.nio.file.Path && state.rsem_counts_transcripts.exists()) ? + // state.rsem_counts_transcripts : + // null } + // def pseudo_salmon_quant_results = list.collect { id, state -> + // (state.pseudo_salmon_quant_results_file instanceof java.nio.file.Path && state.pseudo_salmon_quant_results_file.exists()) ? + // state.pseudo_salmon_quant_results_file : + // null } + // def pseudo_kallisto_quant_results = list.collect { id, state -> + // (state.pseudo_kallisto_quant_results_file instanceof java.nio.file.Path && state.pseudo_kallisto_quant_results_file.exists()) ? + // state.pseudo_kallisto_quant_results_file : + // null } + // def fastqc_zip_1_dirs = list.collect{it[1].fastqc_zip_1.getParent()} + // def fastqc_zip_2_dirs = list.collect{it[1].fastqc_zip_2.getParent()} + // def trim_zip_1_dirs = list.collect{it[1].trim_zip_1.getParent()} + // def trim_zip_2_dirs = list.collect{it[1].trim_zip_2.getParent()} + // def trim_log_1_dirs = list.collect{it[1].trim_log_1.getParent()} + // def trim_log_2_dirs = list.collect{it[1].trim_log_2.getParent()} + // def sortmerna_multiqc_dirs = list.collect{it[1].sortmerna_multiqc.getParent()} + // def star_multiqc_dirs = list.collect{it[1].star_multiqc.getParent()} + // def genome_bam_stats_dirs = list.collect{it[1].genome_bam_stats.getParent()} + // def genome_bam_flagstat_dirs = list.collect{it[1].genome_bam_flagstat.getParent()} + // def genome_bam_idxstats_dirs = list.collect{it[1].genome_bam_idxstats} + // def markduplicates_multiqc_dirs = list.collect{it[1].markduplicates_multiqc.getParent()} + // def salmon_multiqc_dirs = list.collect{it[1].salmon_multiqc} + // def rsem_multiqc_dirs = list.collect{it[1].rsem_multiqc.getParent()} + // def pseudo_multiqc_dirs = list.collect{it[1].pseudo_multiqc.getParent()} + // def featurecounts_multiqc_dirs = list.collect{it[1].featurecounts_multiqc.getParent()} + // def featurecounts_rrna_multiqc_dirs = list.collect{it[1].featurecounts_rrna_multiqc.getParent()} + // def preseq_output_dirs = list.collect{it[1].preseq_output.getParent()} + // def qualimap_output_dirs = list.collect{it[1].qualimap_output_dir} + // def dupradar_output_dup_intercept_mqc_dirs = list.collect{it[1].dupradar_output_dup_intercept_mqc.getParent()} + // def dupradar_output_duprate_exp_denscurve_mqc_dirs = list.collect{it[1].dupradar_output_duprate_exp_denscurve_mqc.getParent()} + // def bamstat_output_dirs = list.collect{it[1].bamstat_output.getParent()} + // def strandedness_output_dirs = list.collect{it[1].strandedness_output.getParent()} + // def inner_dist_output_freq_dirs = list.collect{it[1].inner_dist_output_freq.getParent()} + // def junction_annotation_output_log_dirs = list.collect{it[1].junction_annotation_output_log.getParent()} + // def junction_saturation_output_plot_r_dirs = list.collect{it[1].junction_saturation_output_plot_r.getParent()} + // def read_distribution_output_dirs = list.collect{it[1].read_distribution_output.getParent()} + // def read_duplication_output_duplication_rate_mapping_dirs = list.collect{it[1].read_duplication_output_duplication_rate_mapping.getParent()} + // def tin_output_summary_dirs = list.collect{it[1].tin_output_summary.getParent()} + // def multiqc_custom_config_dirs = list.collect{it[1].multiqc_custom_config.getParent()} + // ["merged", [ + // ids: ids, + // strandedness: strandedness, + // num_trimmed_reads: num_trimmed_reads, + // passed_trimmed_reads: passed_trimmed_reads, + // passed_mapping: passed_mapping, + // percent_mapped: percent_mapped, + // inferred_strand: inferred_strand, + // passed_strand_check: passed_strand_check, + // skip_align: skip_align, + // skip_pseudo_align: skip_pseudo_align, + // quant_results: quant_results, + // rsem_counts_gene: rsem_counts_gene, + // rsem_counts_transcripts: rsem_counts_transcripts, + // pseudo_salmon_quant_results: pseudo_salmon_quant_results, + // pseudo_kallisto_quant_results: pseudo_kallisto_quant_results, + // gtf: gtf, + // gtf_extra_attributes: gtf_extra_attributes, + // gtf_group_features: gtf_group_features, + // pca_header_multiqc: pca_header_multiqc, + // clustering_header_multiqc: clustering_header_multiqc, + // aligner: aligner, + // pseudo_aligner: pseudo_aligner, + // deseq2_vst: deseq2_vst, + // extra_deseq2_args: extra_deseq2_args, + // extra_deseq2_args2: extra_deseq2_args2, + // skip_deseq2_qc: skip_deseq2_qc, + // multiqc_input: fastqc_zip_1_dirs + fastqc_zip_2_dirs + trim_zip_1_dirs + trim_zip_2_dirs + trim_log_1_dirs + trim_log_2_dirs + sortmerna_multiqc_dirs + star_multiqc_dirs + genome_bam_stats_dirs + genome_bam_flagstat_dirs + genome_bam_idxstats_dirs + markduplicates_multiqc_dirs + salmon_multiqc_dirs + rsem_multiqc_dirs + pseudo_multiqc_dirs + featurecounts_multiqc_dirs + featurecounts_rrna_multiqc_dirs + preseq_output_dirs + qualimap_output_dirs + dupradar_output_dup_intercept_mqc_dirs + dupradar_output_duprate_exp_denscurve_mqc_dirs + bamstat_output_dirs + strandedness_output_dirs + inner_dist_output_freq_dirs + junction_annotation_output_log_dirs + junction_saturation_output_plot_r_dirs + read_distribution_output_dirs + read_duplication_output_duplication_rate_mapping_dirs + tin_output_summary_dirs + multiqc_custom_config_dirs + // ] ] + // } + // Merge quantification results of alignment | merge_quant_results.run ( runIf: { id, state -> !state.skip_align && state.aligner == 'star_salmon' }, @@ -5168,19 +5298,36 @@ workflow run_wf { "lengths_transcript": "lengths_transcript", "quant_merged_summarizedexperiment": "quant_merged_summarizedexperiment" ], - key: "merge_qunat_results" + key: "merge_quant_results" + ) + + | rsem_merge_counts.run ( + runIf: { id, state -> state.aligner == 'star_rsem' }, + fromState: [ + "counts_gene": "rsem_counts_gene", + "counts_transcripts": "rsem_counts_transcripts" + ], + toState: [ + "tpm_gene": "merged_gene_tpm", + "counts_gene": "merged_gene_counts", + "tpm_transcript": "merged_transcript_tpm", + "counts_transcript": "merged_transcript_counts" + ] ) | deseq2_qc.run ( runIf: { id, state -> !state.skip_qc && !state.skip_deseq2_qc && !state.skip_align }, - fromState: [ - "counts": "counts_gene_length_scaled", - "pca_header_multiqc": "pca_header_multiqc", - "clustering_header_multiqc": "clustering_header_multiqc", - "deseq2_vst": "deseq2_vst", - "extra_deseq2_args": "extra_deseq2_args", - "extra_deseq2_args2": "extra_deseq2_args2" - ], + fromState: { id, state -> + def counts = (state.aligner == "star_rsem") ? state.counts_gene : state.counts_gene_length_scaled + [ + counts: counts, + pca_header_multiqc: state.pca_header_multiqc, + clustering_header_multiqc: state.clustering_header_multiqc, + deseq2_vst: state.deseq2_vst, + extra_deseq2_args: state.extra_deseq2_args, + extra_deseq2_args2: state.extra_deseq2_args2 + ] + }, toState: [ "deseq2_output": "deseq2_output", "deseq2_pca_multiqc": "pca_multiqc", @@ -5281,14 +5428,15 @@ workflow run_wf { "fastqc_raw_multiqc": "fastqc_zip", "fastqc_trim_multiqc": "trim_zip", "trim_log_multiqc": "trim_log", - "sortmerna_multiqc": "sortmerna_log", + "sortmerna_multiqc": "sortmerna_multiqc", "star_multiqc": "star_multiqc", "salmon_multiqc": "salmon_multiqc", + "rsem_multiqc": "rsem_multiqc", + "pseudo_multiqc": "pseudo_multiqc", "samtools_stats": "genome_bam_stats", "samtools_flagstat": "genome_bam_flagstat", "samtools_idxstats": "genome_bam_idxstats", - "markduplicates_multiqc": "markduplicates_multiqc", - "pseudo_multiqc": "pseudo_multiqc", + "markduplicates_multiqc": "markduplicates_multiqc", "featurecounts_multiqc": "featurecounts_multiqc", "featurecounts_rrna_multiqc": "featurecounts_rrna_multiqc", "aligner_pca_multiqc": "deseq2_pca_multiqc", @@ -5317,10 +5465,11 @@ workflow run_wf { "title": "multiqc_title", "input": "multiqc_input", ], + args: [exclude_modules: "general_stats"], toState: [ "multiqc_report": "output_report", "multiqc_data": "output_data", - "multiqc_plots": "output_plots", + "multiqc_plots": "output_plots" ] ) @@ -5422,8 +5571,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) diff --git a/target/nextflow/workflows/quality_control/nextflow_schema.json b/target/nextflow/workflows/quality_control/nextflow_schema.json index 665a9fa..41438af 100644 --- a/target/nextflow/workflows/quality_control/nextflow_schema.json +++ b/target/nextflow/workflows/quality_control/nextflow_schema.json @@ -110,8 +110,8 @@ "quant_out_dir": { "type": "string", - "description": "Type: `file`. Directory containing quantification results", - "help_text": "Type: `file`. Directory containing quantification results." + "description": "Type: `file`. Directory containing Salmon quantification results", + "help_text": "Type: `file`. Directory containing Salmon quantification results." } @@ -120,8 +120,8 @@ "quant_results_file": { "type": "string", - "description": "Type: `file`. Quantification file", - "help_text": "Type: `file`. Quantification file." + "description": "Type: `file`. Salmon quantification file", + "help_text": "Type: `file`. Salmon quantification file." } @@ -170,8 +170,28 @@ "pseudo_aligner": { "type": "string", - "description": "Type: `string`. Method used for [seudo alignment and quantification", - "help_text": "Type: `string`. Method used for [seudo alignment and quantification." + "description": "Type: `string`. Method used for pseudo alignment and quantification", + "help_text": "Type: `string`. Method used for pseudo alignment and quantification." + + } + + + , + "rsem_counts_gene": { + "type": + "string", + "description": "Type: `file`. Expression counts on gene level", + "help_text": "Type: `file`. Expression counts on gene level" + + } + + + , + "rsem_counts_transcripts": { + "type": + "string", + "description": "Type: `file`. Expression counts on transcript level", + "help_text": "Type: `file`. Expression counts on transcript level" } @@ -645,26 +665,6 @@ } - , - "mqc_yml": { - "type": - "string", - "description": "Type: `file`. Software versions", - "help_text": "Type: `file`. Software versions" - - } - - - , - "workflow_summary": { - "type": - "string", - "description": "Type: `file`. ", - "help_text": "Type: `file`. " - - } - - , "passed_trimmed_reads": { "type": @@ -785,6 +785,16 @@ } + , + "rsem_multiqc": { + "type": + "string", + "description": "Type: `file`. ", + "help_text": "Type: `file`. " + + } + + , "genome_bam_stats": { "type": @@ -1263,17 +1273,6 @@ } - , - "multiqc_versions": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.multiqc_versions.multiqc_versions`. ", - "help_text": "Type: `file`, default: `$id.$key.multiqc_versions.multiqc_versions`. " - , - "default": "$id.$key.multiqc_versions.multiqc_versions" - } - - , "featurecounts": { "type": diff --git a/target/nextflow/workflows/rnaseq/.config.vsh.yaml b/target/nextflow/workflows/rnaseq/.config.vsh.yaml index 6a43fe0..c5a7f34 100644 --- a/target/nextflow/workflows/rnaseq/.config.vsh.yaml +++ b/target/nextflow/workflows/rnaseq/.config.vsh.yaml @@ -523,18 +523,7 @@ argument_groups: info: null direction: "input" - type: "string" - name: "extra_rsem_prepare_reference_args" - description: "Extra arguments to pass to rsem-prepare-reference command in addition\ - \ to defaults defined by the pipeline." - info: null - default: - - "--star" - required: false - direction: "input" - multiple: false - multiple_sep: ";" - - type: "string" - name: "extra_rsem_calculate_expression_args" + name: "--extra_rsem_calculate_expression_args" description: "Extra arguments to pass to rsem-calculate-expression command in\ \ addition to defaults defined by the pipeline." info: null @@ -796,7 +785,7 @@ argument_groups: name: "--output_fasta" info: null default: - - "genome/reference_genome.fasta" + - "reference/genome.fasta" must_exist: true create_parent: true required: false @@ -807,7 +796,7 @@ argument_groups: name: "--output_gtf" info: null default: - - "genome/gene_annotation.gtf" + - "reference/gene_annotation.gtf" must_exist: true create_parent: true required: false @@ -818,7 +807,7 @@ argument_groups: name: "--output_transcript_fasta" info: null default: - - "genome/transcriptome.fasta" + - "reference/transcriptome.fasta" must_exist: true create_parent: true required: false @@ -829,7 +818,7 @@ argument_groups: name: "--output_gene_bed" info: null default: - - "genome/gene_annotation.bed" + - "reference/gene_annotation.bed" must_exist: true create_parent: true required: false @@ -841,7 +830,7 @@ argument_groups: description: "Path to STAR index." info: null default: - - "genome/index/STAR" + - "reference/index/STAR" must_exist: true create_parent: true required: false @@ -853,7 +842,7 @@ argument_groups: description: "Path to Salmon index." info: null default: - - "genome/index/Salmon" + - "reference/index/Salmon" must_exist: true create_parent: true required: false @@ -865,7 +854,7 @@ argument_groups: description: "Path to BBSplit index." info: null default: - - "genome/index/BBSplit" + - "reference/index/BBSplit" must_exist: true create_parent: true required: false @@ -877,7 +866,7 @@ argument_groups: description: "Path to Kallisto index." info: null default: - - "genome/index/Kallisto" + - "reference/index/Kallisto" must_exist: true create_parent: true required: false @@ -956,28 +945,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--trim_log_1" - info: null - default: - - "trimgalore/$id.read_1.trimming_report.txt" - must_exist: false - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--trim_log_2" - info: null - default: - - "trimgalore/$id.read_2.trimming_report.txt" - must_exist: false - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--trim_html_1" info: null @@ -1022,6 +989,52 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" + - type: "file" + name: "--trim_log_1" + info: null + default: + - "trimgalore/$id.read_1.trimming_report.txt" + must_exist: false + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--trim_log_2" + info: null + default: + - "trimgalore/$id.read_2.trimming_report.txt" + must_exist: false + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--fastp_trim_json" + description: "The fastp json format report file name" + info: null + default: + - "fastp/$id_out.json" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--fastp_trim_html" + description: "The fastp html format report file name" + info: null + default: + - "fastp/$id_out.html" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" - type: "file" name: "--sortmerna_log" description: "Sortmerna log file." @@ -1038,7 +1051,7 @@ argument_groups: name: "--star_alignment" info: null default: - - "STAR_alignment/$id" + - "STAR/$id" must_exist: true create_parent: true required: false @@ -1049,7 +1062,7 @@ argument_groups: name: "--genome_bam_sorted" info: null default: - - "STAR_alignment/genome_processed/$id.genome.bam" + - "STAR/genome_processed/$id.genome.bam" must_exist: true create_parent: true required: false @@ -1060,7 +1073,29 @@ argument_groups: name: "--genome_bam_index" info: null default: - - "STAR_alignment/genome_processed/$id.genome.bam.bai" + - "STAR/genome_processed/$id.genome.bam.bai" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--transcriptome_bam" + info: null + default: + - "STAR/transcriptome_processed/$id.transcriptome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--transcriptome_bam_index" + info: null + default: + - "STAR/transcriptome_processed/$id.transcriptome.bam.bai" must_exist: true create_parent: true required: false @@ -1100,28 +1135,6 @@ argument_groups: direction: "output" multiple: false multiple_sep: ";" - - type: "file" - name: "--transcriptome_bam" - info: null - default: - - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - - type: "file" - name: "--transcriptome_bam_index" - info: null - default: - - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam.bai" - must_exist: true - create_parent: true - required: false - direction: "output" - multiple: false - multiple_sep: ";" - type: "file" name: "--transcriptome_bam_stats" info: null @@ -1159,7 +1172,89 @@ argument_groups: name: "--salmon_quant_results" info: null default: - - "salmon/$id" + - "STAR_Salmon/$id" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--salmon_quant_results_file" + info: null + default: + - "STAR_Salmon/$id/quant.sf" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_quant_results" + info: null + default: + - "Pseudo_align_quant/$id" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_gene" + description: "Expression counts on gene level" + info: null + default: + - "RSEM/$id.genes.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--rsem_counts_transcripts" + description: "Expression counts on transcript level" + info: null + default: + - "RSEM/$id.isoforms.results" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_star_rsem" + description: "BAM file generated by STAR (from RSEM)" + info: null + default: + - "RSEM/$id.STAR.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_genome_rsem" + description: "Genome BAM file (from RSEM)" + info: null + default: + - "RSEM/$id.genome.bam" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--bam_transcript_rsem" + description: "Transcript BAM file (from RSEM)" + info: null + default: + - "RSEM/$id.transcript.bam" must_exist: true create_parent: true required: false @@ -1170,7 +1265,7 @@ argument_groups: name: "--tpm_gene" info: null default: - - "salmon/gene_tpm.tsv" + - "transcript_quantification/gene_tpm.tsv" must_exist: true create_parent: true required: false @@ -1181,7 +1276,7 @@ argument_groups: name: "--counts_gene" info: null default: - - "salmon/gene_counts.tsv" + - "transcript_quantification/gene_counts.tsv" must_exist: true create_parent: true required: false @@ -1192,7 +1287,7 @@ argument_groups: name: "--counts_gene_length_scaled" info: null default: - - "salmon/gene_counts_length_scaled.tsv" + - "transcript_quantification/gene_counts_length_scaled.tsv" must_exist: true create_parent: true required: false @@ -1203,7 +1298,7 @@ argument_groups: name: "--counts_gene_scaled" info: null default: - - "salmon/gene_counts_scaled.tsv" + - "transcript_quantification/gene_counts_scaled.tsv" must_exist: true create_parent: true required: false @@ -1214,7 +1309,7 @@ argument_groups: name: "--tpm_transcript" info: null default: - - "salmon/transcript_tpm.tsv" + - "transcript_quantification/transcript_tpm.tsv" must_exist: true create_parent: true required: false @@ -1225,7 +1320,7 @@ argument_groups: name: "--counts_transcript" info: null default: - - "salmon/transcript_counts.tsv" + - "transcript_quantification/transcript_counts.tsv" must_exist: true create_parent: true required: false @@ -1233,10 +1328,10 @@ argument_groups: multiple: false multiple_sep: ";" - type: "file" - name: "--salmon_merged_summarizedexperiment" + name: "--quant_merged_summarizedexperiment" info: null default: - - "salmon/summarizedexperiment" + - "transcript_quantification/summarizedexperiment" must_exist: true create_parent: true required: false @@ -1247,7 +1342,7 @@ argument_groups: name: "--markduplicates_metrics" info: null default: - - "picard/$id.sorted.MarkDuplicates.metrics.txt" + - "picard/$id.MarkDuplicates.metrics.txt" must_exist: true create_parent: true required: false @@ -1840,9 +1935,66 @@ argument_groups: multiple: false multiple_sep: ";" - type: "file" - name: "--versions" + name: "--pseudo_counts_gene" info: null - must_exist: false + default: + - "pseudo_alignment_quantification/gene_counts.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_gene_length_scaled" + info: null + default: + - "pseudo_alignment_quantification/gene_counts_length_scaled.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_gene_scaled" + info: null + default: + - "pseudo_alignment_quantification/gene_counts_scaled.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_tpm_transcript" + info: null + default: + - "pseudo_alignment_quantification/transcript_tpm.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_counts_transcript" + info: null + default: + - "pseudo_alignment_quantification/transcript_counts.tsv" + must_exist: true + create_parent: true + required: false + direction: "output" + multiple: false + multiple_sep: ";" + - type: "file" + name: "--pseudo_quant_merged_summarizedexperiment" + info: null + default: + - "pseudo_alignment_quantification/quant_merged_summarizedexperiment" + must_exist: true create_parent: true required: false direction: "output" @@ -1965,8 +2117,8 @@ build_info: output: "target/nextflow/workflows/rnaseq" executable: "target/nextflow/workflows/rnaseq/main.nf" viash_version: "0.9.0" - git_commit: "64aad6a006818388eceffe024b1701b3eae06bee" - git_remote: "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + git_commit: "1d87dc7c24f540c96460e69322f06d4be0bb7be8" + git_remote: "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" dependencies: - "target/nextflow/workflows/prepare_genome" - "target/nextflow/cat_fastq" diff --git a/target/nextflow/workflows/rnaseq/main.nf b/target/nextflow/workflows/rnaseq/main.nf index f10fe12..7741f4d 100644 --- a/target/nextflow/workflows/rnaseq/main.nf +++ b/target/nextflow/workflows/rnaseq/main.nf @@ -3391,19 +3391,7 @@ meta = [ }, { "type" : "string", - "name" : "extra_rsem_prepare_reference_args", - "description" : "Extra arguments to pass to rsem-prepare-reference command in addition to defaults defined by the pipeline.", - "default" : [ - "--star" - ], - "required" : false, - "direction" : "input", - "multiple" : false, - "multiple_sep" : ";" - }, - { - "type" : "string", - "name" : "extra_rsem_calculate_expression_args", + "name" : "--extra_rsem_calculate_expression_args", "description" : "Extra arguments to pass to rsem-calculate-expression command in addition to defaults defined by the pipeline.", "default" : [ "--star --star-output-genome-bam --star-gzipped-read-file --estimate-rspd --seed 1" @@ -3715,7 +3703,7 @@ meta = [ "type" : "file", "name" : "--output_fasta", "default" : [ - "genome/reference_genome.fasta" + "reference/genome.fasta" ], "must_exist" : true, "create_parent" : true, @@ -3728,7 +3716,7 @@ meta = [ "type" : "file", "name" : "--output_gtf", "default" : [ - "genome/gene_annotation.gtf" + "reference/gene_annotation.gtf" ], "must_exist" : true, "create_parent" : true, @@ -3741,7 +3729,7 @@ meta = [ "type" : "file", "name" : "--output_transcript_fasta", "default" : [ - "genome/transcriptome.fasta" + "reference/transcriptome.fasta" ], "must_exist" : true, "create_parent" : true, @@ -3754,7 +3742,7 @@ meta = [ "type" : "file", "name" : "--output_gene_bed", "default" : [ - "genome/gene_annotation.bed" + "reference/gene_annotation.bed" ], "must_exist" : true, "create_parent" : true, @@ -3768,7 +3756,7 @@ meta = [ "name" : "--output_star_index", "description" : "Path to STAR index.", "default" : [ - "genome/index/STAR" + "reference/index/STAR" ], "must_exist" : true, "create_parent" : true, @@ -3782,7 +3770,7 @@ meta = [ "name" : "--output_salmon_index", "description" : "Path to Salmon index.", "default" : [ - "genome/index/Salmon" + "reference/index/Salmon" ], "must_exist" : true, "create_parent" : true, @@ -3796,7 +3784,7 @@ meta = [ "name" : "--output_bbsplit_index", "description" : "Path to BBSplit index.", "default" : [ - "genome/index/BBSplit" + "reference/index/BBSplit" ], "must_exist" : true, "create_parent" : true, @@ -3810,7 +3798,7 @@ meta = [ "name" : "--output_kallisto_index", "description" : "Path to Kallisto index.", "default" : [ - "genome/index/Kallisto" + "reference/index/Kallisto" ], "must_exist" : true, "create_parent" : true, @@ -3903,32 +3891,6 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, - { - "type" : "file", - "name" : "--trim_log_1", - "default" : [ - "trimgalore/$id.read_1.trimming_report.txt" - ], - "must_exist" : false, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--trim_log_2", - "default" : [ - "trimgalore/$id.read_2.trimming_report.txt" - ], - "must_exist" : false, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" - }, { "type" : "file", "name" : "--trim_html_1", @@ -3981,6 +3943,60 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, + { + "type" : "file", + "name" : "--trim_log_1", + "default" : [ + "trimgalore/$id.read_1.trimming_report.txt" + ], + "must_exist" : false, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--trim_log_2", + "default" : [ + "trimgalore/$id.read_2.trimming_report.txt" + ], + "must_exist" : false, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--fastp_trim_json", + "description" : "The fastp json format report file name", + "default" : [ + "fastp/$id_out.json" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--fastp_trim_html", + "description" : "The fastp html format report file name", + "default" : [ + "fastp/$id_out.html" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, { "type" : "file", "name" : "--sortmerna_log", @@ -3999,7 +4015,7 @@ meta = [ "type" : "file", "name" : "--star_alignment", "default" : [ - "STAR_alignment/$id" + "STAR/$id" ], "must_exist" : true, "create_parent" : true, @@ -4012,7 +4028,7 @@ meta = [ "type" : "file", "name" : "--genome_bam_sorted", "default" : [ - "STAR_alignment/genome_processed/$id.genome.bam" + "STAR/genome_processed/$id.genome.bam" ], "must_exist" : true, "create_parent" : true, @@ -4025,7 +4041,33 @@ meta = [ "type" : "file", "name" : "--genome_bam_index", "default" : [ - "STAR_alignment/genome_processed/$id.genome.bam.bai" + "STAR/genome_processed/$id.genome.bam.bai" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--transcriptome_bam", + "default" : [ + "STAR/transcriptome_processed/$id.transcriptome.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--transcriptome_bam_index", + "default" : [ + "STAR/transcriptome_processed/$id.transcriptome.bam.bai" ], "must_exist" : true, "create_parent" : true, @@ -4073,32 +4115,6 @@ meta = [ "multiple" : false, "multiple_sep" : ";" }, - { - "type" : "file", - "name" : "--transcriptome_bam", - "default" : [ - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam" - ], - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" - }, - { - "type" : "file", - "name" : "--transcriptome_bam_index", - "default" : [ - "STAR_alignment/transcriptome_processed/$id.transcriptome.bam.bai" - ], - "must_exist" : true, - "create_parent" : true, - "required" : false, - "direction" : "output", - "multiple" : false, - "multiple_sep" : ";" - }, { "type" : "file", "name" : "--transcriptome_bam_stats", @@ -4142,7 +4158,103 @@ meta = [ "type" : "file", "name" : "--salmon_quant_results", "default" : [ - "salmon/$id" + "STAR_Salmon/$id" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--salmon_quant_results_file", + "default" : [ + "STAR_Salmon/$id/quant.sf" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_quant_results", + "default" : [ + "Pseudo_align_quant/$id" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_counts_gene", + "description" : "Expression counts on gene level", + "default" : [ + "RSEM/$id.genes.results" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--rsem_counts_transcripts", + "description" : "Expression counts on transcript level", + "default" : [ + "RSEM/$id.isoforms.results" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_star_rsem", + "description" : "BAM file generated by STAR (from RSEM)", + "default" : [ + "RSEM/$id.STAR.genome.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_genome_rsem", + "description" : "Genome BAM file (from RSEM)", + "default" : [ + "RSEM/$id.genome.bam" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--bam_transcript_rsem", + "description" : "Transcript BAM file (from RSEM)", + "default" : [ + "RSEM/$id.transcript.bam" ], "must_exist" : true, "create_parent" : true, @@ -4155,7 +4267,7 @@ meta = [ "type" : "file", "name" : "--tpm_gene", "default" : [ - "salmon/gene_tpm.tsv" + "transcript_quantification/gene_tpm.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4168,7 +4280,7 @@ meta = [ "type" : "file", "name" : "--counts_gene", "default" : [ - "salmon/gene_counts.tsv" + "transcript_quantification/gene_counts.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4181,7 +4293,7 @@ meta = [ "type" : "file", "name" : "--counts_gene_length_scaled", "default" : [ - "salmon/gene_counts_length_scaled.tsv" + "transcript_quantification/gene_counts_length_scaled.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4194,7 +4306,7 @@ meta = [ "type" : "file", "name" : "--counts_gene_scaled", "default" : [ - "salmon/gene_counts_scaled.tsv" + "transcript_quantification/gene_counts_scaled.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4207,7 +4319,7 @@ meta = [ "type" : "file", "name" : "--tpm_transcript", "default" : [ - "salmon/transcript_tpm.tsv" + "transcript_quantification/transcript_tpm.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4220,7 +4332,7 @@ meta = [ "type" : "file", "name" : "--counts_transcript", "default" : [ - "salmon/transcript_counts.tsv" + "transcript_quantification/transcript_counts.tsv" ], "must_exist" : true, "create_parent" : true, @@ -4231,9 +4343,9 @@ meta = [ }, { "type" : "file", - "name" : "--salmon_merged_summarizedexperiment", + "name" : "--quant_merged_summarizedexperiment", "default" : [ - "salmon/summarizedexperiment" + "transcript_quantification/summarizedexperiment" ], "must_exist" : true, "create_parent" : true, @@ -4246,7 +4358,7 @@ meta = [ "type" : "file", "name" : "--markduplicates_metrics", "default" : [ - "picard/$id.sorted.MarkDuplicates.metrics.txt" + "picard/$id.MarkDuplicates.metrics.txt" ], "must_exist" : true, "create_parent" : true, @@ -4779,7 +4891,7 @@ meta = [ "name" : "--dupradar_output_duprate_exp_boxplot", "description" : "path to output file (pdf) of distribution of expression box plot", "default" : [ - "dupradar/box_plot/$id.duprate_exp_boxplot.pdf" + "dupradar/''' + '''box_plot/$id.duprate_exp_boxplot.pdf" ], "must_exist" : true, "create_parent" : true, @@ -4885,7 +4997,7 @@ meta = [ { "type" : "file", "name" : "--multiqc_report", - "default''' + '''" : [ + "default" : [ "multiqc/multiqc_report.html" ], "must_exist" : true, @@ -4933,8 +5045,76 @@ meta = [ }, { "type" : "file", - "name" : "--versions", - "must_exist" : false, + "name" : "--pseudo_counts_gene", + "default" : [ + "pseudo_alignment_quantification/gene_counts.tsv" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_counts_gene_length_scaled", + "default" : [ + "pseudo_alignment_quantification/gene_counts_length_scaled.tsv" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_counts_gene_scaled", + "default" : [ + "pseudo_alignment_quantification/gene_counts_scaled.tsv" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_tpm_transcript", + "default" : [ + "pseudo_alignment_quantification/transcript_tpm.tsv" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_counts_transcript", + "default" : [ + "pseudo_alignment_quantification/transcript_counts.tsv" + ], + "must_exist" : true, + "create_parent" : true, + "required" : false, + "direction" : "output", + "multiple" : false, + "multiple_sep" : ";" + }, + { + "type" : "file", + "name" : "--pseudo_quant_merged_summarizedexperiment", + "default" : [ + "pseudo_alignment_quantification/quant_merged_summarizedexperiment" + ], + "must_exist" : true, "create_parent" : true, "required" : false, "direction" : "output", @@ -5103,8 +5283,8 @@ meta = [ "engine" : "native", "output" : "/workdir/root/repo/target/nextflow/workflows/rnaseq", "viash_version" : "0.9.0", - "git_commit" : "64aad6a006818388eceffe024b1701b3eae06bee", - "git_remote" : "https://x-access-token:ghs_sq8cBpPtIm1wZvLlQUshbKRwwqLLDl0UmbNu@github.com/viash-hub/rnaseq" + "git_commit" : "1d87dc7c24f540c96460e69322f06d4be0bb7be8", + "git_remote" : "https://x-access-token:ghs_vs3fpTo1mWGISEIj2mqOUQA3IRBYZ30EQLHG@github.com/viash-hub/rnaseq" }, "package_config" : { "version" : "main", @@ -5180,27 +5360,27 @@ workflow run_wf { | map { list -> [ "ref", - [ fasta: list[1][-1].fasta, - gtf: list[1][-1].gtf, - gff: list[1][-1].gff, - additional_fasta: list[1][-1].additional_fasta, - transcript_fasta: list[1][-1].transcript_fasta, - gene_bed: list[1][-1].gene_bed, - bbsplit_fasta_list: list[1][-1].bbsplit_fasta_list, - aligner: list[1][-1].aligner, - pseudo_aligner: list[1][-1].pseudo_aligner, - star_index: list[1][-1].star_index, - rsem_index: list[1][-1].rsem_index, - salmon_index: list[1][-1].salmon_index, - kallisto_index: list[1][-1].kallisto_index, - // splicesites: list[1][-1].splicesites, - // hisat2_index: list[1][-1].hisat2_index, - bbsplit_index: list[1][-1].bbsplit_index, - skip_bbsplit: list[1][-1].skip_bbsplit, - gencode: list[1][-1].gencode, - biotype: list[1][-1].biotype, - filter_gtf: list[1][-1].filter_gtf, - pseudo_aligner_kmer_size: list[1][-1].pseudo_aligner_kmer_size ] + [ fasta: list.collect { id, state -> state.fasta }.unique()[0], + gtf: list.collect { id, state -> state.gtf }.unique()[0], + gff: list.collect { id, state -> state.gff }.unique()[0], + additional_fasta: list.collect { id, state -> state.additional_fasta }.unique()[0], + transcript_fasta:list.collect { id, state -> state.transcript_fasta }.unique()[0], + gene_bed: list.collect { id, state -> state.gene_bed }.unique()[0], + bbsplit_fasta_list: list.collect { id, state -> state.bbsplit_fasta_list }.unique()[0], + aligner: list.collect { id, state -> state.aligner }.unique()[0], + pseudo_aligner: list.collect { id, state -> state.pseudo_aligner }.unique()[0], + star_index: list.collect { id, state -> state.star_index }.unique()[0], + rsem_index: list.collect { id, state -> state.rsem_index }.unique()[0], + salmon_index: list.collect { id, state -> state.salmon_index }.unique()[0], + kallisto_index: list.collect { id, state -> state.kallisto_index }.unique()[0], + // splicesites: list.collect { id, state -> state.splicesites }.unique()[0], + // hisat2_index: list.collect { id, state -> state.hisat2_index }.unique()[0], + bbsplit_index: list.collect { id, state -> state.bbsplit_index }.unique()[0], + skip_bbsplit: list.collect { id, state -> state.skip_bbsplit }.unique()[0], + gencode: list.collect { id, state -> state.gencode }.unique()[0], + biotype: list.collect { id, state -> state.biotype }.unique()[0], + filter_gtf: list.collect { id, state -> state.filter_gtf }.unique()[0], + pseudo_aligner_kmer_size: list.collect { id, state -> state.pseudo_aligner_kmer_size }.unique()[0] ] ] } @@ -5371,11 +5551,14 @@ workflow run_wf { "gtf_group_features": "gtf_group_features", "gtf_extra_attributes": "gtf_extra_attributes", "salmon_quant_libtype": "salmon_quant_libtype", - "salmon_index": "salmon_index" + "salmon_index": "salmon_index", + "extra_rsem_calculate_expression_args": "extra_rsem_calculate_expression_args" ], toState: [ "star_alignment": "star_alignment", "star_multiqc": "star_multiqc", + "rsem_multiqc": "rsem_multiqc", + "salmon_multiqc": "salmon_multiqc", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", "genome_bam_stats": "genome_bam_stats", @@ -5387,7 +5570,11 @@ workflow run_wf { "transcriptome_bam_flagstat": "transcriptome_bam_flagstat", "transcriptome_bam_idxstats": "transcriptome_bam_idxstats", "quant_out_dir": "quant_out_dir", - "quant_results_file": "quant_results_file" + "quant_results_file": "quant_results_file", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "bam_genome_rsem": "bam_genome_rsem", + "bam_transcript_rsem": "bam_transcript_rsem" ] ) @@ -5397,7 +5584,7 @@ workflow run_wf { def passed_mapping = (percent_mapped >= state.min_mapped_reads) ? true : false [ id, state + [percent_mapped: percent_mapped, passed_mapping: passed_mapping] ] } - + // Pseudo-alignment and quantification | pseudo_alignment_and_quant.run ( runIf: { id, state -> !state.skip_pseudo_alignment && state.passed_trimmed_reads }, @@ -5489,16 +5676,23 @@ workflow run_wf { "skip_align": "skip_alignment", "skip_pseudo_align": "skip_pseudo_alignment", "gtf": "gtf", + "num_trimmed_reads": "num_trimmed_reads", + "passed_trimmed_reads": "passed_trimmed_reads", + "passed_mapping": "passed_mapping", + "percent_mapped": "percent_mapped", "genome_bam": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "quant_out_dir": "quant_out_dir", + "salmon_multiqc": "salmon_multiqc", "quant_results_file": "quant_results_file", + "rsem_multiqc": "rsem_multiqc", + "rsem_counts_gene": "rsem_counts_gene", + "rsem_counts_transcripts": "rsem_counts_transcripts", + "pseudo_multiqc": "pseudo_multiqc", "pseudo_quant_out_dir": "pseudo_quant_out_dir", "pseudo_salmon_quant_results_file": "pseudo_salmon_quant_results_file", "pseudo_kallisto_quant_results_file": "pseudo_kallisto_quant_results_file", "aligner": "aligner", "pseudo_aligner": "pseudo_aligner", - "pseudo_multiqc": "pseudo_multiqc", "gene_bed": "gene_bed", "extra_preseq_args": "extra_preseq_args", "extra_featurecounts_args": "extra_featurecounts_args", @@ -5526,11 +5720,7 @@ workflow run_wf { "genome_bam_flagstat": "genome_bam_flagstat", "genome_bam_idxstats": "genome_bam_idxstats", "markduplicates_multiqc": "markduplicates_metrics", - "rseqc_modules": "rseqc_modules", - "num_trimmed_reads": "num_trimmed_reads", - "passed_trimmed_reads": "passed_trimmed_reads", - "passed_mapping": "passed_mapping", - "percent_mapped": "percent_mapped" + "rseqc_modules": "rseqc_modules" ], toState: [ "preseq_output": "preseq_output", @@ -5576,7 +5766,7 @@ workflow run_wf { "counts_gene_scaled": "counts_gene_scaled", "tpm_transcript": "tpm_transcript", "counts_transcript": "counts_transcript", - "salmon_merged_summarizedexperiment": "salmon_merged_summarizedexperiment", + "qunat_merged_summarizedexperiment": "quant_merged_summarizedexperiment", "deseq2_output": "deseq2_output", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", @@ -5615,15 +5805,17 @@ workflow run_wf { "star_alignment": "star_alignment", "genome_bam_sorted": "genome_bam_sorted", "genome_bam_index": "genome_bam_index", - "genome_bam_stats": "samtools_stats", - "genome_bam_flagstat": "samtools_flagstat", - "genome_bam_idxstats": "samtools_idxstats", + "genome_bam_stats": "genome_bam_stats", + "genome_bam_flagstat": "genome_bam_flagstat", + "genome_bam_idxstats": "genome_bam_idxstats", "transcriptome_bam": "transcriptome_bam", "transcriptome_bam_index": "transcriptome_bam_index", "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": "quant_out_dir", + "pseudo_quant_results": "pseudo_quant_out_dir", + "markduplicates_metrics": "markduplicates_metrics", "stringtie_transcript_gtf": "stringtie_transcript_gtf", "stringtie_coverage_gtf": "stringtie_coverage_gtf", "stringtie_abundance": "stringtie_abundance", @@ -5689,8 +5881,7 @@ workflow run_wf { "deseq2_output_pseudo": "deseq2_output_pseudo", "multiqc_report": "multiqc_report", "multiqc_data": "multiqc_data", - "multiqc_plots": "multiqc_plots", - "multiqc_versions": "multiqc_versions" + "multiqc_plots": "multiqc_plots" ] ) @@ -5769,7 +5960,7 @@ def getFastpReadsAfterFiltering(json_file) { } // -// Function that parses and returns the alignment rate from the STAR log output +// Function that parses and returns the alignment rate from the STAR log outputs // def getStarPercentMapped(align_log) { def percent_aligned = 0 diff --git a/target/nextflow/workflows/rnaseq/nextflow_schema.json b/target/nextflow/workflows/rnaseq/nextflow_schema.json index fd442f6..cb85c7f 100644 --- a/target/nextflow/workflows/rnaseq/nextflow_schema.json +++ b/target/nextflow/workflows/rnaseq/nextflow_schema.json @@ -615,17 +615,6 @@ } - , - "extra_rsem_prepare_reference_args": { - "type": - "string", - "description": "Type: `string`, default: `--star`. Extra arguments to pass to rsem-prepare-reference command in addition to defaults defined by the pipeline", - "help_text": "Type: `string`, default: `--star`. Extra arguments to pass to rsem-prepare-reference command in addition to defaults defined by the pipeline." - , - "default": "--star" - } - - , "extra_rsem_calculate_expression_args": { "type": @@ -1140,28 +1129,6 @@ } - , - "trim_log_1": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.trim_log_1.txt`. ", - "help_text": "Type: `file`, default: `$id.$key.trim_log_1.txt`. " - , - "default": "$id.$key.trim_log_1.txt" - } - - - , - "trim_log_2": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.trim_log_2.txt`. ", - "help_text": "Type: `file`, default: `$id.$key.trim_log_2.txt`. " - , - "default": "$id.$key.trim_log_2.txt" - } - - , "trim_html_1": { "type": @@ -1206,6 +1173,50 @@ } + , + "trim_log_1": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.trim_log_1.txt`. ", + "help_text": "Type: `file`, default: `$id.$key.trim_log_1.txt`. " + , + "default": "$id.$key.trim_log_1.txt" + } + + + , + "trim_log_2": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.trim_log_2.txt`. ", + "help_text": "Type: `file`, default: `$id.$key.trim_log_2.txt`. " + , + "default": "$id.$key.trim_log_2.txt" + } + + + , + "fastp_trim_json": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.fastp_trim_json.json`. The fastp json format report file name", + "help_text": "Type: `file`, default: `$id.$key.fastp_trim_json.json`. The fastp json format report file name" + , + "default": "$id.$key.fastp_trim_json.json" + } + + + , + "fastp_trim_html": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.fastp_trim_html.html`. The fastp html format report file name", + "help_text": "Type: `file`, default: `$id.$key.fastp_trim_html.html`. The fastp html format report file name" + , + "default": "$id.$key.fastp_trim_html.html" + } + + , "sortmerna_log": { "type": @@ -1250,6 +1261,28 @@ } + , + "transcriptome_bam": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.transcriptome_bam.bam`. ", + "help_text": "Type: `file`, default: `$id.$key.transcriptome_bam.bam`. " + , + "default": "$id.$key.transcriptome_bam.bam" + } + + + , + "transcriptome_bam_index": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.transcriptome_bam_index.bai`. ", + "help_text": "Type: `file`, default: `$id.$key.transcriptome_bam_index.bai`. " + , + "default": "$id.$key.transcriptome_bam_index.bai" + } + + , "genome_bam_stats": { "type": @@ -1283,28 +1316,6 @@ } - , - "transcriptome_bam": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.transcriptome_bam.bam`. ", - "help_text": "Type: `file`, default: `$id.$key.transcriptome_bam.bam`. " - , - "default": "$id.$key.transcriptome_bam.bam" - } - - - , - "transcriptome_bam_index": { - "type": - "string", - "description": "Type: `file`, default: `$id.$key.transcriptome_bam_index.bai`. ", - "help_text": "Type: `file`, default: `$id.$key.transcriptome_bam_index.bai`. " - , - "default": "$id.$key.transcriptome_bam_index.bai" - } - - , "transcriptome_bam_stats": { "type": @@ -1349,6 +1360,83 @@ } + , + "salmon_quant_results_file": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.salmon_quant_results_file.sf`. ", + "help_text": "Type: `file`, default: `$id.$key.salmon_quant_results_file.sf`. " + , + "default": "$id.$key.salmon_quant_results_file.sf" + } + + + , + "pseudo_quant_results": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_quant_results.pseudo_quant_results`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_quant_results.pseudo_quant_results`. " + , + "default": "$id.$key.pseudo_quant_results.pseudo_quant_results" + } + + + , + "rsem_counts_gene": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.rsem_counts_gene.results`. Expression counts on gene level", + "help_text": "Type: `file`, default: `$id.$key.rsem_counts_gene.results`. Expression counts on gene level" + , + "default": "$id.$key.rsem_counts_gene.results" + } + + + , + "rsem_counts_transcripts": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.rsem_counts_transcripts.results`. Expression counts on transcript level", + "help_text": "Type: `file`, default: `$id.$key.rsem_counts_transcripts.results`. Expression counts on transcript level" + , + "default": "$id.$key.rsem_counts_transcripts.results" + } + + + , + "bam_star_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_star_rsem.bam`. BAM file generated by STAR (from RSEM)", + "help_text": "Type: `file`, default: `$id.$key.bam_star_rsem.bam`. BAM file generated by STAR (from RSEM)" + , + "default": "$id.$key.bam_star_rsem.bam" + } + + + , + "bam_genome_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_genome_rsem.bam`. Genome BAM file (from RSEM)", + "help_text": "Type: `file`, default: `$id.$key.bam_genome_rsem.bam`. Genome BAM file (from RSEM)" + , + "default": "$id.$key.bam_genome_rsem.bam" + } + + + , + "bam_transcript_rsem": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.bam_transcript_rsem.bam`. Transcript BAM file (from RSEM)", + "help_text": "Type: `file`, default: `$id.$key.bam_transcript_rsem.bam`. Transcript BAM file (from RSEM)" + , + "default": "$id.$key.bam_transcript_rsem.bam" + } + + , "tpm_gene": { "type": @@ -1416,13 +1504,13 @@ , - "salmon_merged_summarizedexperiment": { + "quant_merged_summarizedexperiment": { "type": "string", - "description": "Type: `file`, default: `$id.$key.salmon_merged_summarizedexperiment.salmon_merged_summarizedexperiment`. ", - "help_text": "Type: `file`, default: `$id.$key.salmon_merged_summarizedexperiment.salmon_merged_summarizedexperiment`. " + "description": "Type: `file`, default: `$id.$key.quant_merged_summarizedexperiment.quant_merged_summarizedexperiment`. ", + "help_text": "Type: `file`, default: `$id.$key.quant_merged_summarizedexperiment.quant_merged_summarizedexperiment`. " , - "default": "$id.$key.salmon_merged_summarizedexperiment.salmon_merged_summarizedexperiment" + "default": "$id.$key.quant_merged_summarizedexperiment.quant_merged_summarizedexperiment" } @@ -1988,13 +2076,68 @@ , - "versions": { + "pseudo_counts_gene": { "type": "string", - "description": "Type: `file`, default: `$id.$key.versions.versions`. ", - "help_text": "Type: `file`, default: `$id.$key.versions.versions`. " + "description": "Type: `file`, default: `$id.$key.pseudo_counts_gene.tsv`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_counts_gene.tsv`. " , - "default": "$id.$key.versions.versions" + "default": "$id.$key.pseudo_counts_gene.tsv" + } + + + , + "pseudo_counts_gene_length_scaled": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_counts_gene_length_scaled.tsv`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_counts_gene_length_scaled.tsv`. " + , + "default": "$id.$key.pseudo_counts_gene_length_scaled.tsv" + } + + + , + "pseudo_counts_gene_scaled": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_counts_gene_scaled.tsv`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_counts_gene_scaled.tsv`. " + , + "default": "$id.$key.pseudo_counts_gene_scaled.tsv" + } + + + , + "pseudo_tpm_transcript": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_tpm_transcript.tsv`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_tpm_transcript.tsv`. " + , + "default": "$id.$key.pseudo_tpm_transcript.tsv" + } + + + , + "pseudo_counts_transcript": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_counts_transcript.tsv`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_counts_transcript.tsv`. " + , + "default": "$id.$key.pseudo_counts_transcript.tsv" + } + + + , + "pseudo_quant_merged_summarizedexperiment": { + "type": + "string", + "description": "Type: `file`, default: `$id.$key.pseudo_quant_merged_summarizedexperiment.pseudo_quant_merged_summarizedexperiment`. ", + "help_text": "Type: `file`, default: `$id.$key.pseudo_quant_merged_summarizedexperiment.pseudo_quant_merged_summarizedexperiment`. " + , + "default": "$id.$key.pseudo_quant_merged_summarizedexperiment.pseudo_quant_merged_summarizedexperiment" }