Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

GeNorm Eleven Python Package Errors #4

Open
Motoufiq opened this issue Oct 14, 2018 · 0 comments
Open

GeNorm Eleven Python Package Errors #4

Motoufiq opened this issue Oct 14, 2018 · 0 comments

Comments

@Motoufiq
Copy link

Motoufiq commented Oct 14, 2018

Hi Tim,

I hope you are doing good!

I was trying to analyze a demo reference gene list to rank the candidate reference genes using GeNorm Eleven Python package following the instructions from the below link: https://github.com/tdsmith/eleven/blob/master/README.md However, I get the error messages are indicated below. Please assist me with regards to this.

Data file: https://github.com/tdsmith/eleven/blob/master/eleven/test/vandesompele-2002-cq.txt

screen shot 2018-10-14 at 11 50 36 am

SRLM-MTOUFIQ:Documents mtoufiq$ python
Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 18:37:05)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import eleven
import pandas
import pandas as pd
df = pd.read_csv('/Users/mtoufiq/Documents/Combined_Chip_Run_Py.csv')
df = df.rename(columns={'Gene': 'Target', 'Ct': 'Cq'})
censored = eleven.censor_background(df)
ranked = eleven.rank_targets(censored, ['DOCK2', 'EEF1A1', 'FAM105B', 'FTL', 'MYL12B', 'MYL6', 'RPS10', 'RPS25'], 'Control')
Traceback (most recent call last):
File "", line 1, in
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/eleven/eleven.py", line 164, in rank_targets
table = collect_expression(sample_frame, ref_targets, ref_sample)
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/eleven/eleven.py", line 142, in collect_expression
by_gene = {'Sample': sample_frame['Sample'], 'Target': sample_frame['Target']}
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/pandas/core/frame.py", line 2688, in getitem
return self._getitem_column(key)
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/pandas/core/frame.py", line 2695, in _getitem_column
return self._get_item_cache(key)
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/pandas/core/generic.py", line 2489, in _get_item_cache
values = self._data.get(item)
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/pandas/core/internals.py", line 4115, in get
loc = self.items.get_loc(item)
File "/Users/mtoufiq/anaconda2/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 3080, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Target'

@tdsmith

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

No branches or pull requests

1 participant