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

Add refresh option for build_fragment_fasta #22

Merged
merged 2 commits into from
Feb 20, 2018

Conversation

yaoyuyang
Copy link
Member

If refresh is True, force rebuilding the blastdb, this refresh
parameter is passed down from build_db in the build_db code. So when
build_db is called with refresh=True, fragment blastdb will be rebuilt,
which should be the correct behavior.

If refresh is True, force rebuilding the blastdb, this refresh
parameter is passed down from build_db in the build_db code. So when
build_db is called with refresh=True, fragment blastdb will be rebuilt,
which should be the correct behavior.
@yaoyuyang
Copy link
Member Author

Hi @myw, could you take a look at this? I need this functionality to rebuild a blastdb for a problematic genome from the ground up (rebuilding blastdb for all the fragments). I think this would be a generally useful feature. This should not slow down the normal operations in Edge that calls the build_db since most of the call came from check_and_build_genome_db which defaults with refresh=False and that's mostly what happens. Having this refresh=True option for building fragments will enable me to directly call build_genome_db with refresh=True to rebuilding the blastdb for all the fragments. Thanks!

Copy link
Contributor

@myw myw left a comment

Choose a reason for hiding this comment

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

LGTM, only one minor suggestion

fn = fragment_fasta_fn(fragment)
make_required_dirs(fn)

if not os.path.isfile(fn): # have not built this fasta
if not os.path.isfile(fn) or refresh is True: # have not built this fasta
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to say is True; fine to just evaluate it as boolean: if … or refresh:

This pull request was closed.
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