Closed apetkau closed 2 years ago
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.
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 CodonMutationPosition.py
to be more flexible ?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).
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:
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.
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:
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).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.
Currently, running with
--pointfinder-organism ORGANISM
with anything other thansalmonella
orcampylobacter
will result in an error due to a check I perform against a list of acceptable organisms here:https://github.com/phac-nml/staramr/blob/107e2cd8a60cc9a3acce35ff6ede9ff4e75659c2/staramr/blast/pointfinder/PointfinderBlastDatabase.py#L78-L83
This was done to ensure that I only allow results to be generated from PointFinder databases/organisms that I have validated work with staramr. But, there are additional mutations from the PointFinder databases belonging to other organisms that could still be useful to run with staramar, even if not every mutation (or indel) will work properly.
Instead of restricting which organisms can be used by staramr for PointFinder I wish to switch this to a warning. That is, if
--pointfinder-organism ORGANISM
is set to anything outside of the list of validated organisms, results will still be generated by staramr, but a warning message will be printed.