updateRowDataCol: Updating contents of 'rowData' of 'SummarizedExperiment'...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/updateRowDataCol.R

Description

Updates the values in a single column of the rowData of SummarizedExperiment objects.

Usage

1

Arguments

x

Object of type SummarizedExperiment.

updateCol

Name or the number of the column in the rowData of x to be updated with the new values. if the updateCol does not match to any column names it will be added as a new column.

value

The new Replacing values.

Value

Returns an object of type SummarizedExperiment.

Author(s)

Ali Oghabian

See Also

annotateU12

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
test<- mdsChr22Obj
# See the the frequency of each intron type annotation
table(rowData(test)$intron_type)

#Change U2 to u2
newIntType<- as.character(rowData(test)$intron_type)
newIntType[newIntType=="U2" & 
	!is.na(newIntType=="U2")]<- "u2"
#Updating values
test<- updateRowDataCol(test, updateCol="intron_type", 
	value=newIntType)
#See the frequency of the updated intron type annotations
table(rowData(test)$intron_type)

#Adding a new column
test<- updateRowDataCol(test, updateCol="new_column", 
	value=rep(NA, nrow(rowData(test))) )
head(rowData(test))

IntEREst documentation built on Nov. 8, 2020, 8:05 p.m.