tidyms icon indicating copy to clipboard operation
tidyms copied to clipboard

XCMS files import

Open thcontini1 opened this issue 1 year ago • 1 comments

Hi @griquelme and thanks for this nice and intuitive package.

I have some trouble to import and read processed data from XCMS, using the

fileio.read_xcms

I try to import the 3 .csv files (datamatrix, variable and metadata) ans I obtain this error :

data1 = ms.fileio.read_xcms("dataset_450samples_essai1_dataMatrix.csv","dataset_450samples_essai1_variableMetadata.csv","metadata-450samples_essai1_TidyMS.csv", sep=",")
Traceback (most recent call last):

  Cell In[39], line 1
    data1 = ms.fileio.read_xcms("dataset_450samples_essai1_dataMatrix.csv","dataset_450samples_essai1_variableMetadata.csv","metadata-450samples_essai1_TidyMS.csv", sep=",")

  File ~\AppData\Local\anaconda3\Lib\site-packages\tidyms\fileio.py:222 in read_xcms
    dc = DataContainer(dm, fm, sm)

  File ~\AppData\Local\anaconda3\Lib\site-packages\tidyms\container.py:144 in __init__
    validation.validate_data_container(data_matrix, feature_metadata, sample_metadata)

  File ~\AppData\Local\anaconda3\Lib\site-packages\tidyms\validation.py:162 in validate_data_container
    validate_data_matrix(data_matrix)

  File ~\AppData\Local\anaconda3\Lib\site-packages\tidyms\validation.py:113 in validate_data_matrix
    msg = msg.format(", ".join(no_float_columns))

TypeError: sequence item 0: expected str instance, int found

Then, I searched for some "integers" in my dataframe but didn't find any :

datamatrix_csv.select_dtypes(include = 'int')
Out[40]: 
Empty DataFrame
Columns: []
Index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, ...]

[21483 rows x 0 columns]

Do you have some ideas how to fix this issue? Best regards,

Thomas

thcontini1 avatar Feb 09 '24 14:02 thcontini1