BaselAbujamous / clust

Automatic and optimised consensus clustering of one or more heterogeneous datasets
Other
161 stars 36 forks source link

Help issue #25

Closed ChrisCarrie closed 5 years ago

ChrisCarrie commented 5 years ago

Hi Basel

I keep getting this error any ideas how to fix it.

chris@chris-ubuntu:~$ clust /media/chris/E27C21847C215497/Clust/clust-1.8.10/X1.txt

/===========================================================================\ | Clust | | (Optimised consensus clustering of multiple heterogenous datasets) | | Python package version 1.8.10 (2018) Basel Abu-Jamous | +---------------------------------------------------------------------------+ | Analysis started at: Monday 21 January 2019 (12:30:51) | | 1. Reading dataset(s) | Traceback (most recent call last): File "/home/chris/anaconda3/bin/clust", line 11, in sys.exit(main()) File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/main.py", line 98, in main args.cs, args.np, args.optimisation, args.q3s, args.basemethods, args.deterministic) File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/clustpipeline.py", line 84, in clustpipeline returnSkipped=True) File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/scripts/io.py", line 46, in readDatasetsFromDirectory datafilesread = readDataFromFiles(datafileswithpath, delimiter, float, skiprows, skipcolumns, returnSkipped) File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/scripts/io.py", line 193, in readDataFromFiles usecols=range(skipcolumns, ncols), na_filter=True, comments=comm) File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/scripts/io.py", line 227, in pdreadcsv_regexdelim result = pd.read_csv(StringIO('\n'.join(re.sub(delimiter, b'\t', x) for x in f)), File "/home/chris/anaconda3/lib/python3.6/site-packages/clust/scripts/io.py", line 227, in result = pd.read_csv(StringIO('\n'.join(re.sub(delimiter, b'\t', x) for x in f)), File "/home/chris/anaconda3/lib/python3.6/re.py", line 191, in sub return _compile(pattern, flags).sub(repl, string, count) TypeError: sequence item 1: expected str instance, bytes found

Hope that makes sense Cheers

BaselAbujamous commented 5 years ago

Hi Chris

Thanks for using Clust and for your question.

It seems that you have installed Clust using python 3 (pip3), and unfortunately Clust is not compatible with it, and causes such errors (and other errors). I suggest uninstalling clust, and reinstalling it using Python 2 (using pip install clust).

I hope this solves your problem. Please let me know if it is still unsolved after this.

All the best. Basel

ChrisCarrie commented 5 years ago

Hi Basel

Yep that fixedit. Is running fine on single inputs.

I am trying to run it over 2 species with basically the same time points. I have run orthologs for these to create the mapping ID files. However I keep getting this issue

| Analysis started at: Monday 21 January 2019 (16:44:19) | | 1. Reading dataset(s) | | 2. Data pre-processing | Traceback (most recent call last): File "/home/chris/.local/bin/clust", line 11, in sys.exit(main()) File "/home/chris/.local/lib/python2.7/site-packages/clust/main.py", line 98, in main args.cs, args.np, args.optimisation, args.q3s, args.basemethods, args.deterministic) File "/home/chris/.local/lib/python2.7/site-packages/clust/clustpipeline.py", line 97, in clustpipeline OGsIncludedIfAtLeastInDatasets=OGsIncludedIfAtLeastInDatasets) File "/home/chris/.local/lib/python2.7/site-packages/clust/scripts/preprocess_data.py", line 436, in calculateGDMandUpdateDatasets OGsFirstColMap, delimGenesInMap) File "/home/chris/.local/lib/python2.7/site-packages/clust/scripts/preprocess_data.py", line 397, in mapGenesToCommonIDs Maploc[i, j] = re.split(delimGenesInMap, Maploc[i, j].replace('.', 'thisisadot').replace('-', 'thisisadash').replace('/', 'thisisaslash')) AttributeError: 'float' object has no attribute 'replace'

I have tried just about everything I can think of. Not entirely sure what the issue is. Any ideas?

Cheers Chris

BaselAbujamous commented 5 years ago

Hi Chris

Thanks again for your interest and for reporting this. This is the same issue #28, which has been fixed now in version 1.8.11.

All the best, Basel

BaselAbujamous commented 5 years ago

Hi Chris,

Update: Clust 1.10.0 now is compatible with Python 3 (as well as 2.7)!

All the best