CompEpigen / figeno

Tool for plotting sequencing data along genomic coordinates.
GNU General Public License v3.0
254 stars 8 forks source link

Save config in figeno gui not working #23

Open jazsakr opened 3 weeks ago

jazsakr commented 3 weeks ago

Hello! Thank you for the fantastic tool. I downloaded it on my Mac and launched the gui. When I click the "Save config" button, nothing happens. I relaunched it again in debugging mode and when I tried again, in the terminal it says:

127.0.0.1 - - [02/Nov/2024 22:18:47] "POST /browse HTTP/1.1" 200 -
127.0.0.1 - - [02/Nov/2024 22:18:47] "POST /save_config HTTP/1.1" 200 -

If I may also add a feature suggestion. It would be really awesome if the bed track can accept BED9 files that store color information. This would be really useful for visualization of the cis-regulatory elements which are color coded.

e-sollier commented 3 weeks ago

Hi,

Thanks for your interest in figeno!

In order to pinpoint what might be going wrong with the "Save config" button, could you please tell me whether the other file dialogs work? E.g., if you click on the button to select an output file, or to select the path to an input bed file for a bed track, does it also not work? Could you also check whether a file dialog appears, but below your browser? As an alternative until I figure out what is wrong with this file dialog, you can try to start the gui with figeno gui -w (with the -w option). This will start the figeno gui in a separate window, as opposed to a web browser tab, and it will use a completely different system for the file dialogs, so hopefully this might work better.

Thanks for suggesting to read colors from BED9 files; I will try to add this feature in the coming week.

jazsakr commented 3 weeks ago

Thank you for such a quick response!

Here are some buttons that work: Load config Open template Tracks open files general open files (for custom references) bed, alignments, genes,basemod_freq open files

These do not work: Save config Output file button

It seems to work with the -w flag!

Thank you for the alternative solution and for considering my suggestion!

e-sollier commented 3 weeks ago

I've added the option to read colors from bed files in the new version of figeno (v1.6.2: pip install figeno==1.6.2). If you tick "use file colors", this should do what you want. Let me know if it does not work as intended.

Thanks for providing more information about which buttons work. I still don't know why the save file dialogs do not work on your machine, but at least it's good if it works with the -woption. Could you tell me which version of macos you are using, and could you try opening a python terminal (in the environment where figeno is installed) and running:

import filedialpy
print(filedialpy.saveFile())

Does this open a file dialog and print in the terminal the path that you selected? If yes, can you try the following command and also tell me if it works?

import os
import filedialpy
print(filedialpy.saveFile(initial_dir=os.getcwd(),initial_file="config.json",title="Select path to save the config file",filter="*.json"))
jazsakr commented 2 weeks ago

Hello! I apologize for the delayed response! I updated it and the colors in the bed track turned out great! Thank you so much for adding that feature!

The operating system is macOS Sonoma. The first code block worked! A dialog box popped up. But the other code block did not work, nothing happened. Let me know what else I can try.

e-sollier commented 2 weeks ago

Thanks for trying these two code blocks! I think I understand what was causing the problem. Can you try updating filedialpy (this is a package used by figeno) with pip install filedialpy==1.2.1 and trying if the save config button now works in the figeno gui (without using the -w option)?

jazsakr commented 1 week ago

Unfortunately installing that version of filedialpy did not fix the problem. The save config is still not working without using -w.