gather.PharmacoSet: Convert a PharmacoSet object into tidy format

Description Usage Arguments Value Examples

Description

Convert a PharmacoSet object into tidy format. This is essentially a wrapper function for gather_response.PharmacoSet and gather_assay.PharmacoSet

Usage

1
2
3
4
5
## S3 method for class 'PharmacoSet'
gather(x, sample_ids = NULL, gene_ids = NULL,
  resp_ids = NULL, sample_col = "cellid", gene_col = c("Symbol",
  "gene_name"), resp_col = "ic50_published", data_types = c("rna",
  "mutation"), resp_df = NULL)

Arguments

x

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)

resp_ids

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

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

resp_col

Response variable to retrieve

data_types

Names of the components of the PharmacoSet object to gather

resp_df

Data frame to process response data from (rather than PharmcaGx object)

Value

a data frame in tall_df format

Examples

1
2
3
4
5
6
7
8
data('CCLEsmall', package='PharmacoGx')

gather.PharmacoSet(CCLEsmall, sample_ids=c('143B', '23132-87'), gene_ids=c('BRAF', 'EGFR'),
 data_types=c('rna', 'mutation'), gene_col=c('Symbol', 'Symbol'))

gather.PharmacoSet(CCLEsmall, sample_ids=c('CHL-1', 'SW1573'), gene_ids=c('BRAF', 'EGFR'),
 resp_ids=c("AEW541","Nilotinib","PHA-665752","lapatinib"),
 data_types=c('rna', 'mutation'), gene_col=c('Symbol', 'Symbol'), resp_col='ic50_published')

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