Skip to content

Commit

Permalink
check if genome file has not been downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ens-ftricomi committed Aug 14, 2024
1 parent ad46333 commit e81462f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e81462f

Please sign in to comment.