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

update prefetch #970

Merged
merged 2 commits into from
Mar 22, 2023
Merged

update prefetch #970

merged 2 commits into from
Mar 22, 2023

Conversation

siebrenf
Copy link
Member

Nope, you really can't pipe prefetch output. But we can update the tool! Prefetch received bugfixes and can now accept and unlimited max-size. And we can clean up the yaml a bit (pigz isn't used anymore?)

@@ -33,6 +33,7 @@ rule run2sra:
# and remove the top level folder since prefetch will assume we are done otherwise
mkdir -p {params.outdir}; cd {params.outdir}; rm -r {wildcards.run}

# TODO: for loop can be removed if we dont see the debug message
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand?

Copy link
Member

Choose a reason for hiding this comment

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

I actually don't understand what the original code does actually haha

Im not sure actually why this lock is here. I guess some filelock issues with many parallel starts. But why only this rule specifically? 🤔

Copy link
Member Author

@siebrenf siebrenf Mar 22, 2023

Choose a reason for hiding this comment

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

prefetch can fail (it even says so in the docs) so apparently we gave it additional retries, in addition to the rule having retries. No idea if it is still needed, that's why I added some DEBUG messages + this note to self.

The filelock... im not so sure about.

Comment on lines -50 to 69
# TODO: this is the strangest bug, in that on some machines (ocimum) prefetch downloads
# to a different location. Not sure what causes this, but this should fix that. Could simply
# be a global setting that we haven't discovered yet...
# TODO: section can be removed if we dont see the debug message
# bug report: https://github.com/ncbi/sra-tools/issues/533
if [[ -f "{params.outdir}/{wildcards.run}.sra" ]]; then
echo "DEBUG: moving output to correct directory" >> {log}
mkdir -p {params.outdir}/{wildcards.run}
mv {params.outdir}/{wildcards.run}.sra {output}
fi

# TODO: section can be removed if we dont see the debug message
# If an sralite file was downloaded instead of a sra file, just rename it
if [[ -f "{params.outdir}/{wildcards.run}.sralite" ]]; then
echo "DEBUG: renaming SRAlite" >> {log}
mkdir -p {params.outdir}/{wildcards.run}
mv {params.outdir}/{wildcards.run}.sralite {output}
fi
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't be so sure that just because we don't have these issues with our test data, that we don't get them in general. The sralite one used to be specific to some accessions if I remember correctly

Copy link
Member Author

Choose a reason for hiding this comment

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

the top issue should be fixed in prefetch now. I left it in because I agree ;)

@siebrenf siebrenf merged commit 05edb15 into develop Mar 22, 2023
@siebrenf siebrenf deleted the prefetch branch March 22, 2023 14:47
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.

None yet

2 participants