Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #63 from koenbossers/fix/allow-quoted-fields-in-csv
Browse files Browse the repository at this point in the history
Allow quoted fields for csv files in .fromSamplesheet()
  • Loading branch information
nvnieuwk authored Jun 30, 2023
2 parents b040ebb + 4ac26f1 commit 182c19a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Only validate a file with a schema if the file path is provided ([#51](https://github.com/nextflow-io/nf-validation/pull/51))
- Handle errors when sample sheet not provided or doesn't have a schema ([#56](https://github.com/nextflow-io/nf-validation/pull/56))
- Silently ignore samplesheet fields that are not defined in samplesheet schema ([#59](https://github.com/nextflow-io/nf-validation/pull/59))
- Correctly handle double-quoted fields containing commas in csv files by `.fromSamplesheet()` [#63](https://github.com/nextflow-io/nf-validation/pull/63))

## Version 0.2.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SamplesheetConverter {
}
else {
Path fileSamplesheet = Nextflow.file(samplesheetFile) as Path
samplesheetList = fileSamplesheet.splitCsv(header:true, strip:true, sep:delimiter)
samplesheetList = fileSamplesheet.splitCsv(header:true, strip:true, sep:delimiter, quote:'"')
}

// Field checks + returning the channels
Expand Down Expand Up @@ -279,4 +279,4 @@ class SamplesheetConverter {
) {
return "Entry ${this.getCount()}: ${message}".toString()
}
}
}

0 comments on commit 182c19a

Please sign in to comment.