Skip to content

Commit

Permalink
Merge pull request #265 from nschcolnicov/fix_adapter
Browse files Browse the repository at this point in the history
Fixed adapter removal
  • Loading branch information
apeltzer authored Sep 23, 2024
2 parents d1c474c + 627d368 commit 1a26f26
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 @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### `Fixed`

- [#253](https://github.com/nf-core/demultiplex/pull/253) Fixed mkfastq output channels.
- [#264](https://github.com/nf-core/demultiplex/pull/264) Fixed adapter removal for input samplesheets without lane information.

## 1.5.0 - 2024-08-12

Expand Down
4 changes: 2 additions & 2 deletions workflows/demultiplex.nf
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ workflow DEMULTIPLEX {
[ "${item[0].id}${suffix}_no_adapters.csv", AdapterRemover.removeAdaptersFromSampleSheet(item[1]) ]
}
.map { file -> //build meta again from file name
def meta_id = (file =~ /([^\/]+)(?=\.(lane|_no_adapters))/)[0][1] //extracts everything from the last "/" until ".lane" or "_no_adapters"
def meta_lane = (file =~ /\.lane(\d+)/)[0][1].toInteger() //extracts number after ".lane" until next "_", must be int to match lane value from meta
def meta_id = (file =~ /.*\/(.*?)(\.lane|_no_adapters)/)[0][1] //extracts everything from the last "/" until ".lane" or "_no_adapters"
def meta_lane = (file.getName().contains('.lane')) ? (file =~ /\.lane(\d+)/)[0][1].toInteger() : null //extracts number after ".lane" until next "_", must be int to match lane value from meta
[[id: meta_id, lane: meta_lane],file]
}
ch_samplesheet_new = ch_samplesheet
Expand Down

0 comments on commit 1a26f26

Please sign in to comment.