gather_assay.PharmacoSet: Convert assay data from a PharmacoSet into tidy format

Description Usage Arguments Value Examples

Description

Convert assay data from a PharmacoSet into tidy format

Usage

1
2
3
## S3 method for class 'PharmacoSet'
gather_assay(x, sample_ids = NULL, gene_ids = NULL,
  data_type = "rna", sample_col = "cellid", gene_col = "Symbol")

Arguments

x

A PharmacoSet object

sample_ids

A vector of sample ids. Default is NULL (don't filter on sample id)

gene_ids

A vector of gene ids. Default is NULL (don't filter on gene id)

data_type

Name of the component of the PharmacoSet object to gather

sample_col

Name of the column in the pData data frame to use for filtering on sample id

gene_col

Name of the column in the rowData data frame to use for filtering on gene id

Value

a data frame in tall_df format

Examples

1
2
3
4
5
6
7
8
9
data('CCLEsmall', package='PharmacoGx')
gather_assay.PharmacoSet(CCLEsmall, sample_ids=c('143B', '23132-87'),
                         gene_ids=c('BRAF', 'EGFR'), data_type='rna')
set.seed(20)
gather_assay.PharmacoSet(CCLEsmall, sample_ids=sample(PharmacoGx::cellNames(CCLEsmall), 30),
                         gene_ids=c('BRAF', 'EGFR'), data_type='mutation')

gather_assay.PharmacoSet(CCLEsmall, sample_ids=sample(PharmacoGx::cellNames(CCLEsmall), 30),
 gene_ids=c('AK2', 'TFP1'), data_type='rnaseq', gene_col='gene_name')

chapmandu2/biotidyr documentation built on May 13, 2019, 3:29 p.m.