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
[](https://www.docker.com/)
5
+
[](https://sylabs.io/docs/)
6
+
7
+
A Nextflow DSL2 pipeline for separating human and mouse sequencing reads from Patient-Derived Xenograft (PDX) samples using [Xengsort](https://gitlab.com/genomeinformatics/xengsort) (Zentgraf and Rahmann, 2021).
8
+
9
+
## 🎯 Overview
10
+
11
+
When tumor samples from PDX models (human tumors grown in immunocompromised mice) are sequenced, the resulting data contains a mixture of:
12
+
- 🧬 **Human reads** (from the transplanted tumor)
13
+
- 🐭 **Mouse reads** (from the host tissue)
14
+
15
+
This pipeline cleanly separates these reads, providing contamination-free human sequences for downstream analysis.
16
+
17
+
### ✨ Key Features
18
+
19
+
-**Assay-agnostic**: Works with WGS, WES, RNA-seq, ATAC-seq, ChIP-seq, and other NGS data
20
+
-**Fast & accurate**: Leverages Xengsort's k-mer based classification
21
+
-**Quality control**: Integrated FASTP for read trimming and QC
22
+
-**Comprehensive reports**: MultiQC aggregation and contamination statistics
23
+
-**Production-ready**: Docker and Singularity support for reproducibility
24
+
-**NSG-optimized**: Compatible with NSG-adapted mouse reference genome
5
25
6
26
## Workflow
7
27
```mermaid
@@ -27,54 +47,269 @@ flowchart TB
27
47
end
28
48
```
29
49
30
-
## Running Pipeline
50
+
## 🚀 Quick Start
51
+
52
+
Run the pipeline directly from GitHub (no cloning required):
31
53
32
-
Instead of cloning the entire repository, you can simply run v.1.0.0 from the command line
33
54
```bash
34
-
nextflow run tylergross97/nextflow_xengsort main.nf \
In the case of PDX models with NSG mice, it is recommended to use the NSG-adapted mouse reference genome from [Hynds et al. (2024)](https://www.nature.com/articles/s41467-024-47547-3) by running the following bash command:
88
+
> **Note**: Files must be paired-end Illumina reads in gzipped FASTQ format
89
+
90
+
### 2. Reference Genomes
91
+
92
+
#### Human Reference (Required)
93
+
-**GRCh38/hg38** (recommended) or GRCh37/hg19
94
+
- Download from [NCBI](https://www.ncbi.nlm.nih.gov/genome/guide/human/) or [UCSC](https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/)
95
+
96
+
#### Mouse Reference (Required)
97
+
98
+
For **NSG mice** (most common PDX host), use the NSG-adapted reference from [Hynds et al. (2024)](https://www.nature.com/articles/s41467-024-47547-3):
For **other mouse strains**, use standard mm10/mm39 from [NCBI](https://www.ncbi.nlm.nih.gov/genome/guide/mouse/) or [UCSC](https://hgdownload.soe.ucsc.edu/goldenPath/mm10/bigZips/).
110
+
111
+
## 📤 Output Files
112
+
113
+
The pipeline generates the following output structure:
- You can then specify the path of mm10.nsgSpike.fa for the --nsg_fasta command line argument
60
194
61
-
### Outputs
62
-
You will find the trimmed, human-only filtered reads in ${outdir_base}/fastp/human_trimmed_{1,2}.fastq.gz - these can be then be used as input into pipelines that require uncontaminated reads, such as nf-core/sarek or nf-core/rnaseq
195
+
## 💻 Usage Examples
63
196
64
-
If you want to explore mouse contamination, refer to ${outdir_base}/xengsort/xengsort_summary.csv, which will contain sample-level contamination information
197
+
### Basic Usage
65
198
66
-
### Testing
67
-
To test pipeline with a minimal dataset, run pipeline with:
68
199
```bash
69
-
nextflow run tylergross97/nextflow_xengsort -profile test,docker_or_singularity
200
+
nextflow run tylergross97/nextflow_xengsort \
201
+
--input samplesheet.csv \
202
+
--outdir_base ./pdx_results \
203
+
--hg38_fasta /references/GRCh38.fa \
204
+
--nsg_fasta /references/mm10.nsgSpike.fa \
205
+
-profile docker
70
206
```
71
-
The author parameters are predefined if running test profile
72
207
73
-
## Citations
74
-
If you use this pipeline in your work, please cite: [Tyler Gross] (2025). Xengsort Nextflow Pipeline [Computer software]. https://github.com/tylergross97/nextflow_xengsort
This pipeline uses the following tools that should be cited independently:
77
-
1. Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature biotechnology, 35(4), 316-319.
78
-
2. Chen, S., Zhou, Y., Chen, Y., & Gu, J. (2018). fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics, 34(17), i884-i890.
79
-
3. Hynds, R. E., Huebner, A., Pearce, D. R., Hill, M. S., Akarca, A. U., Moore, D. A., ... & Swanton, C. (2024). Representation of genomic intratumor heterogeneity in multi-region non-small cell lung cancer patient-derived xenograft models. Nature communications, 15(1), 4653.
80
-
4. Zentgraf, J., & Rahmann, S. (2021). Fast lightweight accurate xenograft sorting. Algorithms for Molecular Biology, 16(1), 2.
288
+
289
+
1.**Nextflow**
290
+
Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. *Nature Biotechnology*, 35(4), 316-319. https://doi.org/10.1038/nbt.3820
291
+
292
+
2.**Xengsort**
293
+
Zentgraf, J., & Rahmann, S. (2021). Fast lightweight accurate xenograft sorting. *Algorithms for Molecular Biology*, 16(1), 2. https://doi.org/10.1186/s13015-021-00181-w
294
+
295
+
3.**fastp**
296
+
Chen, S., Zhou, Y., Chen, Y., & Gu, J. (2018). fastp: an ultra-fast all-in-one FASTQ preprocessor. *Bioinformatics*, 34(17), i884-i890. https://doi.org/10.1093/bioinformatics/bty560
297
+
298
+
4.**MultiQC**
299
+
Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. *Bioinformatics*, 32(19), 3047-3048. https://doi.org/10.1093/bioinformatics/btw354
300
+
301
+
5.**NSG Reference** (if used)
302
+
Hynds, R. E., Huebner, A., Pearce, D. R., Hill, M. S., Akarca, A. U., Moore, D. A., ... & Swanton, C. (2024). Representation of genomic intratumor heterogeneity in multi-region non-small cell lung cancer patient-derived xenograft models. *Nature Communications*, 15(1), 4653. https://doi.org/10.1038/s41467-024-47547-3
303
+
304
+
## 📄 License
305
+
306
+
This pipeline is released under the MIT License. See `LICENSE` file for details.
0 commit comments