Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI implementation #35

Open
akikuno opened this issue May 21, 2024 · 3 comments
Open

GUI implementation #35

akikuno opened this issue May 21, 2024 · 3 comments
Assignees
Labels
request💡 New feature or request

Comments

@akikuno
Copy link
Owner

akikuno commented May 21, 2024

Describe the features you want.

GUI implementation of DAJIN2.

Describe the solution you'd like if you have any.

Create a GUI that runs on localhost using Flask or streamlit.
The GUI should automatically launch with the DAJIN2 gui command, allowing users to upload FASTQ files and perform other tasks through the GUI.

@akikuno akikuno added the request💡 New feature or request label May 21, 2024
@akikuno akikuno self-assigned this May 21, 2024
@akikuno
Copy link
Owner Author

akikuno commented May 29, 2024

Currently, Streamlit and Flask are difficult to obtain the directory path, which is the input for DAJIN2 (v0.4.6).

While it is possible to obtain the directory path using tkinter.filedialog.askdirectory, the appearance is so poor that it is not worth using.

In Dorado, the output is a BAM file, so it is possible to handle it with Flask as it involves obtaining a path rather than a directory.
Although Guppy's output is a directory, it would be better to align with Dorado's format for consistency. #37

@akikuno akikuno added the ongoing🔜 Currently in progress label Jun 7, 2024
@akikuno
Copy link
Owner Author

akikuno commented Jun 7, 2024

Flet looks good.

https://flet.dev/

It can select a directry.

import flet as ft
import os


def main(page: ft.Page):
    page.title = "Folder Picker Example"

    def pick_folder(e):
        file_picker.get_directory_path()

    def folder_picked(e: ft.FilePickerResultEvent):
        if e.path:
            selected_folder.value = os.path.abspath(e.path)
            page.update()

    file_picker = ft.FilePicker(on_result=folder_picked)
    page.overlay.append(file_picker)

    pick_folder_button = ft.ElevatedButton("Pick a Folder", on_click=pick_folder)
    selected_folder = ft.Text("No folder selected")

    page.add(pick_folder_button, selected_folder)


ft.app(target=main)

@akikuno
Copy link
Owner Author

akikuno commented Jun 15, 2024

In the case of Dorado, it is simpler to specify the file directly, and it is easier to create a GUI.

Given that the default basecaller in MinKNOW has become Dorado, it might be more convenient for DAJIN2 to adopt a format where the path to BAM or FASTA files output by Dorado is specified directly as default.

Additionally, by including the -d/--directory option, users could select the directory path, which could enhance usability.

@akikuno akikuno removed the ongoing🔜 Currently in progress label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request💡 New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant