Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rjd0 val params #247

Merged
merged 6 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

For the complete TOSTADAS documentation, please see the [Wiki](https://github.com/CDCgov/tostadas/wiki)

## Warnings
### Plugin Compatibility Warning
❗ Important Note: This pipeline uses the nf-schema plugin to validate pipeline parameters. Users with Nextflow version 24 or later may encounter a warning message indicating that the plugin must be installed. To resolve this warning message, please install the plugin manually by following the instructions found in this [link](https://www.nextflow.io/docs/latest/plugins.html#offline-usage)

## Overview
**T O S T A D A S**
**T**oolkit for **O**pen **S**equence **T**riage, **A**nnotation, and **DA**tabase **S**ubmission
Expand Down Expand Up @@ -41,28 +45,17 @@ bash Mambaforge-$(uname)-$(uname -m).sh -b -p $HOME/mambaforge
```
export PATH="$HOME/mambaforge/bin:$PATH"
```
### 3. Create and activate a conda environment

**3a. Create an empty conda environment**
```
conda create --name tostadas
```
This conda environment will be used to install Nextflow.

**3b. Activate the environment**
```
conda activate tostadas
```
Verify which environment is active by running the following conda command: `conda env list`. The active environment will be denoted with an asterisk *

### 4. Install Nextflow using mamba and the bioconda Channel
### 3. Install Nextflow using mamba and the bioconda Channel
```
mamba install -c bioconda nextflow
```
### 5. Update the default submissions config file with your NCBI username and password, and run the following nextflow command to execute the scripts with default parameters and the local run environment:
### 4. Update the default submissions config file with your NCBI username and password
```
# update this config file (you don't have to use vim)
vim conf/submission_config.yaml
```
### 5. Run the workflow with default parameters and the local run environment:
```
# test command for virus reads
nextflow run main.nf -profile test,<singularity|docker|conda> --virus
```
Expand Down
144 changes: 0 additions & 144 deletions modules/local/general_util/validate_params/main.nf

This file was deleted.

Empty file.
34 changes: 21 additions & 13 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@
"format": "file-path",
"description": "Meta-data file path for samples",
"default": "${projectDir}/assets/metadata_template.xlsx",
"pattern": "^\\S+\\.xlsx$"
"pattern": "^\\S+\\.(xlsx|xls|xlsm|xlsb|csv)$"
},
"ref_fasta_path": {
"type": "string",
"format": "file-path",
"description": "Reference Sequence file path",
"default": "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.fasta"
"default": "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.fasta",
"pattern": "^\\S+\\.(fasta|fa|fna|ffn|faa|frn|fasta\\.gz|fa\\.gz|fna\\.gz|ffn\\.gz|faa\\.gz|frn\\.gz|fasta\\.zip|fa\\.zip|fna\\.zip|ffn\\.zip|faa\\.zip|frn\\.zip|fasta\\.bz2|fa\\.bz2|fna\\.bz2|ffn\\.bz2|faa\\.bz2|frn\\.bz2|fasta\\.tar\\.bz2|fa\\.tar\\.bz2|fna\\.tar\\.bz2|ffn\\.tar\\.bz2|faa\\.tar\\.bz2|frn\\.tar\\.bz2|fasta\\.tar|fa\\.tar|fna\\.tar|ffn\\.tar|faa\\.tar|frn\\.tar|fasta\\.tar\\.gz|fa\\.tar\\.gz|fna\\.tar\\.gz|ffn\\.tar\\.gz|faa\\.tar\\.gz|frn\\.tar\\.gz)$"
},
"ref_gff_path": {
"type": "string",
"format": "file-path",
"description": "Reference gff file path for annotation",
"default": "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.gff"
"default": "${projectDir}/assets/ref/ref.MPXV.NC063383.v7.gff",
"pattern": "^\\S+\\.(gff|gff3)$"
},
"output_dir": {
"type": "string",
Expand Down Expand Up @@ -56,8 +57,8 @@
},
"custom_fields_file": {
"type": "string",
"description": "Path to the JSON file containing custom metadata fields and their information",
"default": "${projectDir}/assets/custom_meta_fields/example_custom_fields.json"
"default": "${projectDir}/assets/custom_meta_fields/example_custom_fields.json",
"pattern": "^\\S+\\.json$"
},
"final_liftoff_output_dir": {
"type": "string",
Expand Down Expand Up @@ -90,7 +91,8 @@
"lift_unmapped_features_file_name": {
"type": "string",
"description": "Name of unmapped features file name",
"default": "output.unmapped_features.txt"
"default": "output.unmapped_features.txt",
"pattern": "^\\S+\\.txt$"
},
"lift_copy_threshold": {
"type": "number",
Expand Down Expand Up @@ -249,7 +251,8 @@
"submission_config": {
"type": "string",
"description": "Configuration file for submission to public repos",
"default": "${projectDir}/bin/config_files/<your-ncbi-config>.yaml"
"default": "${projectDir}/bin/config_files/<your-ncbi-config>.yaml",
"pattern": "^\\S+\\.(yaml|yml)$"
},
"submission_wait_time": {
"type": "integer",
Expand Down Expand Up @@ -297,7 +300,8 @@
"repeat_library": {
"type": "string",
"description": "Path to the repeat library file used by RepeatMasker.",
"default": "${projectDir}/assets/lib/MPOX_repeats_lib.fasta"
"default": "${projectDir}/assets/lib/MPOX_repeats_lib.fasta",
"pattern": "^\\S+\\.(fasta|fa|fna|ffn|faa|frn|fasta\\.gz|fa\\.gz|fna\\.gz|ffn\\.gz|faa\\.gz|frn\\.gz|fasta\\.zip|fa\\.zip|fna\\.zip|ffn\\.zip|faa\\.zip|frn\\.zip|fasta\\.bz2|fa\\.bz2|fna\\.bz2|ffn\\.bz2|faa\\.bz2|frn\\.bz2|fasta\\.tar\\.bz2|fa\\.tar\\.bz2|fna\\.tar\\.bz2|ffn\\.tar\\.bz2|faa\\.tar\\.bz2|frn\\.tar\\.bz2|fasta\\.tar|fa\\.tar|fna\\.tar|ffn\\.tar|faa\\.tar|frn\\.tar|fasta\\.tar\\.gz|fa\\.tar\\.gz|fna\\.tar\\.gz|ffn\\.tar\\.gz|faa\\.tar\\.gz|frn\\.tar\\.gz)$"
},
"gisaid": {
"description": "Flag to enable or disable submission to GISAID."
Expand Down Expand Up @@ -383,7 +387,8 @@
},
"lift_feature_types": {
"type": "string",
"default": "${projectDir}/assets/feature_types.txt"
"default": "${projectDir}/assets/feature_types.txt",
"pattern": "^\\S+\\.txt$"
},
"processed_samples": {
"type": "string",
Expand Down Expand Up @@ -429,7 +434,10 @@
"default": "${projectDir}/environment.yml"
}
},

"required": ["meta_path", "ref_fasta_path", "ref_gff_path", "species"]
"required": [
"meta_path",
"ref_fasta_path",
"ref_gff_path",
"species"
]
}

11 changes: 7 additions & 4 deletions workflows/tostadas.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nextflow.enable.dsl=2
// get the utility processes / subworkflows
// include { CHECK_FILES } from "../modules/local/general_util/check_files/main"
// include { RUN_UTILITY } from "../subworkflows/local/utility"
include { VALIDATE_PARAMS } from '../modules/local/general_util/validate_params/main'
include { validateParameters; paramsSummaryLog; samplesheetToList } from 'plugin/nf-schema'

include { GET_WAIT_TIME } from "../modules/local/general_util/get_wait_time/main"

Expand Down Expand Up @@ -45,9 +45,12 @@ workflow TOSTADAS {
exit 0
}

// validate params
VALIDATE_PARAMS()

// validate input parameters
validateParameters()

// print summary of supplied parameters
log.info paramsSummaryLog(workflow)

// run metadata validation process
METADATA_VALIDATION (
params.meta_path
Expand Down