Skip to content

Commit

Permalink
testing sparse input
Browse files Browse the repository at this point in the history
  • Loading branch information
timydaley committed Feb 15, 2019
1 parent 29d6712 commit eff769e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/read_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ getCountsByReadGroup <- function(bamfile, peaks, RGtag, tags = NULL, PAIRED = FA
}
counts_mat = Matrix::Matrix(0, nrow = length(peaks),
ncol = length(tags), sparse = TRUE)
for(i in 1:length(RGtags)){
tag = RGtags[i]
for(i in 1:length(tags)){
tag = tags[i]
if(VERBOSE){
message("Processing tag ", tag)
}
Expand Down Expand Up @@ -133,7 +133,7 @@ getCountsMatrix <- function(bamfiles, peaks, PAIRED = FALSE,
}
stopifnot(length(bamfiles) == 1)
counts_mat = getCountsByReadGroup(bamfiles, peaks.gr, RGtag = RGtag,
tags2include);
tags = tags2include);
rownames(counts_mat) = peaks$name
}
else{
Expand Down

0 comments on commit eff769e

Please sign in to comment.