GuyTeichman / RNAlysis

Analyze your RNA sequencing data without writing a single line of code
https://guyteichman.github.io/RNAlysis/
MIT License
129 stars 13 forks source link

Unable to open csv through RNAlysis GUI #4

Closed Mahajan30 closed 1 year ago

Mahajan30 commented 1 year ago

Describe the bug Unable to open a csv through the RNAlysis GUI on Mac (Apple silicon)

To Reproduce Steps to reproduce the behavior:

  1. Made now conda environment with Python 3.9
  2. Installed basic version of RNAlysis pip install RNAlysis
  3. Open GUI with rnalysis-gui
  4. Error: numba not installed; so pip install numba
  5. Clicked on 'Load' in GUI and selected table
  6. Following error comes on clicking on 'Start': Traceback (most recent call last): File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/rnalysis/gui/gui.py", line 1893, in start self.filter_obj = filter_obj_type(file_path, kwargs) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/rnalysis/filtering.py", line 2137, in init super().init(fname, drop_columns) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/rnalysis/filtering.py", line 97, in init self.df = io.load_csv(fname, 0, squeeze=True, drop_columns=drop_columns) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/rnalysis/utils/io.py", line 228, in load_csv df = pd.read_csv(filename, kwargs) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper return func(*args, *kwargs) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/util/_decorators.py", line 331, in wrapper return func(args, kwargs) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv return _read(filepath_or_buffer, kwds) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 605, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1442, in init self._engine = self._make_engine(f, self.engine) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1753, in _make_engine return mapping[engine](f, **self.options) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/python_parser.py", line 112, in init self._make_reader(f) File "/Users/vaibhavmahajan/opt/anaconda3/envs/RNAlysis/lib/python3.9/site-packages/pandas/io/parsers/python_parser.py", line 221, in _make_reader self.buf.extend(list(line_rdr)) _csv.Error: line contains NUL and the csv doesn't open.

Expected behavior The csv opens through GUI

Note I am a beginner and apologies if this was a simple issue and not meant to be raised here. But any solutions to this problem would be great. Thank you!

GuyTeichman commented 1 year ago

Hi, Thanks for the detailed report. I suspect that your csv file may have been encoded incorrectly. Would you be able to attach the file you are having trouble with?

Thanks, Guy

Mahajan30 commented 1 year ago

Hey Thanks for the quick reply! Here is the file I want to upload:

MyTable.xlsx

GuyTeichman commented 1 year ago

Hi, It looks like the file you're trying to open is a Microsoft Excel file (.xlsx), and not a csv file, and this is the source of the issue.

I would suggest that you open the file with a program like Excel, and then click on "File" - >"Save As", and change the format through the "Save As Type" drop-down menu to "CSV (Comma Delimited)".

See the link below for more details: https://www.google.com/url?sa=t&source=web&rct=j&url=https://support.microsoft.com/en-us/office/import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba%23:~:text%3DYou%2520can%2520convert%2520an%2520Excel,or%2520CSV%2520(Comma%2520delimited).&ved=2ahUKEwi6oq_3qNv7AhULi_0HHduqCr8QFnoECA0QBQ&usg=AOvVaw0eUOr90h9lvor4Q0b0nw0n

Feel free post another comment here if you're still having trouble loading the file. Good luck with your analysis!

Mahajan30 commented 1 year ago

I'm so sorry that was so stupid! Thanks for the help!