gather_curvedata.PharmacoSet: Convert raw dose response curve data from a PharmacoSet into...

Description Usage Arguments Value Examples

Description

Convert raw dose response curve data from a PharmacoSet into tidy format

Usage

1
2
3
## S3 method for class 'PharmacoSet'
gather_curvedata(x, sample_ids = NULL,
  resp_ids = NULL, extra_cols = NULL)

Arguments

x

PharmacoSet object

sample_ids

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

resp_ids

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

extra_cols

Optional additional columns to retrieve from the PharmacoSet drug info. Default is NULL

Value

a data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
data('CCLEsmall', package='PharmacoGx')
gather_curvedata.PharmacoSet(CCLEsmall, sample_ids=c('CHL-1', 'SW1573'),
                         resp_ids=c('AEW541', 'Nilotinib'))
gather_curvedata.PharmacoSet(CCLEsmall, sample_ids=c('CHL-1', 'SW1573'),
                         resp_ids=c('AEW541', 'Nilotinib'), extra_cols='nbr.conc.tested')
## Not run: 

#example to extract PARP inhibitor data from GDSC1000 dataset and what happens
#when more than one curve exists per compound/cell line combination

library(dplyr)
GDSC1000 <- PharmacoGx::downloadPSet('GDSC1000')

#get compounds that are PARP inhibitors
parp_inhibitors <- drugInfo(GDSC1000) %>%
        dplyr::filter(grepl('PARP', TARGET))

#get data for parp inhibitors
parpi_data <- gather_curvedata.PharmacoSet(GDSC1000, sample_ids=NULL,
                         resp_ids=parp_inhibitors$drugid)

#note warning about duplicate curves - this is because Olaparib was screened
#twice and has two drug ids - 1017 and 1495.  See parp_inhibtors dataframe


## End(Not run)

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