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

Converting back and forth between ObjectIds #10

Open
kescobo opened this issue Feb 15, 2016 · 2 comments
Open

Converting back and forth between ObjectIds #10

kescobo opened this issue Feb 15, 2016 · 2 comments
Labels

Comments

@kescobo
Copy link
Collaborator

kescobo commented Feb 15, 2016

MongoDB uses ObjectId in _id field, and it's useful to use these to refer to genes/hits in the database, since these are by definition unique and look-up is incredibly fast. But, when writing genes out to fasta files, ObjectIds are written as strings, and I failed to convert them back into ObjectId when putting them into blast_results database. There might be other places where this mistake was made as well, and there are a bunch of places where I'm converting the string representation to ObjectId and back again.

All uses should be the same, so I think any time these identifiers are in the database, they should be represented by ObjectIds, not strings. The only time conversion should happen is when they're written to files or pulled in from files.

@kescobo kescobo added the To-do label Feb 15, 2016
@kescobo kescobo removed the To-do label May 29, 2017
@kescobo
Copy link
Collaborator Author

kescobo commented May 29, 2017

No longer relevant

@kescobo kescobo closed this as completed May 29, 2017
@kescobo kescobo reopened this Jun 5, 2017
@kescobo kescobo added the To-do label Jun 5, 2017
@kescobo
Copy link
Collaborator Author

kescobo commented Jun 5, 2017

It occurs to me that this isn't actually solved. Will get to this once I get unit tests set up to make things a bit more straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant