Any help would be much appreciated. My goal is to run the following for loop to generate a list of sample_id (which is actually isolation site) for a list of SRAs. However I get an error (see below) for each and every SRA.
for sra in `awk 'NR>1{print $1}' metadata.txt`
do
esearch -db sra -query $sra | efetch -format text | grep "sample_id" | sed 's/^.*G_DNA_//' | sed 's/"//' >> isolation_sites.txt
done
I also get the same error (see below) when I run it without the for loop, but instead a single line with just a single sample (i.e., no for loop).
esearch -db sra -query SRS056042 | efetch -format txt
The error is as follows:
curl: (23) Failed writing body
ERROR: curl command failed ( Tue Dec 7 14:17:34 EST 2021 ) with: 23
HTTP/1.1 200 OK
curl: (22) The requested URL returned error: 400
ERROR: curl command failed ( Tue Dec 7 14:17:35 EST 2021 ) with: 22
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi -d db=sra&id=x%2Cdwn%2Cf%2Cchmod%2Centrez%2Centrezdirect%2Cftp.ncbi.nlm.nih.gov%2Cgunzip%2Cnquire%2Cxtract.Darwin%2Cxtract.Darwin.gz%2CPlease%2CUnable%2Cexecutable.%2Cexecute%2Cfollowing%2Clocate%2Cthe%2Cto%2Cxtract&rettype=txt&retmode=text&tool=edirect&edirect=16.2&edirect_os=Darwin&email=home%40JJGs-MacBook-Pro.local
HTTP/1.1 400 Bad Request
WARNING: FAILURE ( Tue Dec 7 14:17:34 EST 2021 )
nquire -url https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ efetch.fcgi -db sra -id x,dwn,f,chmod,entrez,entrezdirect,ftp.ncbi.nlm.nih.gov,gunzip,nquire,xtract.Darwin,xtract.Darwin.gz,Please,Unable,executable.,execute,following,locate,the,to,xtract -rettype txt -retmode text -tool edirect -edirect 16.2 -edirect_os Darwin -email home@JJGs-MacBook-Pro.local
EMPTY RESULT
The command below
does work for me on MacOS
the error message seems to indicate some sort of installation error.