convert_ids: Converts sample id's from one format to another using a data...

Description Usage Arguments Value Examples

Description

Converts sample id's from one format to another using a data frame with alternate information.

Usage

1
2
convert_ids(df, id_data = NULL, from_col = "native_id",
  to_col = "unified_id", other_cols = NULL)

Arguments

df

A data frame with a column named sample_id

id_data

A data frame containing information for id conversion

from_col

Define the name of the column matching the old

to_col

Define the name of the column matching the new ids

other_cols

Other columns to include in the output

Value

a data frame

Examples

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

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

data('CancerCellLineIDs')
convert_ids(df=dat1, id_data=dplyr::filter(CancerCellLineIDs, id_type=='CCLE'),
from_col='alt_id', to_col='unified_id')
convert_ids(df=dat1, id_data=dplyr::filter(CancerCellLineIDs, id_type=='CCLE'),
from_col='alt_id', to_col='unified_id', other_cols='tissue')

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