#NOTE: Commented out in example, please see vignette for more details##
options(stringsAsFactors=FALSE)
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))
#data(curated_expressiondata)
#data(hg19_genes_bed)
#data(histone_h3k4me1)
#test_annotation<-makePvalueAnnotation(data=hg19_genes,
#other_data=list(h3k4me1=h3k4me1), gene_name_col=5,other_tss_distance=5000)
#fill in expression data
#test_annotation<-annotateExpression(test_annotation, expression_curated)
#fill in methylation data
#this step takes ~10 minutes
#test_annotation<-annotateModification(test_annotation, methylation,
#weight_by=c(promoter="distance",body="distance",h3k4me1="distance"),
#verbose=TRUE, mod_corr=FALSE)
#create a pvalue object that will count the effect of the h3k4me1 as
#bidirectional
#test_annotation<-makePvalueObject(pvalue_annotation=test_annotation,
#effect_directions=c(methylation_promoter="decrease",
#methylation_body="decrease", methylation_h3k4me1="bidirectional"))
Run the code above in your browser using DataLab