Skip to content

Commit

Permalink
fix accessions for assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetit3 committed Jul 1, 2023
1 parent dff203d commit c37e4ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/nf/bactopia.nf
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def process_accession(accession, genome_size, species) {
def meta = [:]
meta.genome_size = genome_size
meta.species = species

if (accession.length() > 0) {
if (accession.startsWith('GCF') || accession.startsWith('GCA')) {
meta.id = accession.split(/\./)[0]
Expand Down
2 changes: 1 addition & 1 deletion lib/nf/bactopia_tools.nf
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _collect_inputs(sample, dir, extension) {
PATHS.gff = "annotator"
PATHS.meta = "gather"

base_dir = "${dir}/${sample}/bactopia/main/"
base_dir = "${dir}/${sample}/main/"
se = "${base_dir}/${PATHS['fastq']}/${sample}.fastq.gz"
ont = "${base_dir}/${PATHS['fastq']}/.ont"
pe1 = "${base_dir}/${PATHS['fastq']}/${sample}_R1.fastq.gz"
Expand Down
6 changes: 3 additions & 3 deletions lib/nf/functions.nf
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ def saveFiles(Map args) {
// outdir/<SAMPLE_NAME>/{main|tools}
if (goto_base) {
// my-sample/assembly-error.txt
final_output = "${args.prefix}/bactopia/${final_output}"
final_output = "${args.prefix}/${final_output}"
} else {
// my-sample/bactopia-main/assembler
if (process_name == "bakta" || process_name == "prokka") {
// my-sample/bactopia-main/<process_name>/<output>
final_output = "${args.prefix}/bactopia/${args.opts.btype}/annotator/${final_output}"
final_output = "${args.prefix}/${args.opts.btype}/annotator/${final_output}"
} else {
// my-sample/bactopia-main/<output>
final_output = "${args.prefix}/bactopia/${args.opts.btype}/${final_output}"
final_output = "${args.prefix}/${args.opts.btype}/${final_output}"
}
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions modules/local/bactopia/gather/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RESOURCES = get_resources(workflow.profile, params.max_memory, params.max_c
options = initOptions(params.options ? params.options : [:], 'gather')
options.ignore = [".fastq.gz", ".fna.gz"]
options.btype = options.btype ?: "main"
conda_tools = "bioconda::bactopia-gather=1.0.2"
conda_tools = "bioconda::bactopia-gather=1.0.3"
conda_name = conda_tools.replace("=", "-").replace(":", "-").replace(" ", "-")
conda_env = file("${params.condadir}/${conda_name}").exists() ? "${params.condadir}/${conda_name}" : conda_tools

Expand All @@ -16,8 +16,8 @@ process GATHER {

conda (params.enable_conda ? conda_env : null)
container "${ workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bactopia-gather:1.0.2--hdfd78af_0' :
'quay.io/biocontainers/bactopia-gather:1.0.2--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/bactopia-gather:1.0.3--hdfd78af_0' :
'quay.io/biocontainers/bactopia-gather:1.0.3--hdfd78af_0' }"

input:
tuple val(meta), path(r1, stageAs: '*???-r1'), path(r2, stageAs: '*???-r2'), path(extra)
Expand Down

0 comments on commit c37e4ef

Please sign in to comment.