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

index samples by sample name for easier access. #2

Closed
wants to merge 6 commits into from
Closed

index samples by sample name for easier access. #2

wants to merge 6 commits into from

Conversation

brentp
Copy link
Collaborator

@brentp brentp commented Oct 4, 2011

No description provided.

@brentp
Copy link
Collaborator Author

brentp commented Oct 4, 2011

SHA: c1af7f5

should be a separate pull request, but I can't see how to do that. It adds a genotypes() method so that one can get the un-encoded genotypes from the encoded ones.
This might work better if Record were a class rather than a named tuple, then we could add methods to record.

@jamescasbon
Copy link
Contributor

A good case for an OrderedDict so that we can access by name, but iterating the values provides the order as in the file?
http://docs.python.org/dev/library/collections.html#collections.OrderedDict

@brentp
Copy link
Collaborator Author

brentp commented Nov 2, 2011

Seems reasonable, especially since it's usually going to be a fairly small dictionary. I'll add this to the pull request later today.

@brentp
Copy link
Collaborator Author

brentp commented Nov 2, 2011

although OrderedDicts are not in python2.6 collections

@jamescasbon
Copy link
Contributor

Always with your backwards compatibility! Oh well, it was a nice to have, but version for 2.6 listed here:
http://stackoverflow.com/questions/1617078/ordereddict-for-older-versions-of-python

not sure its worth a dependency.

@jamescasbon
Copy link
Contributor

Please continue issue at jamescasbon#1

@jamescasbon
Copy link
Contributor

A quick note since everyone is watching this issue.

I have fixed this on my fork using OrderedDict from collections. If python<2.7 setup.py should install some code to do that.

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