Merge branch 'CW-3127' into 'dev'

pychopper parameters clear up

Closes CW-3127

See merge request epi2melabs/workflows/wf-transcriptomes!142
This commit is contained in:
Sarah Griffiths 2023-12-04 21:12:57 +00:00
commit feed09c16c
9 changed files with 54 additions and 19 deletions

View File

@ -64,7 +64,7 @@ docker-run:
variables:
NF_BEFORE_SCRIPT: wget -O test_data.tar.gz https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-isoforms/wf-isoforms_test_data.tar.gz && tar -xzvf test_data.tar.gz
NF_WORKFLOW_OPTS: "--fastq ERR6053095_chr20.fastq --transcriptome-source reference-guided \
--ref_genome chr20/hg38_chr20.fa --ref_annotation chr20/gencode.v22.annotation.chr20.gtf"
--ref_genome chr20/hg38_chr20.fa --ref_annotation chr20/gencode.v22.annotation.chr20.gtf --pychopper_backend phmm"
NF_IGNORE_PROCESSES: preprocess_reads,merge_transcriptomes,decompress_annotation,decompress_ref,decompress_transcriptome,preprocess_ref_transcriptome
- if: $MATRIX_NAME == "fusions"
variables:

View File

@ -8,7 +8,7 @@ repos:
always_run: true
pass_filenames: false
additional_dependencies:
- epi2melabs>=0.0.48
- epi2melabs>=0.0.49
- id: build_models
name: build_models
entry: datamodel-codegen --strict-nullable --base-class workflow_glue.results_schema_helpers.BaseModel --use-schema-description --disable-timestamp --input results_schema.yml --input-file-type openapi --output bin/workflow_glue/results_schema.py

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [unreleased]
### Added
- Two extra pychopper parameters `--cdna_kit` and `--pychopper_backend`. `--pychopper_options` is still available to define any other options.
## [v0.4.2]
### Changed
- Sample sheet must include a `control` type to indicate which samples are the reference for the differential expression pipeline.

View File

@ -22,12 +22,12 @@ This workflow can be used for the following:
Recommended requirements:
+ CPUs = 16
+ memory = 32GB
+ Memory = 32GB
Minimum requirement:
Minimum requirements:
+ CPUs = 8
+ memory = 16GB
+ Memory = 16GB
Approximate run time: 15 minutes per sample, with 1 million reads and recommended resources.
@ -143,7 +143,9 @@ Find related protocols in the [Nanopore community](https://community.nanoporetec
| Nextflow parameter name | Type | Description | Help | Default |
|--------------------------|------|-------------|------|---------|
| threads | integer | Number of CPU threads. | Only provided to processes including alignment and and assembly that benefit from multiple threads. | 4 |
| pychopper_opts | string | Extra pychopper opts | See available options (here)[https://github.com/epi2me-labs/pychopper#usage] | -m edlib |
| cdna_kit | string | If cDNA reads are used, select the kit used. | This will be used by pychopper to preprocess the reads for downstream analysis. | SQK-PCS109 |
| pychopper_backend | string | Pychopper can use one of two available backends for identifying primers in the raw reads | 'edlib' is set by default due to its high performance. However, it may be less sensitive than 'phmm'. | edlib |
| pychopper_opts | string | Extra pychopper opts | See available options (here)[https://github.com/epi2me-labs/pychopper#usage] | |
| bundle_min_reads | integer | Minimum size of bam bundle for parallel processing. | | 50000 |
| isoform_table_nrows | integer | Maximum rows to dispay in the isoform report table | | 5000 |

View File

@ -1,12 +1,12 @@
Recommended requirements:
+ CPUs = 16
+ memory = 32GB
+ Memory = 32GB
Minimum requirement:
Minimum requirements:
+ CPUs = 8
+ memory = 16GB
+ Memory = 16GB
Approximate run time: 15 minutes per sample, with 1 million reads and recommended resources.

View File

@ -56,7 +56,9 @@
| Nextflow parameter name | Type | Description | Help | Default |
|--------------------------|------|-------------|------|---------|
| threads | integer | Number of CPU threads. | Only provided to processes including alignment and and assembly that benefit from multiple threads. | 4 |
| pychopper_opts | string | Extra pychopper opts | See available options (here)[https://github.com/epi2me-labs/pychopper#usage] | -m edlib |
| cdna_kit | string | If cDNA reads are used, select the kit used. | This will be used by pychopper to preprocess the reads for downstream analysis. | SQK-PCS109 |
| pychopper_backend | string | Pychopper can use one of two available backends for identifying primers in the raw reads | 'edlib' is set by default due to its high performance. However, it may be less sensitive than 'phmm'. | edlib |
| pychopper_opts | string | Extra pychopper opts | See available options (here)[https://github.com/epi2me-labs/pychopper#usage] | |
| bundle_min_reads | integer | Minimum size of bam bundle for parallel processing. | | 50000 |
| isoform_table_nrows | integer | Maximum rows to dispay in the isoform report table | | 5000 |

12
main.nf
View File

@ -108,10 +108,10 @@ process preprocess_ref_annotation {
input:
path ref_annotation
output:
path "ammended.${ref_annotation}"
path "amended.${ref_annotation}"
"""
sed -i -e 's/transcript_id "";//g' ${ref_annotation}
mv ${ref_annotation} "ammended.${ref_annotation}"
mv ${ref_annotation} "amended.${ref_annotation}"
"""
}
@ -123,10 +123,10 @@ process preprocess_ref_transcriptome {
input:
path "ref_transcriptome"
output:
path "ammended.${ref_transcriptome}"
path "amended.${ref_transcriptome}"
"""
sed -i -e 's/|.*//' ${ref_transcriptome}
mv ${ref_transcriptome} "ammended.${ref_transcriptome}"
mv ${ref_transcriptome} "amended.${ref_transcriptome}"
"""
}
@ -147,8 +147,10 @@ process preprocess_reads {
tuple val("${meta.alias}"), path("${meta.alias}_full_length_reads.fastq"), emit: full_len_reads
path '*.tsv', emit: report
script:
def cdna_kit = params.cdna_kit.split("-")[-1]
def extra_params = params.pychopper_opts ?: ''
"""
pychopper -t ${params.threads} ${params.pychopper_opts} ${input_reads} ${meta.alias}_full_length_reads.fastq
pychopper -t ${params.threads} -k ${cdna_kit} -m ${params.pychopper_backend} ${extra_params} ${input_reads} ${meta.alias}_full_length_reads.fastq
mv pychopper.tsv ${meta.alias}_pychopper.tsv
workflow-glue generate_pychopper_stats --data ${meta.alias}_pychopper.tsv --output .

View File

@ -37,8 +37,10 @@ params {
// Process cDNA reads using pychopper, turn off for direct RNA:
direct_rna = false
// Options passed to pychopper:
pychopper_opts = "-m edlib"
pychopper_opts = null
pychopper_backend = "edlib"
cdna_kit = "SQK-PCS109"
// Extra option passed to minimap2 when generating index
minimap2_index_opts = "-k14"

View File

@ -264,11 +264,34 @@
"description": "Number of CPU threads.",
"help_text": "Only provided to processes including alignment and and assembly that benefit from multiple threads."
},
"cdna_kit": {
"type": "string",
"title": "Kit used for cDNA synthesis.",
"enum": [
"SQK-PCS109",
"SQK-PCS110",
"SQK-PCS111",
"SQK-LSK114"
],
"description": "If cDNA reads are used, select the kit used.",
"default": "SQK-PCS109",
"help_text": "This will be used by pychopper to preprocess the reads for downstream analysis."
},
"pychopper_backend": {
"type": "string",
"enum": [
"edlib",
"phmm"
],
"title": "Pychopper backend",
"description": "Pychopper can use one of two available backends for identifying primers in the raw reads",
"default": "edlib",
"help_text": "'edlib' is set by default due to its high performance. However, it may be less sensitive than 'phmm'."
},
"pychopper_opts": {
"type": "string",
"title": "Pychopper options",
"description": "Extra pychopper opts",
"default": "-m edlib",
"help_text": "See available options (here)[https://github.com/epi2me-labs/pychopper#usage]"
},
"bundle_min_reads": {
@ -370,4 +393,4 @@
"run_time": "15 minutes per sample, with 1 million reads and recommended resources.",
"arm_support": false
}
}
}