Build branch add-labels with version add-labels (0b5aea9)

Build pipeline: viash-hub.rnaseq.add-labels-v42km

Source commit: 0b5aea9962

Source message: Add test workflow and fix some issues
This commit is contained in:
CI
2024-12-03 19:59:42 +00:00
parent 15c280b8fc
commit 6983bda4f9
233 changed files with 1021 additions and 1016 deletions

View File

@@ -164,7 +164,7 @@ workflow run_wf {
],
directives: [ label: [ "lowmem", "midcpu" ] ]
)
// untar bbsplit index, if available
| untar.run (
runIf: {id, state -> state.bbsplit_index},
@@ -176,16 +176,12 @@ workflow run_wf {
| map { id, state ->
// Check if bbsplit_fasta_list is defined
if (state.bbsplit_fasta_list) {
def ref = [state.fasta] + state.bbsplit_fasta_list
} else {
def ref = [state.fasta]
}
def ref = (state.bbsplit_fasta_list) ?
[state.fasta] + state.bbsplit_fasta_list :
[state.fasta]
[id, state + [bbsplit_ref: ref] ]
}
| niceView()
// create bbsplit index, if not already available
| bbmap_bbsplit.run (
runIf: {id, state -> !state.skip_bbsplit && !state.bbsplit_index},

View File

@@ -1,3 +1,4 @@
// TODO: Split in /sample and integrated QC
workflow run_wf {
take:
@@ -7,7 +8,7 @@ workflow run_wf {
qc_ch = input_ch
// temporary fix to force assignment when alignment in skipped
// temporary fix to force assignment when alignment is skipped
// TODO: Check this
| map {it}
@@ -825,5 +826,3 @@ def getInferexperimentStrandedness(inferexperiment_file, cutoff=30) {
return [ strandedness, sense, antisense, undetermined ]
}

View File

@@ -244,9 +244,9 @@ argument_groups:
- name: "--skip_preseq"
type: boolean_true
description: Skip Preseq.
- name: "--skip_deseq2_qc"
type: boolean_true
description: Skip DESeq2 PCA and heatmap plotting.
# - name: "--skip_deseq2_qc"
# type: boolean_true
# description: Skip DESeq2 PCA and heatmap plotting.
- name: --skip_dupradar
type: boolean_true
description: Skip dupRadar.

View File

@@ -339,11 +339,16 @@ workflow run_wf {
)
// Final QC
// Temporarily skip DESeq2 QC for now
// https://github.com/viash-hub/rnaseq/issues/31
| map{ id, state -> [ id, state + [ skip_deseq2_qc: true ] ] }
| quality_control.run (
fromState: [
"id": "id",
"paired": "paired",
"strandedness": "strandedness",
"strandedness": "strandedness",
"skip_align": "skip_alignment",
"skip_pseudo_align": "skip_pseudo_alignment",
"skip_dupradar": "skip_dupradar",
@@ -351,12 +356,12 @@ workflow run_wf {
"skip_rseqc": "skip_rseqc",
"skip_multiqc": "skip_multiqc",
"skip_preseq": "skip_preseq",
"gtf": "gtf",
"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": "genome_bam_sorted",
"genome_bam_index": "genome_bam_index",
"salmon_multiqc": "salmon_multiqc",
"quant_results_file": "quant_results_file",
@@ -365,34 +370,34 @@ workflow run_wf {
"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_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",
"gene_bed": "gene_bed",
"extra_preseq_args": "extra_preseq_args",
"biotype": "biotype",
"skip_biotype_qc": "skip_biotype_qc",
"featurecounts_group_type": "featurecounts_group_type",
"featurecounts_feature_type": "featurecounts_feature_type",
"biotype": "biotype",
"skip_biotype_qc": "skip_biotype_qc",
"featurecounts_group_type": "featurecounts_group_type",
"featurecounts_feature_type": "featurecounts_feature_type",
"gencode": "gencode",
"skip_deseq2_qc": "skip_deseq2_qc",
"skip_deseq2_qc": "skip_deseq2_qc",
"deseq2_vst": "deseq2_vst",
"multiqc_custom_config": "multiqc_custom_config",
"multiqc_custom_config": "multiqc_custom_config",
"multiqc_title": "multiqc_title",
"multiqc_methods_description": "multiqc_methods_description",
"fastqc_zip_1": "fastqc_zip_1",
"fastqc_zip_2": "fastqc_zip_2",
"trim_log_1": "trim_log_1",
"trim_log_2": "trim_log_2",
"fastqc_zip_2": "fastqc_zip_2",
"trim_log_1": "trim_log_1",
"trim_log_2": "trim_log_2",
"trim_zip_1": "trim_zip_1",
"trim_zip_2": "trim_zip_2",
"sortmerna_multiqc": "sortmerna_log",
"star_multiqc": "star_multiqc",
"genome_bam_stats": "genome_bam_stats",
"genome_bam_flagstat": "genome_bam_flagstat",
"genome_bam_idxstats": "genome_bam_idxstats",
"markduplicates_multiqc": "markduplicates_metrics",
"sortmerna_multiqc": "sortmerna_log",
"star_multiqc": "star_multiqc",
"genome_bam_stats": "genome_bam_stats",
"genome_bam_flagstat": "genome_bam_flagstat",
"genome_bam_idxstats": "genome_bam_idxstats",
"markduplicates_multiqc": "markduplicates_metrics",
"rseqc_modules": "rseqc_modules"
],
toState: [
@@ -440,7 +445,7 @@ workflow run_wf {
"counts_gene_scaled": "counts_gene_scaled",
"tpm_transcript": "tpm_transcript",
"counts_transcript": "counts_transcript",
"qunat_merged_summarizedexperiment": "quant_merged_summarizedexperiment",
"quant_merged_summarizedexperiment": "quant_merged_summarizedexperiment",
"deseq2_output": "deseq2_output",
"pseudo_tpm_gene": "pseudo_tpm_gene",
"pseudo_counts_gene": "pseudo_counts_gene",

View File

@@ -0,0 +1,14 @@
manifest {
nextflowVersion = '!>=20.12.1-edge'
}
params {
rootDir = java.nio.file.Paths.get("$projectDir/../../../").toAbsolutePath().normalize().toString()
}
// Some important settings
docker.fixOwnership = true
process.container = "nextflow/nextflow:24.04.2"
// include common settings
includeConfig("${params.rootDir}/src/workflows/utils/labels.config")

View File

@@ -0,0 +1,53 @@
include { rnaseq } from params.rootDir + "/target/nextflow/workflows/rnaseq/main.nf"
params.resources_test = params.rootDir + "/resources_test"
workflow test_wf {
resources_test = file(params.resources_test)
output_ch =
Channel.fromList([
[
id: "_test",
fastq_1: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/testdata/GSE110004/SRR6357070_1.fastq.gz;" +
"https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/testdata/GSE110004/SRR6357071_1.fastq.gz" ,
fastq_2: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/testdata/GSE110004/SRR6357070_2.fastq.gz;" +
"https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/testdata/GSE110004/SRR6357071_2.fastq.gz",
strandedness: "reverse",
fasta: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/reference/genome.fasta",
gtf: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/reference/genes.gtf.gz",
additional_fasta: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/reference/gfp.fa.gz",
transcript_fasta: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/reference/transcriptome.fasta",
salmon_index: "https://github.com/nf-core/test-datasets/raw/refs/heads/rnaseq/reference/salmon.tar.gz",
publish_dir: "output/",
skip_deseq2_qc: true
]
])
| map { state -> [state.id, state] }
| rnaseq.run(
fromState: { id, state -> state },
toState: { id, output, state -> output }
)
| view { output ->
assert output.size() == 2 : "Outputs should contain two elements; [id, state]"
// check id
def id = output[0]
assert id.endsWith("_test")
// check output
def state = output[1]
assert state instanceof Map : "State should be a map. Found: ${state}"
assert state.containsKey("output_fasta") : "Output should contain key 'output_fasta'."
assert state.output_fasta.isFile() : "'output_fasta' should be a file."
assert state.containsKey("output_gtf") : "Output should contain key 'output_gtf'."
assert state.output_gtf.isFile() : "'output_gtf' should be a file."
"Output: $output"
}
}