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

Initial Commit Help Pages #48

Merged
merged 6 commits into from
May 16, 2024
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
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'0.3.0'
8 changes: 8 additions & 0 deletions eval.nf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//load in help function
File helppages_class_file = new File("./src/Helppages.groovy");
Class HelppagesClass = new GroovyClassLoader(getClass().getClassLoader()).parseClass(helppages_class_file);
GroovyObject help = (GroovyObject) HelppagesClass.newInstance();

if (params.help) { exit 0, help.helpEval(workflow.manifest.version, params) }

// include modules - here, modules are single processes
include { SAMTOOLS_FAIDX } from './modules/samtools/faidx/main.nf'
include { HAPPY } from './modules/happy/main.nf'
Expand Down Expand Up @@ -50,3 +57,4 @@ workflow{

SOMPY_SUMMARY(ch_csv.collect())
}

7 changes: 7 additions & 0 deletions hap.nf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//load in help function
File helppages_class_file = new File("./src/Helppages.groovy");
Class HelppagesClass = new GroovyClassLoader(getClass().getClassLoader()).parseClass(helppages_class_file);
GroovyObject help = (GroovyObject) HelppagesClass.newInstance();

if (params.help) { exit 0, help.helpHap(workflow.manifest.version, params) }

// include modules - here, modules are single processes
//include { AMPLISIM } from './modules/amplisim/main.nf'
include { MASON_SIMULATOR } from './modules/mason/simulator/main.nf'
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ manifest {
description = 'A workflow for a simple, streamlined and rapid evaluation of variant callsets '
author = 'Thomas Krannich'
nextflowVersion = '>=20.04.0'
version = '0.2.0'
version = new File('./VERSION').text.trim()
}

// Parameters that are accessible in the pipeline script
Expand All @@ -15,6 +15,7 @@ params {
read_type = 'ngs'

// General parameters
help = false
seed = 479
outdir = 'results'

Expand Down
81 changes: 81 additions & 0 deletions src/Helppages.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
class Helper {
def helpEval(version,params){
String c_green = "\033[0;32m";
String c_reset = "\033[0m";
String c_yellow = "\033[0;33m";
String c_blue = "\033[0;34m";
String c_red = "\u001B[31m";
String c_dim = "\033[2m";
log.info """
____________________________________________________________________________________________

${c_blue}Robert Koch Institute, Genome Competence Center${c_reset}

Workflow: cievad (${version}) - evaluation of callsets

${c_yellow}Minimal Usage Examples:${c_reset}

nextflow run eval.nf -profile local,conda --callsets_dir <path/to/callsets>
or
nextflow run eval.nf -profile local,conda --sample_sheet <path/to/sample_sheet>

${c_yellow}Input parameter (required):${c_reset}

${c_green} --callsets_dir ${c_reset} Directory containing variant callsets for evaluation (files of format: callset_<X>.vcf[.gz]), where <X> is the index of the corresponding truthset.
OR
${c_green} --sample_sheet ${c_reset} Sample sheet (.csv) with the header "index,truthset,callset". Every following line contains an index and matching truth- and callset.

${c_yellow}Other workflow parameter:${c_reset}

${c_green} --outdir ${c_reset} directory to save results in [default: ${params.outdir}]
"""
}

def helpHap(version,params){
String c_green = "\033[0;32m";
String c_reset = "\033[0m";
String c_yellow = "\033[0;33m";
String c_blue = "\033[0;34m";
String c_red = "\u001B[31m";
String c_dim = "\033[2m";
log.info """
____________________________________________________________________________________________

${c_blue}Robert Koch Institute, Genome Competence Center${c_reset}

Workflow: cievad (${version}) - haplotype generation

${c_yellow}Minimal Usage Example:${c_reset}

nextflow run hap.nf -profile local,conda --reference <cievad/path/to/ref>

${c_yellow}Input parameter (required):${c_reset}

${c_green} --reference ${c_reset} reference genome (.fasta) used for the generation of synthetic sequencing data

${c_yellow}Other workflow parameter:${c_reset}

${c_green} --n ${c_reset} number of synthetic samples to be generated [default: ${params.n}]
${c_green} --read_type ${c_reset} type of synthetic reads to be generated (options: ngs, ont) [default: ${params.read_type}]
${c_green} --outdir ${c_reset} directory to save results in [default: ${params.outdir}]

${c_yellow}Next Generation Sequencing parameter, optional if [--read_type ngs] is supplied ${c_reset}

${c_green} --nb_frag ${c_reset} number of fragments per sample [default: ${params.nb_frag}]
${c_green} --fragment_min_size ${c_reset} minimum size of fragments [default: ${params.fragment_min_size}]
${c_green} --fragment_max_size ${c_reset} maximum size of fragments [default: ${params.fragment_max_size}]
${c_green} --fragment_mean_size ${c_reset} mean size of fragments [default: ${params.fragment_mean_size}]
${c_green} --fragment_size_std_dev ${c_reset} standard deviation for fragment size [default: ${params.fragment_size_std_dev}]
${c_green} --illumina_read_length ${c_reset} read length of synthetic illumina reads [default: ${params.illumina_read_length}]

${c_yellow}Nanopore Sequencing parameter, optional if [--read_type ont] is supplied ${c_reset}

${c_green} --dna_type ${c_reset} used DNA type (options: linear, circular) [default: ${params.dna_type}]
${c_green} --model_prefix ${c_reset} path and prefix of a NanoSim model [default: ${params.model_prefix}]
${c_green} --model_caller ${c_reset} algorithm to conduct the basecalling [default: ${params.model_caller}]
${c_green} --median_length ${c_reset} median length of the synthetic reads [default: ${params.median_length}]
${c_green} --sd_length ${c_reset} standard deviation of the synthetic read lengths [default: ${params.sd_length}]
${c_green} --nb_reads ${c_reset} number of synthetic reads per sample [default: ${params.nb_reads}]
"""
}
}