Giter Club home page Giter Club logo

Comments (2)

pimarin avatar pimarin commented on September 15, 2024

Hi @apetkau,
Thanks to yours comments, I take time to answer to learn python and oriented object programming to understand your work !
My first conclusion was the same as you.

  • Instead of using the get_available_organisms(cls) method maybe the get_organisms(cls, database_dir) already existing do the job ! It use the information from the config file into pointfinder directory and you already created a test to check diff between organism
    I'm just trying to understand how to refer to the new method
  • Then for pointfinder nucleotide analysis, I will try to translate all nucleotide position into positive value (as you mentioned for promoter region with negative position) to be use in your code. I think some changes in the CodonMutationPosition.py to be more flexible ?

from staramr.

apetkau avatar apetkau commented on September 15, 2024

Hello @pimarin,

That's awesome you've taken the time to learn Python and Object Oriented programming 😄. I hope it is going well for you. I can be a very useful language to learn. Another important library I use throughout staramr is pandas for manipulation of data in Python (in particular, loading and working with CSV files or other tabular data structures). And then, while I don't use these in staramr, this could lead into learning about matplotlib or seaborn for creating visual plots of data. But this is all quite a bit to learn (and is a bit outside of what staramr handles).

  1. Yes, the get_organisms() method is used to load up all the PointFinder organism name available in the currently-installed version of the PointFinder database:

    def get_organisms(cls, database_dir):
    """
    A Class Method to get the list of organisms from the PointFinder database root directory.
    :param database_dir: The PointFinder database root directory.
    :return: A list of organisms.
    """
    config = pd.read_csv(path.join(database_dir, 'config'), sep='\t', comment='#', header=None,
    names=['db_prefix', 'name', 'description'])
    return config['db_prefix'].tolist()

    Just to clarify, the reason I use get_available_organisms() instead of get_organisms() to return a list of organisms to use for PointFinder is because anything not returned by get_available_organisms() is not guaranteed to work in staramr. That is it was a decision I made to prevent staramr from returning potentially invalid results. This particular issue would be a compromise where instead of disallowing people from running staramr with organisms not returned by get_available_organisms(), I would simply print a warning.

  2. Thanks so much for offering to help out with looking into supporting those other coordinates for PointFinder databases (negative coordinates or insertions/deletions). I really do appreciate it. I would welcome any contributions you can make.

    However, note that I have someone in my group who will be looking into this issue too. I want to be a bit more open about my plans for staramr, so I have started to write up my plans in the Projects section of GitHub. There are two projects you can see here:

    1. Release 0.8.0: This will update the default databases for staramr and I will try to include fixing this issue (where you can run staramr with other PointFinder organisms, but you will get a warning printed).
    2. Release 1.0.0: This will include full support for other PointFinder organisms by supporting insertions/deletions/promotor regions leading to AMR.

    I hope this all makes sense? Again, I would welcome any suggestions or contributions you may have. But we do plan to work on fixing up some of these issues and packaging them up into new staramr releases.

from staramr.

Related Issues (20)

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.