You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# as called from the associated Snakefile, this expects to be run as: Rscript full-R-processing.R <left_trunc> <right_trunc> <left_maxEE> <right_maxEE> <TRUE/FALSE - GL trimmed primers or not> <unique-sample-IDs-file> <starting_reads_dir_for_R> <filtered_reads_dir> <input_file_R1_suffix> <input_file_R2_suffix> <filtered_filename_R1_suffix> <filtered_filename_R2_suffix> <final_outputs_directory> <output_prefix> <target_region> <concatenate_reads_only> <assay_suffix>
7
+
# as called from the associated process, this expects to be run as: Rscript full-R-processing.R <left_trunc> <right_trunc> <left_maxEE> <right_maxEE> <TRUE/FALSE - GL trimmed primers or not> <unique-sample-IDs-file> <starting_reads_dir_for_R> <filtered_reads_dir> <input_file_R1_suffix> <input_file_R2_suffix> <filtered_filename_R1_suffix> <filtered_filename_R2_suffix> <final_outputs_directory> <output_prefix> <target_region> <concatenate_reads_only> <assay_suffix>
8
8
# where <left_trim> and <right_trim> are the values to be passed to the truncLen parameter of dada2's filterAndTrim()
9
9
# and <left_maxEE> and <right_maxEE> are the values to be passed to the maxEE parameter of dada2's filterAndTrim()
10
10
@@ -161,8 +161,7 @@ dna <- DNAStringSet(getSequences(seqtab.nochim))
161
161
# downloading reference R taxonomy object (at some point this will be stored somewhere on GeneLab's server and we won't download it, but should leave the code here, just commented out)
# as called from the associated Snakefile, this expects to be run as: Rscript full-R-processing.R <left_trunc> <left_maxEE> <TRUE/FALSE - GL trimmed primers or not> <unique-sample-IDs-file> <starting_reads_dir_for_R> <filtered_reads_dir> <input_file_R1_suffix> <filtered_filename_R1_suffix> <final_outputs_directory> <output_prefix> <target_region> <assay_suffix>
8
+
# as called from the associated process, this expects to be run as: Rscript full-R-processing.R <left_trunc> <left_maxEE> <TRUE/FALSE - GL trimmed primers or not> <unique-sample-IDs-file> <starting_reads_dir_for_R> <filtered_reads_dir> <input_file_R1_suffix> <filtered_filename_R1_suffix> <final_outputs_directory> <output_prefix> <target_region> <assay_suffix>
9
9
# where <left_trim> is the value to be passed to the truncLen parameter of dada2's filterAndTrim()
10
10
# and <left_maxEE> is the value to be passed to the maxEE parameter of dada2's filterAndTrim()
11
11
@@ -130,8 +130,7 @@ dna <- DNAStringSet(getSequences(seqtab.nochim))
130
130
# downloading reference R taxonomy object (at some point this will be stored somewhere on GeneLab's server and we won't download it, but should leave the code here, just commented out)
println("""-profile [STRING] What profile should be used be use to run the workflow. Options are [singularity, docker, conda, slurm_sing, slurm_conda].
27
+
println("""-profile [STRING] What profile should be used to run the workflow. Options are [singularity, docker, conda, slurm_sing, slurm_conda].
28
28
singularity, docker and conda will run the pipelne locally using singularity, docker, and conda, respectively.
29
29
slurm_sing and slurm_conda will submit and run jobs using slurm in singularity containers and conda environments, respectively. """)
30
30
println("--csv_file [PATH] A 3-column (single-end) or 4-column (paired-end) input file (sample_id, forward, [reverse,] paired). Mandatory if a GLDS accession is not provided.")
31
31
println(" Please see the files: SE_file.csv and PE_file.csv for single-end and paired-end examples, respectively.")
32
32
println(" The sample_id column should contain unique sample ids.")
33
33
println(" The forward and reverse columns should contain the absolute or relative path to the sample's forward and reverse reads.")
34
34
println(" The paired column should be true for paired-end or anything else for single-end reads.")
35
-
println("--target_region [STRING] What is the amplicon target region to be analyzed. Options are one of [16S, 18S, ITS]. Default: 16S")
36
-
println("--trim_primers [BOOLEAN] Should primers be trimmed? true or false. Default: true")
37
-
println("--raw_R1_suffix [STRING] Raw forward reads suffix (region following the unique part of the sample names). e.g. _R1_raw.fastq.gz")
38
-
println("--raw_R2_suffix [STRING] Raw reverse reads suffix (region following the unique part of the sample names). e.g. _R2_raw.fastq.gz")
35
+
println("--target_region [STRING] What is the amplicon target region to be analyzed. Options are one of [16S, 18S, ITS]. Default: 16S.")
36
+
println("--trim_primers [BOOLEAN] Should primers be trimmed? true or false. Default: true.")
37
+
println("PLEASE NOTE: This workflow assumes that all your raw reads end with the same suffix. If they don't please modify your filenames to have the same suffix as shown below.")
38
+
println("--raw_R1_suffix [STRING] Raw forward reads suffix (region following the unique part of the sample names). e.g. _R1_raw.fastq.gz.")
39
+
println("--raw_R2_suffix [STRING] Raw reverse reads suffix (region following the unique part of the sample names). e.g. _R2_raw.fastq.gz.")
39
40
40
41
println("Cutadapt (trimming) parameters:")
41
-
println(" --F_primer [STRING] Forward primer sequence e.g. AGAGTTTGATCCTGGCTCAG")
42
-
println(" --R_primer [STRING] Reverse primer sequence e.g. CTGCCTCCCGTAGGAGT")
43
-
println(" --min_cutadapt_len [int] What should be the minimum read length after quality trimming with cutadapt. Default: 130")
44
-
println(" --primers_linked [STRING] Are the primers linked?. https://cutadapt.readthedocs.io/en/stable/recipes.html#trimming-amplicon-primers-from-paired-end-reads. Default: TRUE ")
45
-
println(" --discard_untrimmed [STRING] Should untrimmed reads be discarded? Any supplied string except TRUE will not discard them. Default: TRUE")
42
+
println(" --F_primer [STRING] Forward primer sequence e.g. AGAGTTTGATCCTGGCTCAG. Default: emptry string.")
43
+
println(" --R_primer [STRING] Reverse primer sequence e.g. CTGCCTCCCGTAGGAGT. Default: emptry string.")
44
+
println(" --min_cutadapt_len [INTEGER] What should be the minimum read length after quality trimming with cutadapt. Default: 130.")
45
+
println(" --primers_linked [STRING] Are the primers linked?. https://cutadapt.readthedocs.io/en/stable/recipes.html#trimming-amplicon-primers-from-paired-end-reads. Default: TRUE.")
46
+
println(" --discard_untrimmed [STRING] Should untrimmed reads be discarded? Any supplied string except TRUE will not discard them. Default: TRUE.")
46
47
47
48
println("Optional arguments:")
48
-
println(" --help Print this help message and exit")
49
-
println(" --publishDir_mode [STRING] How should nextflow publish file outputs. Options can be found here https://www.nextflow.io/docs/latest/process.html#publishdir Default: link.")
50
-
println(" --errorStrategy [STRING] How should nextflow handle errors. Options can be found here https://www.nextflow.io/docs/latest/process.html#errorstrategy. Default: ignore")
51
-
println(" --enable_visualizations [BOOLEAN] Should ASV plots be made? true or false. if true supply a path to the ruhnsheet for plotting to the --runsheet option. Default: false")
52
-
println(" --runsheet [PATH] A 4-column file with these exact headers [Sample Name, read1_path, raw_R1_suffix, groups] for plotting. Only relevant if --enable_visualizations is true. Default: null")
53
-
println(" --multiqc_config [PATH] Path to a custome multiqc config file. Default: config/multiqc.config")
49
+
println(" --help Print this help message and exit.")
50
+
println(" --publishDir_mode [STRING] How should nextflow publish file outputs. Options can be found here https://www.nextflow.io/docs/latest/process.html#publishdir. Default: link.")
51
+
println(" --errorStrategy [STRING] How should nextflow handle errors. Options can be found here https://www.nextflow.io/docs/latest/process.html#errorstrategy. Default: terminate")
52
+
println(" --enable_visualizations [BOOLEAN] Should ASV plots be made? true or false. if true supply a path to the ruhnsheet for plotting to the --runsheet option. Default: false.")
53
+
println(" --runsheet [PATH] A 4-column file with these exact headers [Sample Name, read1_path, raw_R1_suffix, groups] for plotting. Only relevant if --enable_visualizations is true. Default: null.")
54
+
println(" --multiqc_config [PATH] Path to a custome multiqc config file. Default: config/multiqc.config.")
54
55
55
56
println("Dada2 parameters passed to filterAndTrim() function:")
56
-
println(" --left_trunc [INT] truncate the sequences to the left by this number of bases. Default: 0")
57
-
println(" --right_trunc [INT] truncate the sequences to the right by this number of bases. Default: 0")
58
-
println(" --left_maxEE [INT] Maximum allowed errors to the left. Default: 1")
59
-
println(" --right_maxEE [INT] Maximum allowed errors to the right. Default: 1")
57
+
println(" --left_trunc [INTEGER] truncate the sequences to the left by this number of bases. Default: 0.")
58
+
println(" --right_trunc [INTEGER] truncate the sequences to the right by this number of bases. Default: 0.")
59
+
println(" --left_maxEE [INTEGER] Maximum allowed errors to the left. Default: 1.")
60
+
println(" --right_maxEE [INTEGER] Maximum allowed errors to the right. Default: 1.")
60
61
println(" --concatenate_reads_only [STRING] Concatenate only with dada2 instead of merging paired reads if TRUE.")
61
62
println(" This is typically used with primers like 515-926, that captured 18S fragments that are typically too long to merge.")
62
-
println(" Note that 16S and 18S should have been separated already prior to running this workflow. This should likely be left as FALSE for any option other than 18S above")
63
-
println(" Values are TRUE or FALSE Default: FALSE")
63
+
println(" Note that 16S and 18S should have been separated already prior to running this workflow. This should likely be left as FALSE for any option other than 18S above.")
64
+
println(" Values are TRUE or FALSE Default: FALSE.")
64
65
65
66
println("File Suffixes:")
66
-
println(" --primer_trimmed_R1_suffix [STRING] Suffix to use for naming your primer trimmed forward reads. Default: _R1_trimmed.fastq.gz")
67
-
println(" --primer_trimmed_R2_suffix [STRING] Suffix to use for naming your primer trimmed reverse reads. Default: _R2_trimmed.fastq.gz")
68
-
println(" --filtered_R1_suffix [STRING] Suffix to use for naming your quality filtered forward reads. Default: _R1_filtered.fastq.gz")
69
-
println(" --filtered_R2_suffix [STRING] Suffix to use for naming your quality filtered reverse reads. Default: _R2_filtered.fastq.gz")
67
+
println(" --primer_trimmed_R1_suffix [STRING] Suffix to use for naming your primer trimmed forward reads. Default: _R1_trimmed.fastq.gz.")
68
+
println(" --primer_trimmed_R2_suffix [STRING] Suffix to use for naming your primer trimmed reverse reads. Default: _R2_trimmed.fastq.gz.")
69
+
println(" --filtered_R1_suffix [STRING] Suffix to use for naming your quality filtered forward reads. Default: _R1_filtered.fastq.gz.")
70
+
println(" --filtered_R2_suffix [STRING] Suffix to use for naming your quality filtered reverse reads. Default: _R2_filtered.fastq.gz.")
70
71
println("Output directories:")
71
-
println(" --raw_reads_dir [PATH] Where should the fastqc report of the raw reads be stored. Default: Raw_Sequence_Data/")
72
-
println(" --fastqc_out_dir [PATH] Where should multiqc outputs be stored. Default: workflow_output/FastQC_Outputs/")
73
-
println(" --trimmed_reads_dir [PATH] Where should your cutadapt trimmed reads be stored. Default: workflow_output/Trimmed_Sequence_Data/")
74
-
println(" --filtered_reads_dir [PATH] Where should your filtered reads be stored. Default: workflow_output/Filtered_Sequence_Data/")
75
-
println(" --info_out_dir [PATH] Where should output metadata be stored. Default: workflow_output/Metadata/")
76
-
println(" --plots_dir [PATH] Where should your plots be stored if visualization is enabled. Default: workflow_output/Final_Outputs/Plots/")
77
-
println(" --final_outputs_dir [PATH] Where should most outputs and summary reports be stored. Default: workflow_output/Final_Outputs/")
72
+
println(" --raw_reads_dir [PATH] Where should the fastqc report of the raw reads be stored. Default: Raw_Sequence_Data/.")
73
+
println(" --fastqc_out_dir [PATH] Where should multiqc outputs be stored. Default: workflow_output/FastQC_Outputs/.")
74
+
println(" --trimmed_reads_dir [PATH] Where should your cutadapt trimmed reads be stored. Default: workflow_output/Trimmed_Sequence_Data/.")
75
+
println(" --filtered_reads_dir [PATH] Where should your filtered reads be stored. Default: workflow_output/Filtered_Sequence_Data/.")
76
+
println(" --info_out_dir [PATH] Where should output metadata be stored. Default: workflow_output/Metadata/.")
77
+
println(" --plots_dir [PATH] Where should your plots be stored if visualization is enabled. Default: workflow_output/Final_Outputs/Plots/.")
78
+
println(" --final_outputs_dir [PATH] Where should most outputs and summary reports be stored. Default: workflow_output/Final_Outputs/.")
78
79
println("Genelab specific arguements:")
79
80
println(" --GLDS_accession [STRING] A Genelab accession number if the --csv_file parameter is not set. If this parameter is set, it will ignore the --csv_file parameter.")
println(" --output_prefix [STRING] Unique name to tag onto output files. Default: ''")
82
+
println(" --output_prefix [STRING] Unique name to tag onto output files. Default: empty string.")
82
83
println("Paths to existing conda environments to use otherwise a new one will be created using the yaml file in envs/.")
83
84
println(" --conda.qc [PATH] Path to a conda environment containing fastqc, multiqc, zip and python. Default: null.")
84
85
println(" --conda.R [PATH] Path to a conda environment containing R along with the packages decipher and biomformat installed. Default: null.")
85
86
println(" --conda.genelab [PATH] Path to a conda environment containing genlab-utils. Default: null.")
86
87
println(" --conda.cutadapt [PATH] Path to a conda environment containing cutadapt. Default: null.")
87
88
println(" --conda.R_visualizations [PATH] Path to a conda environment containing R packages required for plotting. Default: null.")
88
-
print("Advanced users can edit the nextflow.config file for more control over default settings such container choice, number cpus, memory per task etc.")
89
+
print("Advanced users can edit the nextflow.config file for more control over default settings such container choice, number of cpus, memory per task etc.")
0 commit comments