get_entity: Query an entity and return the resulting dataframe,...

View source: R/io_query.R

get_entityR Documentation

Query an entity and return the resulting dataframe, optionally including info fields

Description

Query an entity and return the resulting dataframe, optionally including info fields

Usage

get_entity(
  con,
  pkg_schema,
  entitynm,
  aop = F,
  include_info_array = F,
  join_info_array = T,
  query_attributes = NULL,
  semi_join_args = NULL,
  ...
)

Arguments

aop

if TRUE, return the arrayop object instead of the data frame. Only possible if not returning an info array

include_info_array

if TRUE, also query the info array for the entity if one exists

join_info_array

if TRUE and using include_info_array, return a single data frame with the info array joined to the main array. Otherwise, return a list of the two dataframes

query_attributes

if TRUE, filtering/joining on attributes of main array. Inferred automatically is using ... parameter, but needs to be set manually if using semi_join_args, particularly is semi_join_args contains any arrayop objects

semi_join_args

an ordered list of things to semi_join the queried array by.

...

If semi_join_args is not provided, can provide items to join on here. ⁠get_entity(*, dataset_id=1:10, dataset_version=1)⁠ is equivalent to ⁠get_entity(*, semi_join_args = list(data.frame(dataset_id=1:10), data.frame(dataset_version=1))⁠

Examples

## Not run: 
gs_query = revealcore:::get_entity(con, revealgenomics:::.ghEnv, "GENE_SYMBOL", gene_symbol=c("BRCA1","BRCA2"), aop = T)
revealcore:::get_entity(con, revealgenomics:::.ghEnv, "FEATURE", semi_join_args=list(data.frame("featureset_id"=1:10), gs_query), include_info_array=T, query_attributes=F)
revealcore:::get_entity(con, revealgenomics:::.ghEnv, "FEATURE", semi_join_args=list(data.frame("featureset_id"=1:10), gs_query, data.frame("feature_type"="gene")), include_info_array=T, query_attributes=T, join_info_array=F)
revealcore:::get_entity(con, revealgenomics:::.ghEnv, "FEATURE", semi_join_args=list(data.frame("featureset_id"=1:10), gs_query, data.frame("feature_type"="gene")), include_info_array=T, query_attributes=T, join_info_array=T)

## End(Not run)


Paradigm4/revealcore documentation built on May 21, 2023, 9:57 a.m.