clust icon indicating copy to clipboard operation
clust copied to clipboard

ValueError during concatenation in output.py script

Open SuvratK opened this issue 1 year ago • 0 comments

Hello, I tried to run clust as follows clust unnorm_TPM_abundance.txt -r replicates_file_for_clust.txt -o clust_output But it throws an error in the output.py script "ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 9 and the array at index 1 has size 8".
I could not figure out if the problem was with the input files or something else. Any help is much appreciated. This is the format of my input files Data file:

IDs	ACO27	ACI27	ACO24	ACI24	ACO25	ACI25	ACO28	ACI28	ACO23	ACI23	ACO26	ACI26	ACO15	ACI15	ACO17	ACI17	ACO21	ACI21	ACO13	ACI13	ACO14	ACI14	ACO16	ACI16
TRINITY_DN12488_c0_g1_i1	20.410835	15.087338	12.180356	20.689961	25.098941	18.310295	22.990991	24.790974	28.37162	18.938075	31.466777	39.643565	4.427401	1.182069	1.059718	0.567836	1.378234	3.061071	0	1.864431	0	1.192739	0	2.198282
TRINITY_DN12477_c0_g1_i5	23.736233	26.439388	37.23598	25.095917	34.369804	31.741829	26.106344	25.112859	23.613285	24.386021	25.799767	25.014237	22.453038	30.314432	21.906057	25.520188	38.26372	24.539333	31.125408	23.001255	26.52094	19.962209	20.944755	16.358531
...

Replicates file:

unnorm_TPM_abundance.txt	I3	ACI27	ACI24	ACI25
unnorm_TPM_abundance.txt	O3	ACO27	ACO24	ACO25
unnorm_TPM_abundance.txt	I5	ACI28	ACI23	ACI26
unnorm_TPM_abundance.txt	O5	ACI28	ACI23	ACI26
unnorm_TPM_abundance.txt	I12	ACI15	ACI17	ACI21
unnorm_TPM_abundance.txt	O12	ACO15	ACO17	ACO21
unnorm_TPM_abundance.txt	I18	ACI13	ACI14	ACI16
unnorm_TPM_abundance.txt	O18	ACO13	ACO14	ACO16

This is the entire console output:

/===========================================================================\
|                                   Clust                                   |
|    (Optimised consensus clustering of multiple heterogenous datasets)     |
|           Python package version 1.18.0 (2022) Basel Abu-Jamous           |
+---------------------------------------------------------------------------+
| Analysis started at: Monday 08 January 2024 (11:00:49)                    |
| 1. Reading dataset(s)                                                     |
| 2. Data pre-processing                                                    |
|  - Automatic normalisation mode (default in v1.7.0+).                     |
|    Clust automatically normalises your dataset(s).                        |
|    To switch it off, use the `-n 0` option (not recommended).             |
|    Check https://github.com/BaselAbujamous/clust for details.             |
|  - Flat expression profiles filtered out (default in v1.7.0+).            |
|    To switch it off, use the --no-fil-flat option (not recommended).      |
|    Check https://github.com/BaselAbujamous/clust for details.             |
Traceback (most recent call last):
  File "/home/kotagal/miniforge3/envs/clust/bin/clust", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/kotagal/miniforge3/envs/clust/lib/python3.12/site-packages/clust/__main__.py", line 102, in main
    clustpipeline.clustpipeline(args.datapath, args.m, args.r, args.n, args.o, args.K, args.t,
  File "/home/kotagal/miniforge3/envs/clust/lib/python3.12/site-packages/clust/clustpipeline.py", line 112, in clustpipeline
    Xprocessed = op.processed_X(X_summarised_normalised, conditions, GDM, OGs, MapNew, MapSpecies)  # pandas DataFrames
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kotagal/miniforge3/envs/clust/lib/python3.12/site-packages/clust/scripts/output.py", line 434, in processed_X
    res[l] = np.concatenate((resHeader[l], res[l]), axis=0)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 9 and the array at index 1 has size 8

Thanks,

Suvrat

SuvratK avatar Jan 08 '24 10:01 SuvratK