On Jun 3, 2009, at 7:16 AM, C. Titus Brown wrote:
> > - formatdb (as currently run) could fail for a bunch of reasons, not > just that it's not installed. Should we test to see if a 'formatdb' > executable can be run, much like we test that blastall exists in > testutil.py? And should this be cached? I think just raising a clear error message (see below) is all that's needed. formatdb is a one-time operation, not an inner loop, so I don't think this is a performance bottleneck that justifies the added complexity of caching. > > > - what if the database already exists and we don't need to run > formatdb, > e.g. the database is in a location specified in the BLASTDB > variable or > .ncbirc file? As you say, there's an endless set of possible ways things could be misconfigured and places the data could be hiding. We don't want to define Pygr's job as solving all these possible problems like magic, by reading the user's mind etc. We have a clear mechanism for the user to specify a list of possible locations (blastIndexDirs attribute). If the database is not in one of those locations, I think Pygr should raise a clear error message; see below. > > > - the run_formatdb code looks in a number of locations. So we should > probably only raise OSError if all of the locations fail. Yes, that's what I meant. In the case where run_formatdb fails in all locations, raise an exception, with an error message like "formatdb failed. Either formatdb is not in your PATH, you had insufficient privileges or diskspace in all the locations specified by blast.BlastMapping.blastIndexDirs, or your NCBI tools are misconfigured." What do you think? Cheers, -- Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pygr-dev" group. To post to this group, send email to pygr-dev@googlegroups.com To unsubscribe from this group, send email to pygr-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pygr-dev?hl=en -~----------~----~----~----~------~----~------~--~---