Skip to content

Commit

Permalink
Merge pull request #25 from B-UMMI/remove_bcalm2
Browse files Browse the repository at this point in the history
remove BCALM2 from workflow
  • Loading branch information
cimendes authored Jul 1, 2022
2 parents a49bc93 + dee32c2 commit 5d12197
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_nextflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
nextflow run ${GITHUB_WORKSPACE} -profile docker --fastq "test/data/tiny_{1,2}.*" \
--reference "test/data/tiny_reference.fasta" --max_cpus 2 --max_memory 4.GB \
--abyss false --bcalm false --gatb_minia false --idba false --metahipmer2 false \
--abyss false --gatb_minia false --idba false --metahipmer2 false \
--minia false --megahit false --metaspades false --spades false --unicycler false \
--velvetoptimiser false
FILE=report/index.html
Expand All @@ -50,7 +50,7 @@ jobs:
run: |
nextflow run ${GITHUB_WORKSPACE} -profile singularity --fastq "test/data/tiny_{1,2}.*" \
--reference "test/data/tiny_reference.fasta" --max_cpus 2 --max_memory 4.GB \
--abyss false --bcalm false --gatb_minia false --idba false --metahipmer2 false \
--abyss false --gatb_minia false --idba false --metahipmer2 false \
--minia false --megahit false --metaspades false --spades false --unicycler false \
--velvetoptimiser false
FILE=report/index.html
Expand Down
5 changes: 1 addition & 4 deletions conf/containers.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
process {
withName: REFORMAT {
container = "pcerqueira/bbtools:38.44"
container = "pcerqueira/bbtools:38.44"
}
withName: ABYSS {
container = "cimendes/abyss:2.3.1-1"
}
withName: BCALM2 {
container = "cimendes/bcalm:2.2.3-1"
}
withName: GATBMINIAPIPELINE {
container = "cimendes/gatb-minia-pipeline:31.07.2020-1"
}
Expand Down
4 changes: 0 additions & 4 deletions conf/params.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ params {
abyssKmerSize = 96
abyssBloomSize = '2G'

//BCALM2
bcalm = false
bcalmKmerSize = 31

//GATB Minia Pipeline
gatb_minia = true
gatbKmerSize = '21,61,101,141,181'
Expand Down
29 changes: 0 additions & 29 deletions docker/bcalm/Dockerfile

This file was deleted.

5 changes: 2 additions & 3 deletions lib/CheckParams.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ class Params {
if (params.fastq instanceof Boolean) {print_error("'--fastq' must be a path pattern. Provided value: '$params.fastq'")}

// assembler skipping
if (!params.abyss && !params.bcalm && !params.gatb_minia && !params.idba && !params.metahipmer2 && !params.minia && !params.megahit && !params.metaspades && !params.spades && !params.skesa && !params.unicycler && !params.velvetoptimiser) {print_error("All assembly processes set to false. Exiting.")}
if (!params.abyss && !params.gatb_minia && !params.idba && !params.metahipmer2 && !params.minia && !params.megahit && !params.metaspades && !params.spades && !params.skesa && !params.unicycler && !params.velvetoptimiser) {print_error("All assembly processes set to false. Exiting.")}

// assembler parameters
if (!params.abyssKmerSize.toString().isNumber()) {print_error("'--bcalmKmerSize' parameter must be a number. Provided value: '$params.abyssKmerSize'")}
if (!params.bcalmKmerSize.toString().isNumber()) {print_error("'--bcalmKmerSize' parameter must be a number. Provided value: '$params.bcalmKmerSize'")}
if (!params.abyssKmerSize.toString().isNumber()) {print_error("'--abyssKmerSize' parameter must be a number. Provided value: '$params.abyssKmerSize'")}
if (!params.gatb_besst_iter.toString().isNumber()) {print_error("'--gatb_besst_iter' parameter must be a number. Provided value: '$params.gatb_besst_iter'")}
if (params.metaspadesKmerSize.toString().split(" ").size() <= 1) {if (params.metaspadesKmerSize.toString() != 'auto') {print_error("'--metaspadesKmerSize' parameter must be a sequence of space separated numbers or 'auto'. Provided value: '$params.metaspadesKmerSize'")}}
if (params.spadesKmerSize.toString().split(" ").size() <= 1) {if (params.spadesKmerSize.toString() != 'auto'){print_error("'--spadesKmerSize' parameter must be a sequence of space separated numbers or 'auto'. Provided value: '$params.spadesKmerSize'")}}
Expand Down
5 changes: 0 additions & 5 deletions lib/Helper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Help {
println ""
int nsamples = info.fastq / 2
println " Input FastQ : $nsamples"
println " Reference file : $info.referece"
println " Reports are found in : ./reports"
println " Results are found in : ./results"
println " Profile : $profile"
Expand Down Expand Up @@ -65,10 +64,6 @@ class Help {
println " --abyssBloomSize Bloom filter size for the ABySS assembler."
println " It must be a sting with a value and an unit."
println " (default: $params.abyssBloomSize)"
println " --bcalm Boolean controling the execution of the BCALM2 assembler."
println " (default: $params.bcalm)"
println " --bcalmKmerSize K-mer size for the BCALM2 assembler, as an intiger."
println " (default $params.bcalmKmerSize)"
println " --gatb_minia Boolean controling the execution of the GATB Minia Pipeline assembler."
println " (default: $params.gatb_minia)"
println " --gatbKmerSize K-mer sizes for the GATB Minia Pipeline assembler."
Expand Down
6 changes: 1 addition & 5 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ if (params.containsKey('fastq')) {
infoMap.put('fastq', file(params.fastq).size())
}
if (params.containsKey('reference')) {
if (file(params.reference) instanceof LinkedList) {
infoMap.put('reference', file(params.reference).size())
} else {
infoMap.put('fasta', 1)
}
infoMap.put('reference', file(params.reference).getName())
}

Help.start_info(infoMap, "$workflow.start", "$workflow.profile", "$workflow.manifest.version")
Expand Down
43 changes: 2 additions & 41 deletions modules/assembly/assembly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,6 @@ process ABYSS {
"""
}

process BCALM2 {

tag { sample_id }
label 'process_assembly'
publishDir "results/$sample_id/assembly/bcalm2/"

when:
params.bcalm

input:
tuple val(sample_id), path(fastq)
val KmerSize

output:
tuple val(sample_id), val('BCALM2'), path('*_BCALM2.fasta'), emit: assembly
path('.*version'), emit: version

script:
"""
ls -1 $fastq > list_reads
bcalm -version | head -n 1 | awk -F ', ' '{print \$2}' | awk -F ' ' '{print \$2}' | awk -F 'v' '{print \$2}' \
> .${sample_id}_BCALM2_version
{
bcalm -in list_reads -out ${sample_id} -kmer-size $KmerSize
mv ${sample_id}.unitigs.fa ${sample_id}_BCALM2.fasta
echo pass > .status
} || {
echo fail > .status
:> ${sample_id}_BCALM2.fasta
}
# remove temp files
rm list_reads *.fa || true
"""
}

process GATBMINIAPIPELINE {

tag { sample_id }
Expand Down Expand Up @@ -440,7 +405,6 @@ workflow assembly_wf {

abyssKmerSize = Channel.value(params.abyssKmerSize)
abyssBloomSize = Channel.value(params.abyssBloomSize)
bcalmKmerSize = Channel.value(params.bcalmKmerSize)
gatbKmerSize = Channel.value(params.gatbKmerSize)
GATB_error_correction = params.gatb_error_correction ? 'true' : 'false'
gatb_besst_iter = Channel.value(params.gatb_besst_iter)
Expand All @@ -456,7 +420,6 @@ workflow assembly_wf {
main:
REFORMAT(IN_fastq_raw)
ABYSS(IN_fastq_raw, abyssKmerSize, abyssBloomSize)
BCALM2(IN_fastq_raw, bcalmKmerSize)
GATBMINIAPIPELINE(IN_fastq_raw, gatbKmerSize, GATB_error_correction, gatb_besst_iter)
IDBA(REFORMAT.out)
MEGAHIT(IN_fastq_raw, megahitKmerSize)
Expand All @@ -469,8 +432,7 @@ workflow assembly_wf {
VELVETOPTIMISER(IN_fastq_raw)

emit:
all_assemblies = ABYSS.out.assembly | mix(BCALM2.out.assembly,
GATBMINIAPIPELINE.out.assembly,
all_assemblies = ABYSS.out.assembly | mix(GATBMINIAPIPELINE.out.assembly,
IDBA.out.assembly,
MEGAHIT.out.assembly,
METAHIPMER2.out.assembly,
Expand All @@ -480,8 +442,7 @@ workflow assembly_wf {
SPADES.out.assembly,
UNICYCLER.out.assembly,
VELVETOPTIMISER.out.assembly)
all_versions = ABYSS.out.version | mix(BCALM2.out.version,
GATBMINIAPIPELINE.out.version,
all_versions = ABYSS.out.version | mix(GATBMINIAPIPELINE.out.version,
IDBA.out.version,
MEGAHIT.out.version,
METAHIPMER2.out.version,
Expand Down

0 comments on commit 5d12197

Please sign in to comment.