Error when using blockfile
2007lab opened this issue · comments
bash ukbm/transfertools/parallel_fetch.sh -f 23156 -p fetch_example.txt ../gfetch ../.ukbkey
Checking input values...
Downloading!
Parsing blockfile !
ukbm/transfertools/parallel_fetch.sh: line 120: [: -eq: unary operator expected
ukbm/transfertools/parallel_fetch.sh: line 120: [: -eq: unary operator expected
fetch_example.txt
631 13 3 28393532 32330205
632 13 4 32330206 36282996
Not sure why line 120 error. No output.
@maxadam2017 : do you know which data @2007lab is trying to download ?
@2007lab : it might be good to have a bit more context there
I'm pretty sure the variable is supposed to be called "skipflag". It's as simple as that.
This code use bash variables without quoting any of them.... not good practice.
I am trying to use your example in the README.
.ukbkey is my keyfile, that works for UKBB
fetch_example.txt I quoted the lines with blocks from chr13.
23156 is your example for genotypes.
23156 | Population level exome OQFE variants, pVCF format - interim 200k release | Exome sequences.
Please let me know what I should clarify.
@prioux 's comment on bash variables was unclear if it was to me.
I did not use skipflag variable.
I've run this script a total of 3 times, and did not have this issue.
@2007lab it looks like the variable is set as "skipflag
" in the cli options, but it gets called as ${skip}
at line 120. Could you do us a favour and change line 120 in your copy to:
if [ ${skipflag} -eq 1 ]; then
and see if it runs?
I made the change and the downloads work.
It is just very slow for the initial fetch message and write message to appear.
Consequently, it is unclear if anything is happening for atleast a few minutes. A little verbosity after the "Run Start" message may be helpful.
Thanks for the help!
@2007lab : it would indeed be useful : would you mind pushing a PR for this ?