From e81462f56476f75217067cff34ba609720499dc5 Mon Sep 17 00:00:00 2001 From: ens-ftricomi Date: Wed, 14 Aug 2024 14:31:24 +0100 Subject: [PATCH] check if genome file has not been downloaded --- .../nextflow/modules/transcriptomic_alignment/fetch_genome.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/nextflow/modules/transcriptomic_alignment/fetch_genome.nf b/pipelines/nextflow/modules/transcriptomic_alignment/fetch_genome.nf index 9ab99f0..09f3b7e 100644 --- a/pipelines/nextflow/modules/transcriptomic_alignment/fetch_genome.nf +++ b/pipelines/nextflow/modules/transcriptomic_alignment/fetch_genome.nf @@ -33,7 +33,7 @@ process FETCH_GENOME { script: """ - if [ ! -d "${params.outDir}/${taxon_id}/${gca}/ncbi_dataset/" ]; then + if [ ! -d "${params.outDir}/${taxon_id}/${gca}/ncbi_dataset/" ] || [ ! -n "\$(find "\${params.outDir}/${taxon_id}/${gca}/ncbi_dataset/" -type f -name '*.fna' 2>/dev/null)" ]; then echo "Directory ncbi_dataset does not exist. Proceeding with download..." curl --retry 3 -X GET "${params.ncbiBaseUrl}/${gca}/download?include_annotation_type=GENOME_FASTA&hydrated=FULLY_HYDRATED" -H "Accept: application/zip" --output genome_file.zip unzip -j genome_file.zip