Skip to content
Snippets Groups Projects
Commit dfdba078 authored by Hugo  VARET's avatar Hugo VARET
Browse files

hist_limits

parent f8644a8d
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ rawpHist <- function(result, outfile=FALSE){ ...@@ -16,7 +16,7 @@ rawpHist <- function(result, outfile=FALSE){
for (name in names(result)){ for (name in names(result)){
result.name <- result[[name]] result.name <- result[[name]]
p[[name]] <- ggplot(data=result.name, aes(x=.data$pvalue)) + p[[name]] <- ggplot(data=result.name, aes(x=.data$pvalue)) +
geom_histogram(binwidth=0.02) + geom_histogram(color="white", breaks=seq(0, 1, by=0.025)) +
scale_y_continuous(expand=expand_scale(mult=c(0.01, 0.05))) + scale_y_continuous(expand=expand_scale(mult=c(0.01, 0.05))) +
xlab("Raw p-value") + xlab("Raw p-value") +
ylab("Frequency") + ylab("Frequency") +
......
...@@ -22,10 +22,10 @@ library(knitr) ...@@ -22,10 +22,10 @@ library(knitr)
library(kableExtra) library(kableExtra)
library(ChIPuanaR) library(ChIPuanaR)
### INPUTS ### INPUTS
source("config.R") # source("config.R")
data <- read.table(file = file, header=TRUE) # data <- read.table(file = file, header=TRUE)
counts <- as.matrix(data[,-c(1:6)]) # counts <- as.matrix(data[,-c(1:6)])
rownames(counts) <- data[,1] # rownames(counts) <- data[,1]
``` ```
```{r echo=FALSE, results="asis", results="hide", message=FALSE} ```{r echo=FALSE, results="asis", results="hide", message=FALSE}
...@@ -70,8 +70,8 @@ if (method=="Limma") { ...@@ -70,8 +70,8 @@ if (method=="Limma") {
} }
# Export result table # Export result table
for (name in names(resAnDif$results)){ for (name in names(resAnDif$results)){
write.table(resAnDif$results[name], file=paste0(name,"_resAnDif.txt"), sep="\t", write.table(resAnDif$results[[name]], file=paste0(name, "_resAnDif.txt"), sep="\t",
row.names=TRUE, col.names=TRUE, dec=".", quote=FALSE) row.names=TRUE, col.names=NA, dec=".", quote=FALSE)
} }
``` ```
...@@ -84,6 +84,7 @@ The count data files and associated biological conditions are listed in the foll ...@@ -84,6 +84,7 @@ The count data files and associated biological conditions are listed in the foll
```{r , echo=FALSE, results="asis"} ```{r , echo=FALSE, results="asis"}
# Echo design # Echo design
design <- data.frame(Conditions, row.names = colnames(counts)) design <- data.frame(Conditions, row.names = colnames(counts))
if (!is.null(batch)) design$batch <- batch
kable(design, caption = "Table 1: Data files and associated biological conditions",format = "html") %>% kable(design, caption = "Table 1: Data files and associated biological conditions",format = "html") %>%
kable_styling(c("striped", "bordered", "responsive"), font_size = 14) %>% kable_styling(c("striped", "bordered", "responsive"), font_size = 14) %>%
column_spec(1, bold = T) column_spec(1, bold = T)
...@@ -150,7 +151,7 @@ PCAPlot(counts.trans = counts.trans, conditions = Conditions, outfile = FALSE) ...@@ -150,7 +151,7 @@ PCAPlot(counts.trans = counts.trans, conditions = Conditions, outfile = FALSE)
```{r , echo=FALSE, results="asis"} ```{r , echo=FALSE, results="asis"}
if (!is.null(batch)){ if (!is.null(batch)){
cat("For the statistical analysis, we need to take into account the effect of the ", batch, " parameter. Statistical models and tests will thus be adjusted on it.\n") cat("For the statistical analysis, we need to take into account the effect of the batch parameter. Statistical models and tests will thus be adjusted on it.\n")
} }
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment