Skip to content

Commit

Permalink
Stop optional columns with commas causing incorrect CSV parsing
Browse files Browse the repository at this point in the history
resolves nf-core#30
  • Loading branch information
zachary-foster committed Oct 13, 2023
1 parent 780d52a commit 05a2895
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type": "string",
"format": "file-path",
"mimetype": "text/csv",
"pattern": "^\\S+\\.csv$",
"pattern": "^\\S+\\.[ct]sv$",
"schema": "assets/schema_input.json",
"description": "Path to comma-separated file containing information about the samples in the experiment.",
"help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 4 columns, and a header row. See [usage docs](https://nf-co.re/plantpathsurveil/usage#samplesheet-input).",
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workflow INPUT_CHECK {
SAMPLESHEET_CHECK ( samplesheet )
SAMPLESHEET_CHECK.out
.csv
.splitCsv ( header:true, sep:',' )
.splitCsv ( header:true, sep:',', quote:'"')
.map { create_reads_ref_channel(it) }
.transpose ( by: 4 ) // Duplicate rows for each group when there are multiple groups per sample
.map { it[0..3] + [[id: it[4]]] }
Expand Down

0 comments on commit 05a2895

Please sign in to comment.