Closed jimmyherawan closed 4 years ago
Am experiencing the same problem. I tried re-exporting my .csv
files into tab delimited files. Yet end up with the same error even though the sample file and my files are identical?
Update 06-19-2020:
I figured out the issue I believe. So my custom data is of type float64
, large decimal numbers as entries. I think due to pd.to_csv(delimited='\t')
, some rows get overwritten and causing MICtools
to include samples as variables. I noticed this as my original data has 59 variable but running MICtools
sets X = 179? I tested on a small data set with 4 variables and integer entries and got it working perfectly fine.
Fixed it this way. If your data is in .csv
, export it using x.T.to_csv(r'mydata.txt', header=True, index=True, sep='\t', mode='a')
@jimmyherawan, @MichaelMMeskhi, could you share the datasets? I would try to reproduce the error.
@davidealbanese Here's my original .csv
file.
@davidealbanese, thank you for your response Here's my dataset
@jimmyherawan, the warning in mictools adjust
seems to be related to https://github.com/numpy/numpy/issues/6784 and to the version installed in conda. I suggest to use the mictools docker version instead.
@MichaelMMeskhi, mictools takes TAB-delimited files, not CSVs.
@davidealbanese I know, I was converting from .csv
to tab delimited .txt
and was having issues due to that but I fixed it.
@jimmyherawan, the warning in
mictools adjust
seems to be related to numpy/numpy#6784 and to the version installed in conda. I suggest to use the mictools docker version instead.@MichaelMMeskhi, mictools takes TAB-delimited files, not CSVs.
Thank you @davidealbanese, work perfectly using docker
Dear Mr. Davide
I try the datasaurus dataset and it worked perfectly until the end. But when I try to use another dataset from https://data.mendeley.com/datasets/h3cgnj8hft/1, There are problems:
Applications/Anaconda/anaconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py:569: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison mask |= (ar1 == a)
File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/scripts/mictools_cmd.py", line 265, in strength thr, alpha, clumps) File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/mictools/strength.py", line 119, in strength_cmd c=clumps) File "/Applications/Anaconda/anaconda3/lib/python3.7/site-packages/mictools/strength.py", line 84, in compute_strength mine.compute_score(x, y) File "minepy/mine.pyx", line 84, in minepy.mine.MINE.compute_score ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
file strenght.txt is emptyThank you for your help. Jimmy