Skip to content

Commit

Permalink
Update importFrom section for findConsensusPeakRegions() function
Browse files Browse the repository at this point in the history
From: adeschen <adeschen@hotmail.com>

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/consensusSeekeR@112057 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
a.deschenes committed Dec 31, 2015
1 parent ae2f3e7 commit b028236
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ importFrom(BiocParallel,SnowParam)
importFrom(BiocParallel,bplapply)
importFrom(BiocParallel,bpmapply)
importFrom(BiocParallel,multicoreWorkers)
importFrom(GenomicRanges,split)
importFrom(rtracklayer,import)
importFrom(stringr,str_split)
8 changes: 4 additions & 4 deletions R/findConsensusPeakRegions.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
#' ## Print 2 first consensus regions
#' head(results$consensusRanges, 2)
#'
#' @importFrom GenomicRanges split
#' @export
findConsensusPeakRegions <- function(narrowPeaks, peaks, chrInfo,
extendingSize = 250,
Expand Down Expand Up @@ -157,7 +158,7 @@ findConsensusPeakRegions <- function(narrowPeaks, peaks, chrInfo,
areNarrowPeaksUsed <- expandToFitPeakRegion | shrinkToFitPeakRegion

# Preparing peak data
peaksSplit <- GenomicRanges::split(peaks, seqnames(peaks))
peaksSplit <- split(peaks, seqnames(peaks))
rm(peaks)

selectedPeaksSplit <- peaksSplit[names(peaksSplit) %in%
Expand All @@ -166,8 +167,7 @@ findConsensusPeakRegions <- function(narrowPeaks, peaks, chrInfo,

# Preparing narrow peaks data
if (areNarrowPeaksUsed) {
narrowPeaksSplit <- GenomicRanges::split(narrowPeaks,
seqnames(narrowPeaks))
narrowPeaksSplit <- split(narrowPeaks, seqnames(narrowPeaks))
rm(narrowPeaks)

selectedNarrowPeaksSplit <- narrowPeaksSplit[names(narrowPeaksSplit)
Expand All @@ -191,7 +191,7 @@ findConsensusPeakRegions <- function(narrowPeaks, peaks, chrInfo,

# Creating result list
z <- list(call = cl,
consensusRanges = IRanges::unlist(GRangesList((results)),
consensusRanges = unlist(GRangesList((results)),
recursive = TRUE,
use.names = FALSE))

Expand Down

0 comments on commit b028236

Please sign in to comment.