Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@

> Danecek, P., Bonfield, J. K., Liddle, J., Marshall, J., Ohan, V., Pollard, M. O., Whitwham, A., Keane, T., McCarthy, S. A., Davies, R. M., & Li, H. (2021). Twelve years of SAMtools and BCFtools. GigaScience, 10(2). https://doi.org/10.1093/gigascience/giab008

- [Hostile](https://doi.org/10.1093/bioinformatics/btad728)

> Constantinides, B., Hunt, M., Crook, D.W., 2023. Hostile: accurate decontamination of microbial host sequences. Bioinformatics 39. https://doi.org/10.1093/bioinformatics/btad728

- [Bracken](https://doi.org/10.7717/peerj-cs.104)

> Lu, J., Breitwieser, F. P., Thielen, P., & Salzberg, S. L. (2017). Bracken: estimating species abundance in metagenomics data. PeerJ. Computer Science, 3(e104), e104. https://doi.org/10.7717/peerj-cs.104
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
2. Performs optional read pre-processing
- Adapter clipping and merging (short-read: [fastp](https://github.com/OpenGene/fastp), [AdapterRemoval2](https://github.com/MikkelSchubert/adapterremoval); long-read: [porechop](https://github.com/rrwick/Porechop), [Porechop_ABI](https://github.com/bonsai-team/Porechop_ABI))
- Low complexity and quality filtering (short-read: [bbduk](https://jgi.doe.gov/data-and-tools/software-tools/bbtools/), [PRINSEQ++](https://github.com/Adrian-Cantu/PRINSEQ-plus-plus); long-read: [Filtlong](https://github.com/rrwick/Filtlong)), [Nanoq](https://github.com/esteinig/nanoq)
- Host-read removal (short-read: [BowTie2](http://bowtie-bio.sourceforge.net/bowtie2/); long-read: [Minimap2](https://github.com/lh3/minimap2))
- Host-read removal (short-read: [BowTie2](http://bowtie-bio.sourceforge.net/bowtie2/); long-read: [Minimap2](https://github.com/lh3/minimap2), both: [Hostile](https://github.com/bede/hostile))
- Run merging
3. Supports statistics metagenome coverage estimation ([Nonpareil](https://nonpareil.readthedocs.io/en/latest/)) and for host-read removal ([Samtools](http://www.htslib.org/))
4. Performs taxonomic classification and/or profiling using one or more of:
Expand Down
5 changes: 5 additions & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ report_section_order:
order: 200
samtools:
order: 100
hostile:
order: 95
kraken:
order: 90
bracken:
Expand Down Expand Up @@ -71,6 +73,7 @@ run_modules:
- nanoq
- bowtie2
- samtools
- hostile
- kraken
- kaiju
- diamond
Expand Down Expand Up @@ -138,6 +141,8 @@ top_modules:
name: "bowtie2"
- "samtools":
name: "Samtools Stats"
- "hostile":
name: "Hostile"
- "kraken":
name: "Kraken"
path_filters:
Expand Down
60 changes: 60 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,66 @@ process {
]
}

withName: HOSTILE_FETCH_SHORTREADS {
ext.args = '--bowtie2'
publishDir = [
[
path: { "${params.outdir}/hostile/fetch" },
mode: params.publish_dir_mode,
enabled: params.save_hostremoval_index,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
]
}

withName: HOSTILE_CLEAN_SHORTREADS {
ext.args = "--aligner bowtie2"
ext.prefix = { "${meta.id}_${meta.run_accession}" }
publishDir = [
[
path: { "${params.outdir}/hostile/clean" },
mode: params.publish_dir_mode,
pattern: '*.json',
],
[
path: { "${params.outdir}/hostile/clean" },
mode: params.publish_dir_mode,
pattern: '*.{fastq.gz,json}',
enabled: params.save_hostremoval_unmapped,
],
]
}

withName: HOSTILE_FETCH_LONGREADS {
ext.args = '--minimap2'
publishDir = [
[
path: { "${params.outdir}/hostile/fetch" },
mode: params.publish_dir_mode,
enabled: params.save_hostremoval_index,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
]
}

withName: HOSTILE_CLEAN_LONGREADS {
ext.args = "--aligner minimap2"
ext.prefix = { "${meta.id}_${meta.run_accession}" }
publishDir = [
[
path: { "${params.outdir}/hostile/clean" },
mode: params.publish_dir_mode,
pattern: '*.json',
],
[
path: { "${params.outdir}/hostile/clean" },
mode: params.publish_dir_mode,
pattern: '*.{fastq.gz,json}',
enabled: params.save_hostremoval_unmapped,
],
]
}

withName: MERGE_RUNS {
ext.prefix = { "${meta.id}" }
publishDir = [
Expand Down
4 changes: 3 additions & 1 deletion conf/test_alternativepreprocessing.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ params {
longread_filter_tool = 'filtlong'
perform_shortread_complexityfilter = true
shortread_complexityfilter_tool = 'prinseqplusplus'
hostremoval_hostile_referencename = 'test-human-mit'
perform_shortread_hostremoval = true
shortread_hostremoval_tool = "hostile"
perform_longread_hostremoval = true
longread_hostremoval_tool = "hostile"
perform_runmerging = true
hostremoval_reference = params.pipelines_testdata_base_path + 'modules/data/genomics/homo_sapiens/genome/genome.fasta'
run_kaiju = true
run_kraken2 = true
run_bracken = false
Expand Down
24 changes: 24 additions & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,30 @@ This directory will be present and contain the unmapped reads from the `.fastq`
For short-read unmapped reads, see [bowtie2](#bowtie2).
:::

### Hostile

[Hostile](https://github.com/bede/hostile) removes host sequences from short and long read (meta)genomes, consuming single or paired FASTQ using specialised reference genomes.

<details markdown="1">
<summary>Output files</summary>

- `hostile/`
- `fetch/`
- `*.{bt2,fa.gz,*mmi}`: bowtie2 indices (short read) or minimap2 index (long reads) of downloaded reference genome, only if `--save_hostremoval_index` supplied.
Comment thread
sofstam marked this conversation as resolved.
- `clean/`
-`<sample_id>_<accession_id>.clean_{1,2}.fastq.gz`: FASTQ file(s) with host reads removed, only if `-- save_hostremoval_unmapped` supplied.
-`<sample_id>_<accession_id>.json`: host removal statistics in JSON format.

</details>

By default nf-core/taxprofiler will only provide the `.json` file if host removal is turned on.
You will only get FASTQ files if you specify to save `--save_hostremoval_unmapped` - these contain only unmapped reads.
Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify `--save_analysis_ready_fastqs`, in which case the reads will be in the folder `analysis_ready_reads`.

:::info
The resulting `.fastq` files may _not_ always be the 'final' reads that go into taxprofiling, if you also run other steps such as run merging etc..
:::

### Analysis Ready Reads

:::info
Expand Down
18 changes: 14 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
},
"hostile/clean": {
"branch": "master",
"git_sha": "dbc43f924a7410a2b828f2a022305f1d6e71ed84",
"installed_by": ["modules"]
},
"hostile/fetch": {
"branch": "master",
"git_sha": "f9e0c7508d84c6bbb6aef566bb1f23cf44c2b5bf",
"installed_by": ["modules"]
},
"kaiju/kaiju": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
Expand Down Expand Up @@ -252,22 +262,22 @@
},
"samtools/fastq": {
"branch": "master",
"git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1",
"git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205",
"installed_by": ["modules"]
},
"samtools/index": {
"branch": "master",
"git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1",
"git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205",
"installed_by": ["modules"]
},
"samtools/stats": {
"branch": "master",
"git_sha": "5cb9a8694da0a0e550921636bb60bc8c56445fd7",
"git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205",
"installed_by": ["modules"]
},
"samtools/view": {
"branch": "master",
"git_sha": "5cb9a8694da0a0e550921636bb60bc8c56445fd7",
"git_sha": "2057a0a8dbd67000d08613a556570aa7184a7c89",
"installed_by": ["modules"]
},
"sylph/profile": {
Expand Down
8 changes: 8 additions & 0 deletions modules/nf-core/hostile/clean/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions modules/nf-core/hostile/clean/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 82 additions & 0 deletions modules/nf-core/hostile/clean/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading