Here is how you can make a table in GFM format using knitr + ascii
render_gfm()
gfm_table <- function(x, ...) {
require(ascii)
y <- capture.output(print(ascii(x, ...), type = "org"))
# substitute + with | for table markupHere is how you can make a table in GFM format using knitr + ascii
render_gfm()
gfm_table <- function(x, ...) {
require(ascii)
y <- capture.output(print(ascii(x, ...), type = "org"))
# substitute + with | for table markup| file.list = list("wgEncodeHaibMethylRrbsA549Dm002p7dHaibSitesRep1.bed.gz", | |
| "wgEncodeHaibMethylRrbsAg04449UwstamgrowprotSitesRep1.bed9.gz") | |
| obj = read(file.list, sample.id = list("test", "control"), treatment = c(1,0), | |
| assembly = "hg19", header = FALSE, context = "CpG", resolution = "base", | |
| pipeline = list(fraction = FALSE, chr.col = 1, start.col = 3, end.col = 3, | |
| coverage.col = 5, strand.col = 6, freqC.col = 11)) | |
| obj | |
| ## methylRawList object with 2 methylRaw objects | |
| ## | |
| ## methylRaw object with 1464031 rows |
| library(methylKit) | |
| obj = read("wgEncodeHaibMethylRrbsA549Dm002p7dHaibSitesRep1.bed.gz", | |
| sample.id = "test", assembly = "hg19", header = FALSE, | |
| context = "CpG", resolution = "base", | |
| pipeline = list(fraction = FALSE, chr.col = 1, start.col = 3, | |
| end.col = 3,coverage.col = 5, strand.col = 6, | |
| freqC.col = 11)) |
| library(sqldf) | |
| library(doBy) | |
| library(plyr) | |
| library(data.table) | |
| n<-100000 | |
| grp1<-sample(1:750, n, replace=T) | |
| grp2<-sample(1:750, n, replace=T) | |
| d<-data.frame(x=rnorm(n), y=rnorm(n), grp1=grp1, grp2=grp2, n, | |
| replace=T) |
| library(methylKit) | |
| obj=read("bsmap_output.txt",sample.id="test",assembly="mm9",header=TRUE, context="CpG", resolution="base", | |
| pipeline=list(fraction=TRUE,chr.col=1,start.col=2,end.col=2, | |
| coverage.col=6,strand.col=3,freqC.col=5 ) | |
| ) | |
| obj |