Skip to content

/path error when running ncbi-genome-download in a shell script #216

@KinSimon96

Description

@KinSimon96

Hello,

I need to download genome of multiple bacteria species, and to make it faster, I want to use a bash script:

`#!/bin/bash

species=(
"Bacillus anthracis"
"Bordetella bronchiseptica"
"Bordetella parapertussis"
"Bordetella pertussis"
"Candida albicans"
"Chlamydia pneumoniae"
"Chlamydia psittaci"
"Chlamydia trachomatis"
"Corynebacterium sp."
)

for s in "${species[@]}"; do
ncbi-genome-download --formats fasta,assembly-report bacteria --genera "$s"
done`

running ./dl_bacteria_genomes.sh, I have this following error:
File "/usr/lib/python3.8/os.py", line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
[Previous line repeated 4 more times]
File "/usr/lib/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/path'

If I download in the same linux pwd each species separately: ncbi-genome-download --formats fasta,assembly-report bacteria --genera "Bacillus anthracis", it's working correctly.

Any ideas of why this does not work using bash script ?

Thanks,
Simon

Metadata

Metadata

Assignees

No one assigned

    Labels

    need infoNeeds more info from the issue reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions