Skip to content

Commit 54ee085

Browse files
committed
.
1 parent 0006024 commit 54ee085

5 files changed

Lines changed: 296 additions & 140 deletions

File tree

nf-metatropics/assets/output/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This stage optionally performs rarefaction, then removes low-quality reads, shor
3636
| `Reads/rarefaction` | Optional: Per-sample FASTQ after optional rarefaction subsampling. |
3737
| `Reads/nanoplot` | Read-length and quality summaries (NanoPlot) on the raw reads. |
3838
| `Reads/fastplong` | Trimmed, length-filtered reads (`*.fastp.fastq.gz`). |
39-
| `Reads/nohuman` | Human-depleted reads (`*_human_depleted.fastq.gz`); mapped reads (`*_human.fastq.gz`). |
39+
| `Reads/nohuman` | Human-depleted reads only (`*_human_depleted.fastq.gz`). Mapped human reads are not written, to avoid storing identifiable human genetic data (privacy / GDPR — genetic data is special-category personal data under [EU Regulation 2016/679](https://eur-lex.europa.eu/eli/reg/2016/679/oj)). |
4040
| `Reads/nohost` | Host-depleted reads (`*_host_depleted.fastq.gz`); mapped reads (`*_host.fastq.gz`). |
4141

4242
---

nf-metatropics/conf/modules.config

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,15 @@ process {
146146
pattern: '*.fastq.gz',
147147
saveAs: { filename ->
148148
def fn = filename.toString().tokenize('/').last()
149-
// Rename / filter for human mapping:
150-
// *_other.fastq.gz -> *_human_depleted.fastq.gz (reads NOT mapped to human; downstream input)
151-
// *_1.fastq.gz -> *_human.fastq.gz (reads mapped to human)
152-
// *_singleton.fastq.gz -> dropped
149+
// Publish depleted reads only (never mapped human reads — privacy).
150+
// *_other.fastq.gz -> *_human_depleted.fastq.gz
153151
if (fn.endsWith('_other.fastq.gz')) {
154152
return fn.replaceFirst(/_other\.fastq\.gz$/, '_human_depleted.fastq.gz')
155153
}
156-
if (fn.endsWith('_1.fastq.gz')) {
157-
return fn.replaceFirst(/_1\.fastq\.gz$/, '_human.fastq.gz')
158-
}
159154
return null
160155
}
161156
]
162-
// Flags (-f/-F) are handled inside the module so it can emit BOTH:
163-
// mapped reads -> *_1.fastq.gz
164-
// unmapped reads -> *_other.fastq.gz
157+
// Flags (-f/-F) are handled inside the module (unmapped / depleted only).
165158
ext.args = ""
166159
}
167160

0 commit comments

Comments
 (0)