Skip to content

Commit

Permalink
get the pipeline working
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanka-surana committed Dec 18, 2023
1 parent 3af990f commit da3b983
Show file tree
Hide file tree
Showing 28 changed files with 183 additions and 523 deletions.
440 changes: 0 additions & 440 deletions conf/igenomes.config

This file was deleted.

19 changes: 12 additions & 7 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ process {
withName: "BUSCO" {
scratch = true
// Overridden in the test profile, see at the end of this file
ext.args = "--mode genome --force"
ext.args = "--force"
}

withName: "DIAMOND_BLASTP" {
Expand All @@ -74,15 +74,24 @@ process {
ext.args = "--evalue 1.0e-25 --max-target-seqs 10 --max-hsps 1"
}

withName: "BLOBTOOLKIT_DEPTH" {
ext.args = "-s 1000"
}

withName: "BLOBTOOLKIT_WINDOWSTATS" {
ext.args = "--window 0.1 --window 0.01 --window 1 --window 100000 --window 1000000"
}

withName: "BLOBTOOLKIT_CREATEBLOBDIR" {
ext.args = "--evalue 1.0e-25 --hit-count 10"
publishDir = [
path: { "${params.outdir}/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals("versions.yml") ? null : filename }
]
}

withName: "BLOBTOOLKIT_CREATEBLOBDIR" {
withName: "BLOBTOOLKIT_UPDATEBLOBDIR" {
ext.args = "--evalue 1.0e-25 --hit-count 10 --update-plot"
publishDir = [
path: { "${params.outdir}/" },
Expand Down Expand Up @@ -123,10 +132,6 @@ process {
ext.args = "-outfmt '6 qseqid staxids bitscore std' -max_target_seqs 10 -max_hsps 1 -evalue 1.0e-10 -lcase_masking -dust '20 64 1'"
}

withName: "BLASTN" {
ext.args = "-outfmt '6 qseqid staxids bitscore std' -max_target_seqs 10 -max_hsps 1 -evalue 1.0e-10 -lcase_masking -dust '20 64 1'"
}

withName: "CUSTOM_DUMPSOFTWAREVERSIONS" {
publishDir = [
path: { "${params.outdir}/pipeline_info/blobtoolkit" },
Expand Down Expand Up @@ -159,7 +164,7 @@ profiles {
process {
withName: BUSCO {
// Note: BUSCO *must* see the double-quotes around the parameters
ext.args = '--mode genome --force --metaeuk_parameters \'"-s=2"\' --metaeuk_rerun_parameters \'"-s=2"\''
ext.args = '--force --metaeuk_parameters \'"-s=2"\' --metaeuk_rerun_parameters \'"-s=2"\''
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion conf/test_raw.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ params {
// Databases
taxdump = "/lustre/scratch123/tol/teams/grit/geval_pipeline/btk_databases/taxdump"
busco = "/lustre/scratch123/tol/resources/nextflow/busco/blobtoolkit.GCA_922984935.2.2023-08-03"
uniprot = "https://tolit.cog.sanger.ac.uk/test-data/resources/diamond/mCerEla1.1.buscogenes.dmnd"
blastp = "${projectDir}/assets/test/mMelMel3.1.buscogenes.dmnd"
blastx = "${projectDir}/assets/test/mMelMel3.1.buscoregions.dmnd"
blastn = "${projectDir}/assets/test/nt_mMelMel3.1/"
}
11 changes: 0 additions & 11 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@

nextflow.enable.dsl = 2

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GENOME PARAMETER VALUES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

// Remove this line if you don't need a FASTA file
// This is an example of how to use getGenomeAttribute() to fetch parameters
// from igenomes.config using `--genome`
// params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VALIDATE & PRINT PARAMETER SUMMARY
Expand Down
3 changes: 2 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"git_sha": "f0d13ae7e1f9b24a705764f8673af859268d7077",
"installed_by": [
"modules"
]
],
"patch": "modules/nf-core/blast/blastn/blast-blastn.diff"
},
"busco": {
"branch": "master",
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/chunk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_CHUNK {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_CHUNK module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta) , path(fasta)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/config.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_CONFIG {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "GENERATE_CONFIG module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(fasta)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/countbuscos.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_COUNTBUSCOS {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_COUNTBUSCOS module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(table, stageAs: 'dir??/*')
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/createblobdir.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_CREATEBLOBDIR {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_BLOBDIR module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(window, stageAs: 'windowstats/*')
Expand Down
35 changes: 35 additions & 0 deletions modules/local/blobtoolkit/depth.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
process BLOBTOOLKIT_DEPTH {
tag "${meta.id}"
label 'process_single'

if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_DEPTH module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtk:0.5.1"

input:
tuple val(meta), path(bam), path(bai)
each plot

output:
tuple val(meta), path('*.regions.bed.gz') , emit: bed
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
blobtk depth \\
-b ${bam} \\
$args \\
-O ${prefix}.regions.bed.gz \\
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blobtoolkit: \$(btk --version | cut -d' ' -f2 | sed 's/v//')
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/extractbuscos.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_EXTRACTBUSCOS {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_EXTRACTBUSCOS module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(fasta)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/images.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_IMAGES {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_IMAGES module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtk:0.3.3"
container "docker.io/genomehubs/blobtk:0.5.1"

input:
tuple val(meta), path(blobdir)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/metadata.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_METADATA {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_METADATA module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(yaml)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/summary.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_SUMMARY {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_SUMMARY module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(blobdir)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/unchunk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_UNCHUNK {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_UNCHUNK module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(blast_table)
Expand Down
9 changes: 5 additions & 4 deletions modules/local/blobtoolkit/updateblobdir.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ process BLOBTOOLKIT_UPDATEBLOBDIR {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_BLOBDIR module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(input)
tuple val(meta1), path(blastx)
tuple val(meta1), path(blastx, stageAs: "blastx.txt")
tuple val(meta2), path(blastn, stageAs: "blastn.txt")
path(taxdump)

output:
Expand All @@ -23,13 +24,13 @@ process BLOBTOOLKIT_UPDATEBLOBDIR {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def hits_blastx = blastx ? "--hits ${blastx}" : ""
def hits_blastn = blastn ? "--hits ${blastn}" : ""
"""
blobtools replace \\
--taxdump ${taxdump} \\
--taxrule bestdistorder=buscoregions \\
${hits_blastx} \\
--bedtsvdir windowstats \\
--meta ${yaml} \\
${hits_blastn} \\
--threads ${task.cpus} \\
$args \\
${input}
Expand Down
2 changes: 1 addition & 1 deletion modules/local/blobtoolkit/windowstats.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process BLOBTOOLKIT_WINDOWSTATS {
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "GET_WINDOW_STATS module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.1.5"
container "docker.io/genomehubs/blobtoolkit:4.3.0"

input:
tuple val(meta), path(tsv)
Expand Down
30 changes: 30 additions & 0 deletions modules/nf-core/blast/blastn/blast-blastn.diff

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

4 changes: 3 additions & 1 deletion modules/nf-core/blast/blastn/main.nf

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

6 changes: 0 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,6 @@ plugins {
id 'nf-validation' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

// Load igenomes.config if required
if (!params.igenomes_ignore) {
includeConfig 'conf/igenomes.config'
} else {
params.genomes = [:]
}
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.
// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable.
Expand Down
Loading

0 comments on commit da3b983

Please sign in to comment.