Skip to content

Commit

Permalink
Minor bugfix in methylSigTile()
Browse files Browse the repository at this point in the history
Cannot reproduce everywhere, but sometimes when a chromosome has no entries in the meth object, the tiling function failed. Now check for entries on the chromosome.
  • Loading branch information
Raymond Cavalcante committed Jan 25, 2019
1 parent 897d0ae commit 63a015d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: methylSig
Type: Package
Title: a whole genome DNA methylation analysis pipeline
Version: 0.5.0
Date: 2018-12-05
Version: 0.5.1
Date: 2019-01-25
Authors@R: c(
person("Yongseok", "Park", email = "[email protected]", role = c("aut")),
person("Raymond G.", "Cavalcante", email = "[email protected]", role = c("aut", "cre")))
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
CHANGES IN VERSION 0.5.1
------------------------

o Minor bugfix in methylSigTile() function. Cannot reproduce everywhere,
but sometimes when a chromosome has no entries in the meth object, the
tiling function failed. Now check for entries on the chromosome.

CHANGES IN VERSION 0.5.0
------------------------

Expand Down
10 changes: 6 additions & 4 deletions R/tile.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ methylSigTile <- function(meth, tiles = NULL, win.size = 200) {
)
seqinfo_list = split(seqinfo_df, seqinfo_df$seqnames)
seqinfo_list = lapply(seqinfo_list, function(chr){
max_df = data.frame(
seqnames = unique(chr$seqnames),
end = max(chr$end)
)
if(nrow(chr) > 0) {
max_df = data.frame(
seqnames = unique(chr$seqnames),
end = max(chr$end)
)
}
})
seqinfo_df = Reduce(rbind, seqinfo_list)

Expand Down

0 comments on commit 63a015d

Please sign in to comment.