GithubHelp home page GithubHelp logo

Comments (9)

timflutre avatar timflutre commented on August 10, 2024

+1 that would be great! maybe the first step to do is to refactor the core of the code into a stand-alone library, which would then be easy to call from R via Rcpp

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

I don't think GEMMA should be tied to R. We are using it from Python. You can still create an R wrapper that passes data in memory, but don't do away with the standard CLI. I would create a separate R package for this that may share the source code.

from gemma.

timflutre avatar timflutre commented on August 10, 2024

Yes, I agree with @pjotrp, that's why I advocated for a library. In this way, the same library can be called by a simple .cpp file with a main function to be used from the CLI, but it can also be easily used by an R package via Rcpp, or from Python, or Julia, etc.

from gemma.

pcarbo avatar pcarbo commented on August 10, 2024

I agree @timflutre & @pjotrp.

from gemma.

fboehm avatar fboehm commented on August 10, 2024

@timflutre From what I understand about libraries, I like the idea of creating a library, but I am new to C++. Can you say more about what we would need to do to create a library? How would we begin to refactor the core of the GEMMA code? Thanks!

from gemma.

pcarbo avatar pcarbo commented on August 10, 2024

@fboehm @timflutre It would involve replacing GEMMA's command-line interface, in which the data is read from files, with a single function that takes as input (1) the options, and (2) the data in the form of matrices (or perhaps data frames). The input could be passed from R to C++ via the .Call interface in R. However, I should warn you that designing this single function for interfacing the C++ code to R will be a substantial amount of work.

from gemma.

timflutre avatar timflutre commented on August 10, 2024

@fboehm before refactoring anything, the first step is to automatize tests, as suggested in issue #38

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

We have tests. Closing this issue for now due to inactivity. Reopen if anyone wants to work on it.

from gemma.

pjotrp avatar pjotrp commented on August 10, 2024

Gemma2/lib is providing Python abstractions. An R wrapper may be part of that project.

from gemma.

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.