Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "source agnostic" (fetch|with)_data retrieval functions #8

Open
lianos opened this issue Dec 6, 2019 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@lianos
Copy link
Member

lianos commented Dec 6, 2019

We have (fetch|with)_sample_covariates() and (fetch|with)_assay_data() functions.

It might be useful for interactive analysis to create a higher level (fetch|with)_data() set of functions. These functions would allow for the specification of the source of the data (feature data, or sample data) to be encoded in the item itself.

For instance, let's say we have a set of samples in a facile_frame named xsamplesthat we want to fetch expression data for CD3E and GAPDH, and some sample-level covariates, like "sex" and "sample_type"

Some ways to do that:

d1 <- xsamples %>%
  with_data(c("feature:CD3E", "sample:sex", "sample:sample_type"))

But how would we know what feature column we should use to look for CD3E? Maybe we specify to search in the "name" column like so:

d1 <- xsamples %>%
  with_data(c("feature:CD3E|name", "sample:sex", "sample:sample_type"))

Further to specify what assay data matrix to use:

d1 <- xsamples %>%
  with_data(c("feature[rnaseq]:CD3E|name", "sample:sex", "sample:sample_type"))

Combined Retrieval of Similar Data Types

Since both "sex" and "sample_type" are coming from sample covariates, let's enable a simplification of retrieval using a ","

d1 <- xsamples %>%
  with_data(c("feature[rnaseq]:CD3E|name", "sample:sex,sample_type"))

And let's say we wanted a second gene as well, like GAPDH

d1 <- xsamples %>%
  with_data(c("feature[rnaseq]:CD3E|name,GAPDH|name", "sample:sex,sample_type"))
@lianos lianos added the enhancement New feature or request label Dec 6, 2019
@lianos lianos self-assigned this Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant