kullrich/orthomap

question and issue regarding "structure"

Closed this issue ยท 6 comments

  1. One question that I have is that currently a user has to do
from orthomap import qlin

to use the function within qlin. It is not possible to do

import orthomap

orthomap.qlin

Is this a functionality we want to implement?

  1. One issue that I have is that there is a file called orthomap.py and the name of the package is also orthomap. This could become confusing. Should we rename the file?

Yes, but one can use e.g.:

from orthomap import qlin
qlin.get_qlin()

The qlin function is just to be able to use sub-commands and is defining the "sub-module", this is why orthomap.orthomap is fine for me, since this is what the sub-command is supposed to do.

Hi, regarding this:

    # lines 61 (onwards) and 66 (onwards) were the same, because if both arguments
    # are given we are still returning results based on the `taxid`.

That is true, anyhow for theuser it is better to provide the taxid since in the species name might be typo and this is why in that case the taxid will be used to re-create the species name and report it back.

Hi, regarding this:

    # lines 61 (onwards) and 66 (onwards) were the same, because if both arguments
    # are given we are still returning results based on the `taxid`.

That is true, anyhow for theuser it is better to provide the taxid since in the species name might be typo and this is why in that case the taxid will be used to re-create the species name and report it back.

I get that! But from the implementation one if statement is enough.

Yes, but one can use e.g.:

from orthomap import qlin
qlin.get_qlin()

The qlin function is just to be able to use sub-commands and is defining the "sub-module", this is why orthomap.orthomap is fine for me, since this is what the sub-command is supposed to do.

Perfect, then it's fine for me too!

Hi, regarding this:

    # lines 61 (onwards) and 66 (onwards) were the same, because if both arguments
    # are given we are still returning results based on the `taxid`.

That is true, anyhow for theuser it is better to provide the taxid since in the species name might be typo and this is why in that case the taxid will be used to re-create the species name and report it back.

Good point, I agree let's make sure that the result depends on the taxid. Re implementation, having one if statement instead of two is enough. Are you okay with this?

I will now start working on the orthomap2tei function to integrate linking the data with scanpy. I would just have one question, where we should put a example jupyter notebook file orthomap-example.ipynb? Into an example folder? All pre-calculated data like the OrthoFinder data for real usage is too big and the link to the zenodo data might be enough. Anyhow, I will extract a minimal example for orthomap so that this can be invoked directly.

Yeah let's create an example folder ๐Ÿ‘๐Ÿป I think we will need a very small subset of the OrthoFinder data to write some tests and for examples too ๐Ÿค” so we can include them in the example folder as well