BaselAbujamous / clust

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

TypeError: can only concatenate list (not "NoneType") to list #22

Closed MatusV8 closed 5 years ago

MatusV8 commented 5 years ago

Hello, I want to try using clust to cluster my data but I came across an error. I cannot find the reason why it is not working. Maybe you could help me.

I have four files (A, B, C and D) and each has 3 time points. The file B has two replicates. The data are log2 FC transformed. I followed the example and created tsv files and put them into ./Data dir. You can find the input files and code below.

replicate.txt A.txt B.txt C.txt D.txt

clust Data/ -r replicate.txt -n 0 --no-fil-flat
 /===========================================================================\
> |                                   Clust                                   |
> |    (Optimised consensus clustering of multiple heterogenous datasets)     |
> |           Python package version 1.8.9 (2018) Basel Abu-Jamous            |
> +---------------------------------------------------------------------------+
> | Analysis started at: Tuesday 27 November 2018 (20:33:51)                  |
> | 1. Reading dataset(s)                                                     |
> | 2. Data pre-processing                                                    |
> Traceback (most recent call last):
>   File "/home/s1469622/miniconda3/bin/clust", line 11, in <module>
>     load_entry_point('clust==1.8.9', 'console_scripts', 'clust')()
>   File "/home/s1469622/miniconda3/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/s1469622/miniconda3/lib/python2.7/site-packages/clust/clustpipeline.py", line 109, in clustpipeline
>     Xprocessed = op.processed_X(X_summarised_normalised, conditions, GDM, OGs, MapNew, MapSpecies)  # pandas DataFrames
>   File "/home/s1469622/miniconda3/lib/python2.7/site-packages/clust/scripts/output.py", line 380, in processed_X
>     resHeader[l] = np.array([['Genes'] + resHeader[l]])
> TypeError: can only concatenate list (not "NoneType") to list
MatusV8 commented 5 years ago

I found the fix. The problem was in the replicate file. All files needs to be listed in the replicate.txt even though they have only one replicate.

Thanks.

BaselAbujamous commented 5 years ago

Hi Matus

Thanks for asking the question and I am glad you have been able to fix it. Sorry for not having replied earlier.

I hope clust gives you the biologically meaningful results that you hope to have.

All the best Basel