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

load_tcell fails on NaN 'EpitopeLinearSequence' #16

Closed
arahuja opened this issue Mar 11, 2014 · 3 comments
Closed

load_tcell fails on NaN 'EpitopeLinearSequence' #16

arahuja opened this issue Mar 11, 2014 · 3 comments

Comments

@arahuja
Copy link
Contributor

arahuja commented Mar 11, 2014

File "/Users/arahuja/anaconda/lib/python2.7/site-packages/epitopes-0.1-py2.7.egg/epitopes/iedb.py", line 204, in load_tcell
verbose = verbose)
File "/Users/arahuja/anaconda/lib/python2.7/site-packages/epitopes-0.1-py2.7.egg/epitopes/iedb.py", line 79, in _load_dataframe
epitopes = epitopes.map(make_alphabet_transformer(reduced_alphabet))
File "/Users/arahuja/anaconda/lib/python2.7/site-packages/pandas/core/series.py", line 1980, in map
mapped = map_f(values, arg)
File "inference.pyx", line 920, in pandas.lib.map_infer (pandas/lib.c:43334)
File "/Users/arahuja/anaconda/lib/python2.7/site-packages/epitopes-0.1-py2.7.egg/epitopes/features.py", line 26, in transform
return ''.join([chr(48 + reduced_alphabet[char]) for char in s])
TypeError: 'float' object is not iterable

One of the sequences is loaded in as nan

@iskandr
Copy link
Contributor

iskandr commented Mar 11, 2014

Arun, what args were you calling load_tcell with? I can't find the mystery NaN.

@arahuja
Copy link
Contributor Author

arahuja commented Mar 11, 2014

iedb.load_tcell_ngrams(
assay_group='cytotoxicity',
human = True,
max_ngram = 2,
return_transformer = True,
reduced_alphabet = reduced_alphabet.murphy10)

@iskandr
Copy link
Contributor

iskandr commented Mar 11, 2014

Thanks. I was transforming the strings before filtering out the null entries. I moved reduced_alphabet to the bottom of _load_dataframe and now it seems to work fine. Obviously needs more unit tests for all these filtering/transform options.

@iskandr iskandr closed this as completed Mar 11, 2014
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

No branches or pull requests

2 participants