shuzhao-li-lab / asari

asari, metabolomics data preprocessing
Other
38 stars 9 forks source link

Need to modify 'number_of_samples' in project.json if enable --drop_unaligned_samples #76

Closed YuanyeChi closed 11 months ago

YuanyeChi commented 11 months ago

Need to modify 'number_of_samples' in project.json if enable --drop_unaligned_samples, otherwise will face problem when running viz:

➜  asari_pd asari viz --input=/Users/chiy/Projects/asari_pd/ST002735_Waters_Xevo_G2_S_RPneg_asari_project_919124710                                                       

~~~~~~~ Hello from Asari (1.12.4) ~~~~~~~~~

Traceback (most recent call last):
  File "/opt/homebrew/bin/asari", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/asari/main.py", line 200, in main
    viz(parameters, args)
  File "/opt/homebrew/lib/python3.11/site-packages/asari/main.py", line 71, in viz
    project_desc, cmap, epd, Ftable = read_project(datadir)
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/asari/dashboard.py", line 53, in read_project
    Ftable = pd.read_csv( os.path.join(datadir, 'export', 'full_Feature_table.tsv'), 
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 611, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1448, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1723, in _make_engine
    return mapping[engine](f, **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 155, in __init__
    self._validate_usecols_names(
  File "/opt/homebrew/lib/python3.11/site-packages/pandas/io/parsers/base_parser.py", line 969, in _validate_usecols_names
    raise ValueError(
ValueError: Usecols do not match columns, columns expected but not found: [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]
YuanyeChi commented 11 months ago

Add a new field "number_of_good_samples" or modify "number_of_samples" directly left for decision.

shuzhao-li commented 11 months ago

Fixed by updating number_of_samples.