Genentech / FacileDataSet

A fluent API for accessing multi-assay high-throughput genomics data.
MIT License
4 stars 0 forks source link

create_FDS_pkg should return a subclass of a FacileDataSet #25

Open lianos opened 5 years ago

lianos commented 5 years ago

Firstly: nice job in trying to automate a FacileDataSet data-package creation via the create_FDS_pkg function.

While you have gone through the trouble of implementing this, you might want to go the last mile and have the dataset object that is created from the constructor function you are glue-ing together be a subclass of the FacileDataSet.

Minimally, this will allow the user to then create a dataset-specific facet_frame so it can more easily/transparently be used in TFE's faceted-analyses functionalities.

You might change the end of the function from something like this:

"  FacileDataSet(path, cache_size = cache_size, db.loc = db.loc)",
"}}", .sep = "\n")

To this (untested: I don't really use glue, so might be totally wrong :-)

"out <-  FacileDataSet(path, cache_size = cache_size, db.loc = db.loc)",
"class(out) <- c({FDS_name}, class(out))",
"out"
"}}", .sep = "\n")
lianos commented 5 years ago

Also, is this function supposed to be a Genentech-only function? I ask because:

  1. The @examples code is quite GNE-specific w/ the ep.* stuff (I understand the convenience of putting that there for now); and
  2. This code block:

    mcols(x)$source = "IGIS"
    mcols(x)$feature_type = "entrez"

    it might make sense to make these source and feature_type values you are setting here to be parameters of this function, as I'd imagine most people these days will probably be using "ensembl" feature types.

phaverty commented 5 years ago

Good catch on the IGIS thing. The package creation magic was Jonathan. Pretty cool, I agree. Yes, I suppose we should get "IGIS" and "entrez" as args.

Pete


Peter M. Haverty, Ph.D. Genentech, Inc. phaverty@gene.com

On Wed, Sep 26, 2018 at 9:56 AM, Steve Lianoglou notifications@github.com wrote:

Also, is this function supposed to be a Genentech-only function? I ask because:

1.

The @examples code is quite GNE-specific w/ the ep.* stuff (I understand the convenience of putting that there for now); and 2.

This code block:

mcols(x)$source = "IGIS" mcols(x)$feature_type = "entrez"

it might make sense to make these source and feature_type values you are setting here to be parameters of this function, as I'd imagine most people these days will probably be using "ensembl" feature types.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Genentech/FacileDataSet/issues/25#issuecomment-424792047, or mute the thread https://github.com/notifications/unsubscribe-auth/AH02K3eDoSI1-EojRdmeS8OO23V_W8PMks5ue7HSgaJpZM4W7FkY .