Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to error handling and SRA downloads #11

Merged
merged 7 commits into from
May 8, 2023
Merged

Conversation

gtonkinhill
Copy link
Contributor

Hi,

Thanks very much for developing such a useful tool!

The ENA ftp server seemed to go down the other day and I noticed that fastq-dl was crashing rather than reverting to an SRA download. I've attempted to add a fix for this and have also added some other changes to the way SRA downloads are handled to avoid the temporary .sra files from being stored in the default chache directory.

In summary this pull request

  • changes the behaviour of ENA download to swap to SRA if any error is thrown.
  • swaps to using prefetch followed by fasterq-dump when downloading using the SRA
  • swaps to using the --split-3 --mem 1G parameters in fasterq-dump. This should avoid cases of orphaned reads appearing in paired end files and hopefully increase the speed a bit (not tested).
  • adds a --force option that will overwrite files if they already exist and if the checksum does not match (in the case of ENA downloads).

I have only done some fairly limited testing so it is probably worth double checking that I haven't broken anything. I'm also not 100% sure I have been running the tool correctly so apologies if any of these changes were not necessary.

…mmended in the docs. This should avoid large temporary sra files from being stored in the default chache location.
Copy link
Owner

@rpetit3 rpetit3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gtonkinhill

Thank you very much for the PR. Just some suggestions.

I'm going to do some testing on my end (I think I should be able to mimic ENA or SRA being down). I'll update soon, probably early next week.

Thanks again!
Robert

fastq_dl/fastq_dl.py Outdated Show resolved Hide resolved
fastq_dl/fastq_dl.py Outdated Show resolved Hide resolved
@rpetit3 rpetit3 changed the base branch from master to dev April 27, 2023 21:16
@rpetit3
Copy link
Owner

rpetit3 commented Apr 27, 2023

Ignore the formatting the CI is complaining about, I'll get it fixed.

I also repointed to a dev branch so I can test things out!

Thanks again!

@rpetit3 rpetit3 merged commit 35f1963 into rpetit3:dev May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants