Skip to content

Commit

Permalink
Merging abricate databases per sample into one json
Browse files Browse the repository at this point in the history
  • Loading branch information
marchoeppner committed Jan 10, 2025
1 parent 04ea662 commit daff863
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion assets/test/samples.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sample_id,platform,single_end,R1,R2
ERR1008684,ILLUMINA,false,ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR100/004/ERR1008684/ERR1008684_1.fastq.gz,ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR100/004/ERR1008684/ERR1008684_2.fastq.gz
SAMEA2707761,ILLUMINA,ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR580/ERR580964/ERR580964_1.fastq.gz,ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR580/ERR580964/ERR580964_2.fastq.gz
4 changes: 2 additions & 2 deletions bin/gabi.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def main(yaml, template, output, reference, version, call, wd):
if busco_data_all:
# Draw the busco stats graph
bdata = pd.DataFrame(data=busco_data_all, index=samples)
plot_labels = { "index": "Samples", "value": "Percentage"}
plot_labels = {"index": "Samples", "value": "Percentage"}
h = len(samples)*25 if len(samples) > 10 else 300
fig = px.bar(bdata, orientation='h', labels=plot_labels, height=h)
data["Busco"] = fig.to_html(full_html=False)
Expand Down Expand Up @@ -559,4 +559,4 @@ def check_gc(refs, query):


if __name__ == '__main__':
main(args.input, args.template, args.output, args.references, args.version, args.call, args.wd)
main(args.input, args.template, args.output, args.references, args.version, args.call, args.wd)
8 changes: 4 additions & 4 deletions modules/hamronization/abricate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process HAMRONIZATION_ABRICATE {
'quay.io/biocontainers/hamronization:1.1.4--pyhdfd78af_0' }"

input:
tuple val(meta), path(report)
tuple val(meta), path(reports)
val(format)
val(software_version)
val(reference_db_version)
Expand All @@ -23,16 +23,16 @@ process HAMRONIZATION_ABRICATE {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.sample_id}"
def prefix = task.ext.prefix ?: "${report.getBaseName()}"
"""
hamronize \\
abricate \\
${report} \\
${reports} \\
$args \\
--format ${format} \\
--analysis_software_version ${software_version} \\
--reference_database_version ${reference_db_version} \\
> ${prefix}.${format}
--output ${prefix}.${format}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ params {

manifest {
name = "bio-raum/gabi"
version = "0.9.1"
version = "0.9.2"
description = "GABI Pipeline for assembly and profiling of bacterial isolates"
author = "Marc Hoeppner"
homePage = "https://github.com/bio-raum/gabi"
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/amr_profiling/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ workflow AMR_PROFILING {

// Join basic Abricate results
HAMRONIZATION_ABRICATE(
ABRICATE_RUN.out.report.mix(ABRICATE_RUN_ECOLI_VIRULENCE.out.report),
ABRICATE_RUN.out.report.mix(ABRICATE_RUN_ECOLI_VIRULENCE.out.report).groupTuple(),
'json',
'1.0.1',
'2021-Mar-27'
Expand Down

0 comments on commit daff863

Please sign in to comment.