Changes to use of constant namedb and seq files#7
Open
RamRS wants to merge 3 commits intoctb:masterfrom
Open
Conversation
…ia command line to annotate-seqs.py mouse.namedb, mouse.namedb.fullname and mouse.protein.faa were hardcoded into namedb.py. Now, it picks up from sys.argv[4] and sys.argv[5], where sys.argv is supplied to annotate-seqs.py Possible regression bugs if namedb.py is used by scripts other than annotate-seqs.py that use a different command line argument pattern
file and constant namedb files make-namedb changed to pickle into constant names.db and fullnames.db files, and pickle sequence filename into names.db. namedb.py modified to unpickle correspondingly. Lines expecting extra CMD line args in annotate-seqs removed.
make-namedb.py
Outdated
Owner
There was a problem hiding this comment.
Two comments --
since sys.argv[1] is now used twice in the script (and in any case I wrote it badly in the first place), please set a variable to the value at the top, and then reuse the variable down here. I guess something like 'seqfile = sys.argv[1]'.
second, you don't need to create a dict and then populate it and then dump it. Just do
dump(seqfile, fp)
dump(names, fp)
following which you can do
seqfile = load(fp)
names = load(fp)
This also eliminates the use of 'get' below...
dict() used in previous commit has been removed, sequential calls to dump() and load() are used instead. A variable 'seqFile' id used to store sequence file name from CMD line args.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are changes that override the changes from the previous commit/pull-request. Changes have been made in the way objects are pickled and unpickled, and also in the use of CMD line args.
Ram