Giter VIP home page Giter VIP logo

bioinfo-genome's Introduction

icon BioInfo - Genome

Python Package GitHub license GitHub commits GitHub latest commit Maintenance

GitHub version Author Author Author Author

  1. โœ๏ธ Setup
  2. ๐Ÿ‘ฉโ€๐Ÿซ Usage
  3. ๐Ÿง‘โ€๐Ÿซ Contributing
  4. โš–๏ธ License
  5. ๐Ÿ› Bugs and TODO
  6. ๐ŸŽจ Logo and Icons

โœ๏ธ Setup

Note

This project is part of a M1/M2 project at the University of Strasbourg, France.

First, make sure you have python >= 3.10.6 installed with the required dependencies:

# conda create -n <name> python=3.11 pip -y && conda activate <name>
pip install --upgrade -r requirements.txt

Then, you can run the program with :

python genome.py

On a side note, we use CustomTkinter to build the GUI, so you might want to check out their documentation if you want to contribute to the project ! ๐Ÿ™‚ We also use BioPython to parse the genome files with ease. We strongly advise to check for solid internet connection when running the program for the first time, as it will download the genome files from NCBI and build the system tree from scratch.

๐Ÿ‘ฉโ€๐Ÿซ Usage

The program is pretty simple to use, just follow the instructions and you'll be fine ! ๐Ÿ™‚

A window should pop up, and the first run might take a while, but after that, it should be pretty fast !

Anyways, here's a screenshot of the GUI :

GUI

๐Ÿง‘โ€๐Ÿซ Contributing

If you ever want to contribute, either request the contributor status, or, more manually, fork the repo and make a pull request !

We are using black to format the code, so make sure you have it installed and run :

black src

The standard procedure is :

fork -> git branch -> push -> pull request

Note that we won't accept any PR :

  • that does not follow our Contributing Guidelines
  • that is not sufficiently commented or isn't well formated
  • without any proper test suite
  • with a failing or incomplete test suite

Happy coding ! ๐Ÿ™‚

โš–๏ธ License

Warning

This repository is an app and might be exported as a standalone binary. Working source code is licensed under AGPL, the text assets are unlicensed, images and logos have their own section. The following license only applies to the template itself and is not legal advice. The license of this repo does not apply to the resources used in it. Please check the license of each resource before using them.

This project is licensed under the AGPL-3.0 new or revised license. Please read the LICENSE file. Additionally :

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the BioInfo-genome authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

BioInfo-genome - large-scale genome analysis tool
Copyright (C) 2023 ThomasByr & contributors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

๐Ÿ› Bugs and TODO

TODO (first implementation version)

  • add region selection feature
  • add multi organisms selection feature and thread it
  • open txt file on double click
  • add checkboxes to select organisms
  • separate reload and update (for ids) (are no longer saved)
  • maybe save overview.txt ? (no longer needed)
  • take into account all .txt files when building the tree

Known Bugs (latest fix)

  • selection can be made with anything in the tree (including not leafs folders and even files)
  • dynamic selection does not display newly created files
  • double click not working (removed if __name__ == "__main__": from genome.py)
  • bad paths (hopefully fixed by removing .pkl files from sync to force rebuild on unknown OS)
  • folder expansion resets all checked icons to unchecked (fixed by re-changing all selected items icons to checked)
  • manually inserting files in "Results" may cause errors (especially if the file is not a .txt file)

๐ŸŽจ Logo and Icons

Unless otherwise stated, all icons and logos are made by the author. Copyright (C) 2023 Thomas BOUYER, all rights reserved.

Tools used :

bioinfo-genome's People

Contributors

thomasbyr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

bas6700

bioinfo-genome's Issues

proper logging

I may (or may not) change the way we log shit to stdout/stderr
Hopefully this wont break the proxied threads ๐Ÿ˜‡

import os

from dotenv import load_dotenv

import logging
from typing_extensions import override
from termcolor import colored

__all__ = ['logger', 'log_lvl', 'console_handler', 'default_formatter']


def formatter(c: str, attrs: list[str] = []) -> str:
  return f"{colored('%(asctime)s', 'grey', attrs=['bold'])} {colored('%(levelname)8s', c, attrs=attrs)} {colored('%(name)s', 'magenta')} (%(filename)s:%(lineno)d) %(message)s"


class UsefulFormatter(logging.Formatter):

  dt_fmt = '%Y-%m-%d %H:%M:%S'
  FORMATS = {
    logging.DEBUG: formatter('green'),
    logging.INFO: formatter('blue'),
    logging.WARNING: formatter('yellow'),
    logging.ERROR: formatter('red'),
    logging.CRITICAL: formatter('red', ['bold']),
  }

  @override
  def format(self, record: logging.LogRecord) -> str:
    log_fmt = self.FORMATS.get(record.levelno)
    formatter = logging.Formatter(log_fmt, self.dt_fmt, style='%')
    return formatter.format(record)


load_dotenv()
DEBUG = os.getenv('DEBUG', 'False').lower() in {'true', '1', 'yes'}

logger = logging.getLogger('me ๐Ÿ™‚')
logger.setLevel(log_lvl := logging.DEBUG if DEBUG else logging.INFO)

# create console handler with a higher log level
console_handler = logging.StreamHandler()
console_handler.setLevel(log_lvl)
console_handler.setFormatter(default_formatter := UsefulFormatter())

logger.addHandler(console_handler)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.