Code Monkey home page Code Monkey logo

atlas-fastq-provider's People

Contributors

pcm32 avatar pinin4fjords avatar pmb59 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atlas-fastq-provider's Issues

Error when providing '-m' parameter to fetchFastq.sh on macOS

Hi @pinin4fjords

I noticed that the following works

$ fetchFastq.sh -f ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR035/ERR035229/ERR035229.fastq.gz -t ERR035229.fastq.gz

however when providing -m wget value it produces an error:

$ fetchFastq.sh -f ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR035/ERR035229/ERR035229.fastq.gz -t ERR035229.fastq.gz -m wget
Downloading ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR035/ERR035229/ERR035229.fastq.gz to .../ERR035229.fastq.gz using wget
No such directory ‘vol1/fastq/ERR035/ERR035229’.

gzip: ERR035229.fastq.gz.tmp: unexpected end of file
No such directory ‘vol1/fastq/ERR035/ERR035229’.

gzip: ERR035229.fastq.gz.tmp: unexpected end of file
No such directory ‘vol1/fastq/ERR035/ERR035229’.

gzip: ERR035229.fastq.gz.tmp: unexpected end of file
ERROR: Failed to retrieve ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR035/ERR035229/ERR035229.fastq.gz to ERR035229.fastq.gz
Failed to download ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR035/ERR035229/ERR035229.fastq.gz from ena with wget: download failed

`convert_ena_fastq_to_uri` returns URI with double `/` which breaks downloads

This is currently happening because convert_ena_fastq_to_uri calls get_library_path without a second argument (for the root):

local libDir=$(dirname $(get_library_path $library))
which means that that function returns
echo "${rootDir}/${subDir}/${prefix}${library}/${library}"

producing a leading / which then when concatenated at

echo ${ENA_HTTP_ROOT_PATH}/$downloadType/$libDir$fastq
produces the //.

Retrieval method `wget` should not be passed explicitly to the command

Explicitly passing wget as a retrieval method gives an error:

> fetchEnaLibraryFastqs.sh -l ERR2890000 -d "./" -t fastq -n PAIRED -m wget -s ena -p public
Downloading file ERR2890000_1.fastq.gz for ERR2890000 to /path/to/tmpdir/atlas-fastq-provider
/path/to/atlas-fastq-provider-functions.sh: line 1179: fetch_file_from_ena_over_wget: command not found

fetch_file_from_ena_over_wget method does not exist because the function name is built with the method using fetch_file_from_ena_over_$method. Only fetch_file_from_ena_over_http, fetch_file_from_ena_over_ftp, and fetch_file_from_ena_over_ssh exist (see functions here)
The method wget is implied in some methods, and handled internally by the code.

Remove any indication in readme and usages that wget can be explicitly passed to the command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.