diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56d4579..18eb2ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5cda947..8abd0a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cf9837..bb3f33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index f7c4a04..ec8928e 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/docs/03_compute_requirements.md b/docs/03_compute_requirements.md index 02eafd3..ff522ea 100644 --- a/docs/03_compute_requirements.md +++ b/docs/03_compute_requirements.md @@ -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. diff --git a/docs/06_inputs.md b/docs/06_inputs.md index 569b849..3e6e529 100644 --- a/docs/06_inputs.md +++ b/docs/06_inputs.md @@ -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 | diff --git a/main.nf b/main.nf index eacecde..7d6bcf7 100644 --- a/main.nf +++ b/main.nf @@ -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 . diff --git a/nextflow.config b/nextflow.config index c970822..d38d5f8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -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" diff --git a/nextflow_schema.json b/nextflow_schema.json index df93b86..af40e5d 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -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 } -} \ No newline at end of file +}