Skip to content

Commit 2a9be84

Browse files
authored
Merge pull request #133 from fmalmeida/dev
Release v3.4.2
2 parents 37f2db9 + 197eaf7 commit 2a9be84

File tree

16 files changed

+37
-19
lines changed

16 files changed

+37
-19
lines changed

.zenodo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "<p>The pipeline</p>\n\n<p>bacannot, is a customisable, easy to use, pipeline that uses state-of-the-art software for comprehensively annotating prokaryotic genomes having only Docker and Nextflow as dependencies. It is able to annotate and detect virulence and resistance genes, plasmids, secondary metabolites, genomic islands, prophages, ICEs, KO, and more, while providing nice an beautiful interactive documents for results exploration.</p>",
33
"license": "other-open",
44
"title": "fmalmeida/bacannot: A generic but comprehensive bacterial annotation pipeline",
5-
"version": "v3.4.0",
5+
"version": "v3.4.2",
66
"upload_type": "software",
77
"creators": [
88
{

bin/run_blasts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ def summary(output):
151151
prodc=line["sseqid"].split('~~~')[3]
152152
desc=line["sseqid"].split('~~~')[4]
153153
else:
154-
prodc=line["sseqid"].split('~~~')[3].split(' ')[0]
154+
prodc=line["sseqid"].split('~~~')[3].split(' ')[0].replace(' ', '')
155155
try:
156-
desc=' '.join(line["stitle"].split('~~~')[3].split(' ')[1:-1])
156+
desc=''.join(line["stitle"].split('~~~')[3])
157157
except:
158158
desc='Not found'
159159
# Subject coverage

conf/docker.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ process {
2424

2525
// container for R tools
2626
withLabel: 'renv' {
27-
container = 'fmalmeida/bacannot@sha256:23a0713d3694a10ee4c570a4e65a471045781a73711495aa08ae7d40f9b65097'
27+
container = 'fmalmeida/bacannot@sha256:fc0d5060474d709e4b96ad0b97bc2a5354d4da7d12afe549fb9d6446a7be9562'
2828
}
2929

3030
// container for bacannot server

docker/renv/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:22.04
22

3-
LABEL MAINTAINER Felipe Marques de Almeida <marques.felipe@aluno.unb.br>
3+
LABEL MAINTAINER="Felipe Marques de Almeida <marques.felipe@aluno.unb.br>"
44

55
# Workdir
66
WORKDIR /work

docker/renv/reports/report_custom_blast.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ blast_gff <- try(read.delim(params$blast_gff, header = FALSE, col.names=c("Co
6464
## Check for emptyness
6565
if ( class(blast_gff) == "try-error" || check_lines(custom_blast) == 0 ) {
6666
custom_blast <- data.frame(
67-
matrix(ncol = 14, nrow = 0)
67+
matrix(ncol = 13, nrow = 0)
6868
)
6969
blast_gff <- data.frame(
7070
matrix(ncol = 9, nrow = 0)

markdown/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
The tracking for changes started in v2.1
44

5+
## v3.4.2 [29-March-2025]
6+
7+
* [[[#131](https://github.com/fmalmeida/bacannot/issues/131)]]
8+
* Add a small sed command to correct wrong fasta headers from public databases
9+
* correct zenodo_get command to always download latest
10+
* correct channel parsing for generating html reports of custom databases
11+
* correct description field of `run_blasts.py` script
12+
513
## v3.4.1 [14-November-2024]
614

715
* [[[#127](https://github.com/fmalmeida/bacannot/issues/127)]]

modules/MGEs/iceberg.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ process ICEBERG {
3030
--mincov ${params.blast_MGEs_mincov} \\
3131
--threads $task.cpus \\
3232
--out ${prefix}_iceberg_blastp_onGenes.txt --2way | \\
33-
sed -e 's/GENE/ICEBERG_ID/g' > ${prefix}_iceberg_blastp_onGenes.summary.txt ;
33+
sed -e 's/GENE/ICEBERG_ID/g' -e 's/;//g' > ${prefix}_iceberg_blastp_onGenes.summary.txt ;
3434
3535
## Checking for full-length ICEs
3636
### The blast db was throwing errors
@@ -46,6 +46,6 @@ process ICEBERG {
4646
--mincov 0 \\
4747
--threads $task.cpus \\
4848
--out ${prefix}_iceberg_blastn_onGenome.txt | \\
49-
sed -e 's/GENE/ICEBERG_ID/g' > ${prefix}_iceberg_blastn_onGenome.summary.txt ;
49+
sed -e 's/GENE/ICEBERG_ID/g' -e 's/;//g' > ${prefix}_iceberg_blastn_onGenome.summary.txt ;
5050
"""
5151
}

modules/bacannot_dbs/get_zenodo.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ process GET_ZENODO_DB {
1010
script:
1111
"""
1212
# download database from zenodo
13-
zenodo_get https://doi.org/10.5281/zenodo.7615811
13+
zenodo_get 12674473
1414
1515
# organize data
1616
tar zxvf *.tar.gz && rm *.tar.gz

modules/bacannot_dbs/phast.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ process PHAST_DB {
1313
sed -e 's/ >/ /g' -e 's/~ /~/g' | \\
1414
awk -F "~~~" ' { if (\$0 ~ />/) { gsub(" ", "_", \$2); print \$1 "~~~" \$2 "~~~" \$3 "~~~" \$4 "~~~" \$5 } else { print \$0 }}' | \\
1515
awk -F "~~~" ' { if (\$0 ~ />/) { gsub("-", "_", \$2); print \$1 "~~~" \$2 "~~~" \$3 "~~~" \$4 "~~~" \$5 } else { print \$0 }}' | \\
16-
sed -e 's/~~~>/~~~/g' > sequences && \\
16+
sed -e 's/~~~>/~~~/g' -e 's/;//g' > sequences && \\
1717
rm phast_prot.fasta && \\
1818
diamond makedb --in sequences -d diamond && \\
1919
makeblastdb -in sequences -title 'PHAST' -dbtype prot -logfile /dev/null

modules/bacannot_dbs/sourmash.nf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ process SOURMASH_DB {
88
script:
99
"""
1010
# download sourmash database
11-
curl -L -o genbank-21.lca.json.gz https://osf.io/gk2za/download
12-
curl -L -o genbank-31.lca.json.gz https://osf.io/ypsjq/download
13-
curl -L -o genbank-51.lca.json.gz https://osf.io/297dp/download
11+
curl -L -o genbank-21.lca.json.gz https://farm.cse.ucdavis.edu/~ctbrown/sourmash-db/gtdb-rs207/gtdb-rs207.genomic-reps.dna.k21.lca.json.gz
12+
curl -L -o genbank-31.lca.json.gz https://farm.cse.ucdavis.edu/~ctbrown/sourmash-db/gtdb-rs207/gtdb-rs207.genomic-reps.dna.k31.lca.json.gz
13+
curl -L -o genbank-51.lca.json.gz https://farm.cse.ucdavis.edu/~ctbrown/sourmash-db/gtdb-rs207/gtdb-rs207.genomic-reps.dna.k51.lca.json.gz
1414
"""
1515
}

modules/prophages/phast.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ process PHAST {
2323
--mincov ${params.blast_MGEs_mincov} \\
2424
--threads $task.cpus \\
2525
--out ${prefix}_phast_blastp_onGenes.txt --2way | \\
26-
sed -e 's/PRODUCT/PHAST_ID/g' > ${prefix}_phast_blastp_onGenes.summary.txt ;
26+
sed -e 's/PRODUCT/PHAST_ID/g' -e 's/;//g' > ${prefix}_phast_blastp_onGenes.summary.txt ;
2727
"""
2828
}

modules/resistance/argminer.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ process ARGMINER {
2222
--mincov ${params.blast_resistance_mincov} \\
2323
--threads $task.cpus \\
2424
--out ${prefix}_argminer_blastp_onGenes.txt \\
25-
--2way > ${prefix}_argminer_blastp_onGenes.summary.txt ;
25+
--2way | \\
26+
sed -e 's/;//g' > ${prefix}_argminer_blastp_onGenes.summary.txt ;
2627
"""
2728
}

modules/virulence/vfdb.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ process VFDB {
2424
--threads $task.cpus \\
2525
--out ${prefix}_vfdb_blastn_onGenes.txt \\
2626
--2way | \\
27-
sed -e 's/ACCESSION/VFDB_ID/g' > ${prefix}_vfdb_blastn_onGenes.summary.txt ;
27+
sed -e 's/ACCESSION/VFDB_ID/g' -e 's/;//g' > ${prefix}_vfdb_blastn_onGenes.summary.txt ;
2828
"""
2929
}

modules/virulence/victors.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ process VICTORS {
2424
--threads $task.cpus \\
2525
--out ${prefix}_victors_blastp_onGenes.txt \\
2626
--2way | \\
27-
sed -e 's/PRODUCT/VICTORS_ID/g' > ${prefix}_victors_blastp_onGenes.summary.txt ;
27+
sed -e 's/PRODUCT/VICTORS_ID/g' -e 's/;//g' > ${prefix}_victors_blastp_onGenes.summary.txt ;
2828
"""
2929
}

nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ manifest {
108108
homePage = "https://github.com/fmalmeida/bacannot"
109109
mainScript = "main.nf"
110110
nextflowVersion = "!>=22.10.1"
111-
version = '3.4.1'
111+
version = '3.4.2'
112112
}
113113

114114
// Function to ensure that resource requirements don't go beyond

workflows/bacannot.nf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,17 @@ workflow BACANNOT {
391391

392392
// Render reports
393393
if (params.custom_db || params.ncbi_proteins) {
394+
// parse GFFs
395+
custom_db_gffs_ch =
396+
MERGE_ANNOTATIONS.out.customdb_gff
397+
.map{ id, file ->
398+
def db = file.baseName.replaceAll('^custom_database_', '')
399+
[ id, db, file ]
400+
}
401+
402+
// report
394403
CUSTOM_DATABASE_REPORT(
395-
CUSTOM_DATABASE.out.summary.join( MERGE_ANNOTATIONS.out.customdb_gff, remainder:true )
404+
CUSTOM_DATABASE.out.summary.join( custom_db_gffs_ch, by: [0, 1], remainder:true )
396405
)
397406
}
398407
REPORT(

0 commit comments

Comments
 (0)