removeModification: A function to "unload" a modification that has already been...

Description Usage Arguments Value Author(s) See Also Examples

Description

After using the annotateModification function to load a modification into a PValue annotation, you may wish to remove a modification or reannotate one, which requires removing it first.

Usage

1
removeModification(pvalue_annotation, mod_type = "methylation")

Arguments

pvalue_annotation

An S4 object of class PvalueAnnotation

mod_type

A character string that identifies a type of modification within a PvalueAnnotation.

Value

An S4 object of class PvalueAnnotation

Author(s)

N. Ari Wijetunga

See Also

annotateModification extractModification extractModSummary

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
##NOTE: Commented out in example. ##
## Please see vignette for more detailed usage information ##

## Load genome bed file ##

#data(hg19_genes_bed)

## Load curated DNA methylation bed file ##

data(methylationdata)
methylation <- methylation[-which(is.na(methylation[, 5])), ]
methylation[, 5] <- replace(methylation[, 5], methylation[, 5] == 0, 
    min(subset(methylation[, 5], methylation[, 5] != 0), na.rm=TRUE))

#meth1<-methylation

## make second curated test methylation bed file ##

#meth2<-methylation

## Create a PvalueAnnotation with defaults for promoter size##
#test_annotation<-makePvalueAnnotation(data=hg19_genes, gene_name_col=5)

## Load DNA methylation into PvalueAnnotation ##
#test_annotation<-annotateModification(annotation=test_annotation, 
#mod_data=meth1, weight_by=c(promoter="distance",body="distance"),verbose=TRUE,
#mod_corr=TRUE,mod_type="methylation")

## Extract GRanges with modification data ##
#extractModification(test_annotation)

## Load second dataset bed file ##
#test_annotation<-annotateModification(pvalue_annotation=test_annotation, 
#mod_data=meth2, weight_by=c(promoter="distance",body="distance"),
#verbose=TRUE, mod_corr=TRUE,mod_type="hydroxy")

## Extract GRanges with both modification dataset loaded ##
#head(extractModification(test_annotation,"hydroxy"))

## Unload DNA hydroxymethylation form PvalueAnnotation ##

#test_annotation<-removeModification(pvalue_annotation=test_annotation, 
                                    #mod_type="hydroxy")

## Extract GRanges to see only one modification dataset loaded ##
#head(extractModification(pvalue_annotation=test_annotation))

GreallyLab/SMITE documentation built on May 6, 2019, 6:30 p.m.