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

value error #18

Open
QUEST2179 opened this issue Jun 18, 2020 · 1 comment
Open

value error #18

QUEST2179 opened this issue Jun 18, 2020 · 1 comment

Comments

@QUEST2179
Copy link

Dear developer,

I tried a real dataset GBM from original paper but got the following error. Could you please help? Thanks!

mirna = pd.read_csv('GLIO_Mirna_Expression.txt', index_col=0, sep='\t')
exp = pd.read_csv('GLIO_Gene_Expression.txt', index_col=0, sep='\t')
methy = pd.read_csv('GLIO_Methy_Expression.txt', index_col=0, sep='\t')
affinity_networks = snf.make_affinity([mirna.T, exp.T, methy.T], metric='euclidean', K=20, mu=0.5)
fused_network = snf.snf(affinity_networks, K=20)

Traceback (most recent call last):
File "testSNF.py", line 27, in
fused_network = snf.snf(affinity_networks, K=20)
File "C:\Users\Miniconda3\lib\site-packages\snf\compute.py", line 392, in snf
aff = _check_SNF_inputs(aff)
File "C:\Users\Miniconda3\lib\site-packages\snf\compute.py", line 446, in _check_SNF_inputs
ac = check_array(a, force_all_finite=True, copy=True)
File "C:\Users\Miniconda3\lib\site-packages\sklearn\utils\validation.py", line 73, in inner_f
return f(**kwargs)
File "C:\Users\Miniconda3\lib\site-packages\sklearn\utils\validation.py", line 646, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "C:\Users\Miniconda3\lib\site-packages\sklearn\utils\validation.py", line 100, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

@lillepeder
Copy link

The fault is in the dataset. One patient (ID=TCGA-12-0780-01A...) has only missing values for every modality. I dropped this patient from the dataframes and it runs just fine.

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