Commit c1a1b2f4 authored by Sudeep Sahadevan's avatar Sudeep Sahadevan

begin BiocCheck

parent 957c54e9
......@@ -31,7 +31,10 @@ Depends:
SummarizedExperiment,
utils
Suggests:
knitr
knitr,
rmarkdown
biocViews: Sequencing,
DifferentialExpression
License: LGPL (>= 3)
URL: https://git.embl.de/biohentze/DEWSeq
Encoding: UTF-8
......
......@@ -115,7 +115,7 @@ extractRegions <- function(windowRes,
mcols(geneReduce)$padj_min <- mcols(geneReduce)$padj_max <- mcols(geneReduce)$padj_mean <- 1.0
mcols(geneReduce)$log2FoldChange_min <- mcols(geneReduce)$log2FoldChange_max <- mcols(geneReduce)$log2FoldChange_mean <- 0.0
pb <- txtProgressBar(min=0,max=length(geneReduce),style = 3)
for(i in c(1:length(geneReduce))){
for(i in seq_len(length(geneReduce))){
# values
mergeInd <- unlist(mcols(geneReduce)[i,1])
mcols(geneReduce)[i,'windows_in_region'] <- length(mergeInd)
......
......@@ -69,8 +69,13 @@
#' @param begin0based TRUE (default) or FALSE. If TRUE, then the start positions in \code{annotationFile} are considered to be 0-based
#'
#' @return data.frame
resultsDEWSeq <- function(object, annotationFile,contrast, name, listValues=c(1,-1), cooksCutoff, test,
addMLE=FALSE, tidy=FALSE, parallel=FALSE, BPPARAM=bpparam(), minmu=0.5,begin0based=TRUE) {
resultsDEWSeq <- function(object, annotationFile,
contrast,name,
listValues=c(1,-1), cooksCutoff,
test, addMLE=FALSE,
tidy=FALSE, parallel=FALSE,
BPPARAM=bpparam(), minmu=0.5,
begin0based=TRUE) {
stopifnot(is(object, "DESeqDataSet"))
stopifnot(length(listValues)==2 & is.numeric(listValues))
stopifnot(listValues[1] > 0 & listValues[2] < 0)
......
......@@ -72,10 +72,10 @@ toBED <- function(windowRes,regionRes,fileName,padjCol='padj',padjThresh=0.05,lo
regionRes$padj_avg <- round(((regionRes$padj_avg-allMin)/(allMax-allMin))*(bedrange[2]-bedrange[1])+bedrange[1])
# now start writing
write(sprintf('track name="%s" description="%s" visibility=2 itemRgb="On" useScore=1',trackName,description),file=fileName)
for(i in c(1:nrow(regionRes))){
for(i in seq_len(nrow(regionRes))){
write(paste(regionRes[i,],collapse="\t"),file=fileName,append=TRUE)
}
for(i in c(1:nrow(windowRes))){
for(i in seq_len(nrow(windowRes))){
write(paste(windowRes[i,],collapse="\t"),file=fileName,append=TRUE)
}
}
......
......@@ -142,7 +142,7 @@ topWindowStats <- function(windowRes,padjCol='padj',padjThresh=0.05,log2FoldChan
outDat[,c('begin.meanWindow','end.meanWindow',meanMean,meanWindowCols)] <- 0
# mean, log2foldchange comparison data.frame
pb <- txtProgressBar(min=0,max=length(sigReduce),style = 3)
for(i in c(1:length(sigReduce))){
for(i in seq_len(length(sigReduce))){
mergeInd <- sigReduce$revmap[[i]]
outDat[i,'regionStartId'] <- mcols(sigRange)[min(mergeInd),'unique_id']
outDat[i,'regionStartId'] <- mcols(sigRange)[min(mergeInd),'unique_id']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment