Merge branch 'add-util' into 'dev'

Reconcile template

See merge request epi2melabs/workflows/wf-transcriptomes!110
This commit is contained in:
Neil Horner 2023-07-04 10:13:05 +00:00
commit 53c933aac6
3 changed files with 38 additions and 12 deletions

View File

@ -77,7 +77,7 @@ docker-run:
--de_analysis \
--ref_genome differential_expression/hg38_chr20.fa --transcriptome-source reference-guided \
--ref_annotation differential_expression/gencode.v22.annotation.chr20.gtf \
--direct_rna --minimap_index_opts \\-k15"
--direct_rna --minimap_index_opts '-k 15'"
NF_IGNORE_PROCESSES: preprocess_reads,merge_transcriptomes,decompress_annotation,decompress_ref
- if: $MATRIX_NAME == "only_differential_expression"
variables:
@ -87,7 +87,7 @@ docker-run:
--de_analysis \
--ref_genome differential_expression/hg38_chr20.fa \
--ref_annotation differential_expression/gencode.v22.annotation.chr20.gff \
--direct_rna --minimap_index_opts \\-k15 \
--direct_rna --minimap_index_opts '-k 15' \
--ref_transcriptome differential_expression/ref_transcriptome.fasta \
--transcriptome_assembly false"
NF_IGNORE_PROCESSES: >
@ -101,7 +101,7 @@ docker-run:
--de_analysis \
--ref_genome differential_expression/hg38_chr20.fa \
--ref_annotation differential_expression/gencode.v22.annotation.chr20.gff3 \
--direct_rna --minimap_index_opts \\-k15 \
--direct_rna --minimap_index_opts '-k 15' \
--ref_transcriptome differential_expression/ref_transcriptome.fasta \
--transcriptome_assembly false"
NF_IGNORE_PROCESSES: >
@ -110,13 +110,13 @@ docker-run:
- if: $MATRIX_NAME == "ncbi_gzip"
variables:
NF_BEFORE_SCRIPT: wget -O differential_expression.tar.gz https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-isoforms/differential_expression.tar.gz && tar -xzvf differential_expression.tar.gz
NF_WORKFLOW_OPTS: "-executor.$$local.memory 16GB \
NF_WORKFLOW_OPTS: "-executor.\\$$local.memory 16GB \
--fastq differential_expression/differential_expression_fastq \
--transcriptome-source precomputed \
--de_analysis \
--ref_genome differential_expression/GRCh38.p14.NCBI_test.fna.gz \
--ref_annotation differential_expression/GRCh38.p14_NCBI_test.gtf.gz \
--direct_rna --minimap_index_opts \\-w25 \
--direct_rna --minimap_index_opts '-w 25' \
--transcriptome_assembly false"
NF_IGNORE_PROCESSES: >
preprocess_reads,merge_transcriptomes,assemble_transcripts,

26
lib/CWUtil.groovy Normal file
View File

@ -0,0 +1,26 @@
/* Miscellaneous utilities for workflows from the ONT Customer Workflows Group.
*/
class CWUtil {
/* Mutate the global Nextflow params map
*
* Occasionally, we may wish to mutate the value of a parameter provided
* by the user. Typically, this leads to workflows with `params.my_param`
* and `params._my_param` which is ripe for confusion. Instead, we can
* mutate the parameter value in the Nextflow params ScriptMap itself
* with the following call:
*
* CWUtil.mutateParam(params, k, v)
*
* This is possible as Groovy actually has a surprisingly loose
* definition of "private", and allows us to call the private `allowNames`
* method on the ScriptMap which removes the read-only status for a key set.
* We can follow this up with a call to the private `put0` to reinsert
* the key and mark it as read-only again.
*/
public static void mutateParam(nf_params, key, value) {
Set s = [key] // must be a set to allow call to allowNames
nf_params.allowNames(s)
nf_params.put0(key, value)
}
}

View File

@ -97,12 +97,12 @@ params {
wf {
example_cmd = [
"--fastq test_data/fastq",
"--ref_genome test_data/SIRV_150601a.fasta",
"--ref_annotation test_data/SIRV_isofroms.gtf",
"--jaffal_refBase chr20/",
"--jaffal_genome hg38",
"--jaffal_annotation genCode22"
"--condition_sheet 'wf-transcriptomes-demo/condition_sheet.tsv'",
"--direct_rna",
"--fastq 'wf-transcriptomes-demo/differential_expression_fastq'",
"--minimap_index_opts '-k15'",
"--ref_annotation 'wf-transcriptomes-demo/gencode.v22.annotation.chr20.gtf'",
"--ref_genome 'wf-transcriptomes-demo/hg38_chr20.fa'",
]
agent = null
container_sha = "sha203915eb4b4dd444cb2e845d0b9f7814e26b7b5c"