Git Product home page Git Product logo

Comments (5)

dcarbajo avatar dcarbajo commented on September 24, 2024 1

I managed to make it work! It was a bit convoluted since I wanted to install stitchr in a conda environment inside a Docker image.

I'm not very proficient with Docker, but since I had all the commands already in R, I decided to not reinvent the wheel and call them pretty much as is inside the Dockerfile. These are the relevant lines:

RUN Rscript -e "reticulate::install_miniconda()"
RUN Rscript -e "reticulate::conda_create(envname = 'my_environment', packages = 'python=3.10')"

RUN Rscript -e "reticulate::py_install('stitchr', method = 'conda', envname = 'my_environment', pip = TRUE)"

RUN /root/.local/share/my_environment/bin/conda run -n my_environment stitchrdl -s human

from stitchr.

JamieHeather avatar JamieHeather commented on September 24, 2024 1

Thanks for sharing it!

from stitchr.

JamieHeather avatar JamieHeather commented on September 24, 2024

Hello hello,

As it currently stands Stitchr expects the input reference sequences to be in the expected directory produced during its installation via pip, as that was the most straightforward way I could think to ensure cross-platform support. Also this design intentionally requires the downloading of reference sequences from primary sources, to both ensure use of current versions and to abide by different database licenses. I hadn't anticipated your use case, which I appreciate is not well catered to under the current design.

However it should be fairly simple to achieve what you want with the package as it stands without maintaining your own custom fork of Stitchr. You would just need to move whatever reference data you're including with your package to the Stitchr directory (which you can find by running stitchr -dd) when you initialise your package. Also remember that it doesn't have to be in Data/HUMAN directory, you could call it whatever you like (e.g. Data/myreferencedata), you would just need to tell Stitchr which directory to use at runtime via the --species flag (stitchr -s myreferencedata ...). Alternatively, while I haven't tried it, you might also be able to use some symlink trickery or similar to locate the data where you want it while maintaining Stitchr's required paths.

Failing that you could always dispense with the pip installable version and instead use the v.1.0.0 release, in which the reference directories are located relative to the scripts directory. The differences between the current v1.1.2 and v.1.1.0 are mostly those made to make it installable - so while you'd have to change how you pass data to/from stitchr it should produce the same results (although you would miss out potential future updates and bug fixes etc).

Hope that helps,
Jamie

from stitchr.

dcarbajo avatar dcarbajo commented on September 24, 2024

Thanks for the prompt response! I think after all it should not be a problem... what I am trying to do now is include the installation of stitchr and the databases in a Dockerfile to run it as a container. That way I can have everything in place, so the above should not be a problem...

If you happen to have an example at hand on how I can install stitchr via a Dockerfile, I would also appreciate (I'm just starting with Docker); I think something along the lines of RUN pip install stitchr should do (though I need to install it in a specific conda environment, so I will have to figure out.

Thanks!

from stitchr.

JamieHeather avatar JamieHeather commented on September 24, 2024

I am afraid I have essentially no expertise in creating dockerfiles, so I can't help with examples.

However I think you would need to also run pip install IMGTgeneDL in whatever environment you use, and then (assuming you just want a vanilla germline reference) the appropriate stitchrdl command to grab the data for whatever species you're interested in (e.g. stitchrdl -s human). That should then deposit the necessary data in the appropriate directory.

Do please share your dockerfile example if you get it working in case others have a similar use case!
Cheers

from stitchr.

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.