IrinaVKuznetsova / CirGO

GNU General Public License v3.0
21 stars 18 forks source link

REVIGO.csv file could not be converted by CirGO #3

Open Sashkow opened 4 years ago

Sashkow commented 4 years ago

Apparently REVIGO has changed format of the file that is obtained by pressing Export results to text table (CSV) in the web interface. Colum representative in revigo.csv file now lists GO ids instead of of textual descriptions of the ontology categories.

CirGO Gui returns error "File could not be converted. Please check if the file exists and if the file format is correct!" when fed with a revigo.csv file. Here is the file REVIGO file example

Sashkow commented 4 years ago

I've modified csv file conversion code for compatibility with REVIGO but I do not know whether it broke compatibility with other platforms. Fork

IrinaVKuznetsova commented 3 years ago

Dear CirGO users,

Just to let you now, that the CSV file should be downloaded from the "TreeMap" tab, REVIGO hasn't changed the file format. image

Hope this helps

nathanerank commented 3 years ago

I installed CirGO on a Mac running Catalina, and I got the GUI to run but I cannot get it to convert the CSV file. I tried to use your sample file Example_REVIGO_Input_BP and that won't work either. I am attaching the version that I am trying to convert. Cluster 0 revigo biological process pvalue cirgo.pdf

nathanerank commented 3 years ago

We also tried the same thing on a different Mac with a different OS, and had exactly the same problems Cirgo won't run and the error message states that the file can't be converted.

Sashkow commented 3 years ago

@nathanerank Your file appears to be pdf, not csv. If you are working from Excel, you can save your .xlsx spreadsheet file as a comma separated file.

nathanerank commented 3 years ago

I was unable to load the csv onto this page. My files are csv files, not PDF. In fact, I just checked again and GitHub won't allow me to include the csv. But I can try pasting it.

cell surface receptor signaling pathway,5.344, null regulation of circadian sleep/wake cycle,4.662, cell surface receptor signaling pathway regulation of synapse structure or activity,3.934, cell surface receptor signaling pathway negative regulation of inflammatory response,4.662, cell surface receptor signaling pathway positive regulation of cell motility,3.772, cell surface receptor signaling pathway response to salt,3.772, cell surface receptor signaling pathway response to ischemia,3.772, cell surface receptor signaling pathway regulation of catalytic activity,3.747, cell surface receptor signaling pathway response to potassium ion,3.772, cell surface receptor signaling pathway immune response,4.662, cell surface receptor signaling pathway thrombin-activated receptor signaling pathway,4.536, cell surface receptor signaling pathway acetylcholine catabolic process,3.934, cell surface receptor signaling pathway positive regulation of cell size,3.772, cell surface receptor signaling pathway thyroid hormone generation,3.747, cell surface receptor signaling pathway transforming growth factor beta receptor signaling pathway,4.536, cell surface receptor signaling pathway positive regulation of adenosine receptor signaling pathway,3.401, cell surface receptor signaling pathway regulation of membrane potential,3.772, cell surface receptor signaling pathway cellular response to methanol,3.934, cell surface receptor signaling pathway negative regulation of cell cycle,4.536, cell surface receptor signaling pathway response to amphetamine,3.934, cell surface receptor signaling pathway regulation of sensory perception of pain,3.401, cell surface receptor signaling pathway negative regulation of natural killer cell differentiation involved in immune response,4.662, cell surface receptor signaling pathway response to glucose,3.934, cell surface receptor signaling pathway response to thyroid hormone,3.772, cell surface receptor signaling pathway negative regulation of interferon-gamma production,4.662, cell surface receptor signaling pathway response to salicylic acid,3.772, cell surface receptor signaling pathway cellular response to thyroid hormone stimulus,3.747, cell surface receptor signaling pathway regulation of cell shape,3.772, cell surface receptor signaling pathway negative regulation of ion transmembrane transport,3.772, cell surface receptor signaling pathway antimicrobial humoral immune response mediated by antimicrobial peptide,4.662, cell surface receptor signaling pathway response to ethanol,3.934, cell surface receptor signaling pathway peptidoglycan catabolic process,4.662, null protein autoprocessing,4.578, peptidoglycan catabolic process lipoprotein metabolic process,2.918, peptidoglycan catabolic process proteolysis,4.578, peptidoglycan catabolic process adenosine metabolic process,3.401, peptidoglycan catabolic process collagen catabolic process,2.697, peptidoglycan catabolic process lipid catabolic process,4.535, peptidoglycan catabolic process beta-glucoside catabolic process,4.062, peptidoglycan catabolic process cellulose catabolic process,3.752, peptidoglycan catabolic process galactosylceramide catabolic process,4.062, peptidoglycan catabolic process proteolysis involved in cellular protein catabolic process,3.747, peptidoglycan catabolic process aromatic compound catabolic process,3.216, peptidoglycan catabolic process locomotion,3.145, null response to stimulus,3.145, null biological process involved in interaction with host,4.662, null defense response to Gram-positive bacterium,4.662, biological process involved in interaction with host killing of cells of other organism,4.662, biological process involved in interaction with host detection of bacterium,4.662, biological process involved in interaction with host response to bacterium,4.662, biological process involved in interaction with host neuron remodeling,4.578, null detection of light stimulus involved in visual perception,4.34, neuron remodeling digestion,3.787, neuron remodeling ductus arteriosus closure,4.536, neuron remodeling cochlea development,3.772, neuron remodeling response to auditory stimulus,3.772, neuron remodeling border follicle cell migration,4.578, neuron remodeling parturition,4.536, neuron remodeling sensory perception of sound,3.772, neuron remodeling sensory organ development,3.145, neuron remodeling epithelial cell differentiation,3.747, neuron remodeling neuromuscular junction development,3.934, null cell wall organization,3.787, neuromuscular junction development cilium assembly,3.145, neuromuscular junction development fructose transmembrane transport,3.772, null siderophore transmembrane transport,3.669, fructose transmembrane transport lipid transport,2.918, fructose transmembrane transport trehalose transport,3.444, fructose transmembrane transport prostaglandin metabolic process,4.536, null thiamine metabolic process,3.401, prostaglandin metabolic process dephosphorylation,3.401, null carbohydrate metabolic process,5.252, null

Sashkow commented 3 years ago

Rownames are missing in your csv. Rownames should match the example.

Gurlaz commented 2 years ago

Hello,

I am having the same issue. I am running CirGO on MacOS High Sierra. GUI version loads successfully. A .csv file was obtained from Revigo tree map tab and an automatically generated file name confirms that too. When I click on visualize I get an error "File could not be converted. Please check the file format and it's content!"

My input file have 146 rows and 7 columns named : "TermID | Name | Frequency | Value | Uniqueness | Dispensability | Representative".

I even used example file "Example_REVIGO_Input_BP.csv" and it gave me the same error.

Was anyone above able to solve this issue?

Thank you!

Gurlaz commented 2 years ago

Hello,

I am having the same issue. I am running CirGO on MacOS High Sierra. GUI version loads successfully. A .csv file was obtained from Revigo tree map tab and an automatically generated file name confirms that too. When I click on visualize I get an error "File could not be converted. Please check the file format and it's content!"

My input file have 146 rows and 7 columns named : "TermID | Name | Frequency | Value | Uniqueness | Dispensability | Representative".

I even used example file "Example_REVIGO_Input_BP.csv" and it gave me the same error.

Was anyone above able to solve this issue?

Thank you!

Command Line option is also giving a similar error:

Opening input file: Example_REVIGO_Input_BP.csv
File could not be converted. Please check if the file exists and if the file format is correct!
Traceback (most recent call last):
  File "/Users/CirGO/Py3+/CirGO_Wind_Unix/CirGO.py", line 360, in main
    CirGoFileConversion.ConvertToThreeCoulmnsInput(args.inputFile, fn+ "_converted.csv")
  File "/Users/CirGO/Py3+/CirGO_Wind_Unix/CirGoFileConversion.py", line 60, in ConvertToThreeCoulmnsInput
    while (x[0].startswith("%")):
IndexError: list index out of range
IrinaVKuznetsova commented 2 years ago

Hi Gurlaz,

Can you please check that your Python version is 3.7+ in your environment. Below is the command to check: conda list

Also, please check input file format. If you open your input file with Notepad, does it look similar to this?

% WARNING - This is exported REVIGO data useful only for the specific purpose of constructing a TreeMap visualization.,,,,,,
% Do not use this table as a general list of non-redundant GO categories, as it sets an extremely permissive ,,,,,
% threshold to detect redundancies (c=0.10) and fill the 'representative' column, while normally c>=0.4 is recommended.,,,,,
% To export a reduced-redundancy set of GO terms, go to the Scatterplot & Table tab, and export to CSV from there.,,,,
term_ID,description,frequencyInDb,log10pvalue,uniqueness,dispensability,representative
GO:0002376,immune system process,0.60%,-7.6615,0.994,0,immune system process
GO:0006950,response to stress,4.58%,-24.6003,0.937,0,response to stress
GO:1901700,response to oxygen-containing compound,0.50%,-9.8297,0.943,0.683,response to stress
konetom commented 1 year ago

Dear @IrinaVKuznetsova, please refresh your CirGoFileConversion.py according to the current format of comment lines in the Revigo csv file, the comment lines start with # sign, not with %.

line 68:    # skip eventual comment lines that are contained inside the csv file
line 69:    if not row[0].startswith("%"):

Best regards

Ruiqi-CUB commented 1 year ago

How did everyone get the Revigo csv? I can only see the download tsv under the Tree Map tab. image

konetom commented 1 year ago

@Ruiqi-CUB, just download the TSV and use it as the input.

zhangwenda0518 commented 12 months ago

The latest revigo uses tab splitting, so the converted script CirGoFileConversion.py, line 56, InputFileReader = CSV. Reader (InputFile, Delimiter =',') should be modified to InputFileReader = CSV. Reader (InputFile, Delimiter =' \ t').

zhangwenda0518 commented 12 months ago

At the same time, the 60th line while (x[0].startswith("% ")): It should be changed to 60 while (x[0].startswith("# ")):