You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed arboreto through pip and I can't successfully run the following code using the example data provided in this repository :
import pandas as pd
from distributed import Client, LocalCluster
from arboreto.utils import load_tf_names
from arboreto.algo import grnboost2
in_file = 'net1_expression_data.tsv'
tf_file = 'net1_transcription_factors.tsv'
out_file = 'net1_grn_output.tsv'
# ex_matrix is a DataFrame with gene names as column names
ex_matrix = pd.read_csv(in_file, sep='\t')
# tf_names is read using a utility function included in Arboreto
tf_names = load_tf_names(tf_file)
# compute the GRN
network = grnboost2(expression_data=ex_matrix, tf_names=tf_names)
When I run the code I get the following error, which prevents the program from running:
Exception: ValueError("Metadata mismatch found in `from_delayed`.\n\nThe columns in the computed data do not match the columns in the provided metadata.\n Index([u'TF', u'importance', u'target'], dtype='object')\n :Index([u'TF', u'target', u'importance'], dtype='object')",)
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/arboreto/algo.py", line 41, in grnboost2
early_stop_window_length=early_stop_window_length, limit=limit, seed=seed, verbose=verbose)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/arboreto/algo.py", line 135, in diy
.compute(graph, sync=True) \
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/client.py", line 2758, in compute
result = self.gather(futures)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/client.py", line 1822, in gather
asynchronous=asynchronous,
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/client.py", line 753, in sync
return sync(self.loop, func, *args, **kwargs)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/utils.py", line 331, in sync
six.reraise(*error[0])
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/utils.py", line 316, in f
result[0] = yield future
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 261, in result
raise_exc_info(self._exc_info)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/distributed/client.py", line 1653, in _gather
six.reraise(type(exception), exception, traceback)
File "/home/compgen/users/scastillo/.local/lib/python2.7/site-packages/dask/dataframe/utils.py", line 598, in check_meta
errmsg))
ValueError: Metadata mismatch found in `from_delayed`.
The columns in the computed data do not match the columns in the provided metadata.
Index([u'TF', u'importance', u'target'], dtype='object')
:Index([u'TF', u'target', u'importance'], dtype='object')
Is there something I am doing wrong? I have had the same error in two different machines with my own data, which made me look into using the provided examples.
Thank you.
The text was updated successfully, but these errors were encountered:
Hi,
I installed arboreto through pip and I can't successfully run the following code using the example data provided in this repository :
When I run the code I get the following error, which prevents the program from running:
Is there something I am doing wrong? I have had the same error in two different machines with my own data, which made me look into using the provided examples.
Thank you.
The text was updated successfully, but these errors were encountered: