8000 Addition of bbsplit for filtering of genomic contaminants by apsteinberg · Pull Request #1850 · nf-core/sarek · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Addition of bbsplit for filtering of genomic contaminants #1850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 51 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8c6dc5c
home commits
apsteinberg Aug 21, 2024
26a34c5
home commits
apsteinberg Aug 21, 2024
0ea1b08
home commits
apsteinberg Aug 21, 2024
9c8a0a6
home commits
apsteinberg Aug 21, 2024
e111111
rebasing to match dev branch
apsteinberg Aug 21, 2024
1d6de1c
rebasing
apsteinberg Aug 21, 2024
5f8348f
home commits
apsteinberg Aug 21, 2024
045a2eb
home commits
apsteinberg Aug 21, 2024
7b1e121
home commits
apsteinberg Aug 21, 2024
8d6737e
home commits
apsteinberg Aug 21, 2024
73ee506
home commits
apsteinberg Aug 21, 2024
70dd006
home commits
apsteinberg Aug 21, 2024
2653860
home commits
apsteinberg Aug 21, 2024
bf7e122
home commits
apsteinberg Aug 21, 2024
fc1baeb
home commits
apsteinberg Aug 22, 2024
49809f0
home commits
apsteinberg Aug 22, 2024
9b5feff
home commits
apsteinberg Aug 23, 2024
340013b
home commits
apsteinberg Aug 23, 2024
284d342
home commits
apsteinberg Aug 23, 2024
a246976
home commits
apsteinberg Aug 23, 2024
8fb577c
home commits
apsteinberg Aug 23, 2024
5fa3a95
initialization of bbsplit params
apsteinberg Mar 25, 2025
3c73ba1
feeding ref genome to bbsplit
apsteinberg Mar 25, 2025
f66a8cc
adding gunzip module
apsteinberg Mar 25, 2025
3b14ed5
taking out gunzip module
apsteinberg Mar 25, 2025
1aac5f7
fasta channel fix
apsteinberg Mar 25, 2025
8980eea
fasta channel fix
apsteinberg Mar 25, 2025
5abe9bd
fasta channel fix
apsteinberg Mar 25, 2025
12020ee
fasta channel fix
apsteinberg Mar 25, 2025
60735d3
git ignore
apsteinberg Mar 26, 2025
3ea2da0
linting
tobsecret Mar 26, 2025
10d73c0
rebase to dev
apsteinberg Mar 27, 2025
ed712c2
fix to main.nf
apsteinberg Mar 27, 2025
2d8e80f
fix to main.nf
apsteinberg Mar 27, 2025
f30c64c
removing junk from workflows/sarek/main.nf
apsteinberg Mar 27, 2025
2813dba
prepare genome workflow fix
apsteinberg Mar 27, 2025
156fe6c
fix to prepare_genome subworkflow
apsteinberg Mar 28, 2025
2a4f7b6
fix for empty channel
apsteinberg Mar 28, 2025
e1481cd
remove prepare_bbsplit workflow
apsteinberg Mar 28, 2025
553a350
add missing save_bbsplit_reads to nextflow_schema.json
tobsecret Apr 1, 2025
16d0251
fix linting on test scripts that we will later delete
tobsecret Apr 1, 2025
338af8a
deleted test scripts
tobsecret Apr 1, 2025
06e26b7
Merge remote-tracking branch 'upstream/dev'
tobsecret Apr 2, 2025
bbf776e
removing local testing files
tobsecret Apr 2, 2025
6723797
fix text alignment of bbsplit vars
tobsecret Apr 24, 2025
ba9ce21
replace leftover params.bbsplit references with local vars
tobsecret Apr 24, 2025
32d9f11
removed unnecessary restatement of versions channel
tobsecret Apr 24, 2025
a40b17d
text alignment of include statements
tobsecret Apr 24, 2025
d2c3b15
added explanatory comments for bbsplit args in prepare_genome
tobsecret Apr 24, 2025
ff9bf0b
delete extra blank line
tobsecret Apr 24, 2025
186b743
reordered arguments alphabetically
tobsecret Apr 24, 2025
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
38 changes: 38 additions & 0 deletions conf/modules/modules.config
pattern: '*.fastq.gz',
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,44 @@ process {
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
// BBSPLIT
if (!params.skip_bbsplit && params.bbsplit_fasta_list) {
process {
withName: '.*:PREPARE_BBSPLIT:BBMAP_BBSPLIT' {
ext.args = 'build=1'
publishDir = [
path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null }
]
}
}
}

//
// Contaminant removal options
//

if (!params.skip_bbsplit) {
process {
withName: 'BBMAP_BBSPLIT' {
ext.args = 'build=1 ambiguous2=all maxindel=150000'
publishDir = [
[
path: { "${params.outdir}/bbsplit" },
mode: params.publish_dir_mode,
pattern: '*.txt'
],
[
path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir },
mode: params.publish_dir_mode,
saveAs: { params.save_bbsplit_reads ? it : null }
]
]
}
}
}

// QC
withName: 'FASTQC' {
Expand Down
18 changes: 15 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ params.vep_cache_version = getGenomeAttribute('vep_cache_version')
params.vep_genome = getGenomeAttribute('vep_genome')
params.vep_species = getGenomeAttribute('vep_species')

aligner = params.aligner
aligner = params.aligner
skip_bbsplit = params.skip_bbsplit
bbsplit_fasta_list = params.bbsplit_fasta_list
bbsplit_index = params.bbsplit_index

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -145,7 +148,10 @@ workflow NFCORE_SAREK {
germline_resource,
known_indels,
known_snps,
pon)
pon,
bbsplit_fasta_list,
bbsplit_index
)

// Gather built indices or get them from the params
// Built from the fasta file:
Expand All @@ -159,6 +165,8 @@ workflow NFCORE_SAREK {
: PREPARE_GENOME.out.bwamem2
dragmap = params.dragmap ? Channel.fromPath(params.dragmap).map{ it -> [ [id:'dragmap'], it ] }.collect()
: PREPARE_GENOME.out.hashtable
// get index from bbsplit
bbsplit_index = PREPARE_GENOME.out.bbsplit_index
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the indices are provided and not newly computed, should they not be assigned here?


// Gather index for mapping given the chosen aligner
index_alignment = (aligner == "bwa-mem" || aligner == "sentieon-bwamem") ? bwa :
Expand Down Expand Up @@ -305,7 +313,11 @@ workflow NFCORE_SAREK {
vep_extra_files,
vep_fasta,
vep_genome,
vep_species
vep_species,
bbsplit_fasta_list,
bbsplit_index,
skip_bbsplit

)
emit:
multiqc_report = SAREK.out.multiqc_report // channel: /path/to/multiqc_report.html
Expand Down
10 changes: 10 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"bbmap/bbsplit": {
"branch": "master",
"git_sha": "1ceaa8ba4d0fd886dbca0e545815d905b7407de7",
"installed_by": ["modules"]
},
"bcftools/annotate": {
"branch": "master",
"git_sha": "cb08035150685b11d890d90c9534d4f16869eaec",
Expand Down Expand Up @@ -315,6 +320,11 @@
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"gunzip": {
"branch": "master",
"git_sha": "81880787133db07d9b4c1febd152c090eb8325dc",
"installed_by": ["modules"]
},
"lofreq/callparallel": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bbmap/bbsplit/environment.yml

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

131 changes: 131 additions & 0 deletions modules/nf-core/bbmap/bbsplit/main.nf

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

74 changes: 74 additions & 0 deletions modules/nf-core/bbmap/bbsplit/meta.yml

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

Loading
Loading
0