Mercurial > repos > petr-novak > re_utils
comparison ChipSeqRatioAnalysis.R @ 6:f224513123a1 draft
Uploaded
author | petr-novak |
---|---|
date | Mon, 02 Dec 2019 03:45:28 -0500 |
parents | 378565f5a875 |
children | 99569eccc583 |
comparison
equal
deleted
inserted
replaced
5:378565f5a875 | 6:f224513123a1 |
---|---|
51 save.image("tmp.RData") #Plot creation | 51 save.image("tmp.RData") #Plot creation |
52 pngfile <- tempfile() | 52 pngfile <- tempfile() |
53 png(pngfile, width = 1000, height = 1200, pointsize=20) | 53 png(pngfile, width = 1000, height = 1200, pointsize=20) |
54 par(mfrow=c(2,1)) | 54 par(mfrow=c(2,1)) |
55 lims=range(df$"Normalized ratio Chip/Input"[df$"Normalized ratio Chip/Input">0], finite = TRUE) | 55 lims=range(df$"Normalized ratio Chip/Input"[df$"Normalized ratio Chip/Input">0], finite = TRUE) |
56 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/Input", log="y", xlab="Cluster Nr.", ylab="Normalized ChiP/Seq ratio", pch=20, ylim=lims)) | 56 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/Input", log="y", xlab="Cluster Nr.", ylab="Normalized ChiP/Input ratio", pch=20, ylim=lims)) |
57 abline(h=1,col='#00000080', lwd = 2) | 57 abline(h=1,col='#00000080', lwd = 2) |
58 abline(h=2,col='#FF000080', lwd = 2) | 58 abline(h=2,col='#FF000080', lwd = 2) |
59 | 59 |
60 | 60 |
61 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/(Chip+Input)", xlab="Cluster Nr.", ylab="Normalized Chip/(Chip+Input)", pch=20)) | 61 suppressWarnings(plot(df$Cluster,df$"Normalized ratio Chip/(Chip+Input)", xlab="Cluster Nr.", ylab="Normalized Chip/(Chip+Input)", pch=20)) |
80 if (nrow(outputTable)>0){ | 80 if (nrow(outputTable)>0){ |
81 HTML(outputTable, file=filename, classtable = "dataframe", | 81 HTML(outputTable, file=filename, classtable = "dataframe", |
82 row.names=FALSE, align='left', caption="Clusters with Normalized ChIP/Input ratio > 2", captionalign="top") | 82 row.names=FALSE, align='left', caption="Clusters with Normalized ChIP/Input ratio > 2", captionalign="top") |
83 } | 83 } |
84 HTMLEndFile(filename) | 84 HTMLEndFile(filename) |
85 file.rename(from=filename, to=HTMLfile) | 85 # file.rename(from=filename, to=HTMLfile) |
86 system(sprintf("cp -r ./%s %s", filename, HTMLfile)) | |
86 write.table(df, file=input, sep="\t", row.names = FALSE) | 87 write.table(df, file=input, sep="\t", row.names = FALSE) |