Skip to content

Commit

Permalink
Merge branch 'hotfix-contact'
Browse files Browse the repository at this point in the history
closes issue #15
  • Loading branch information
yannickspill committed Aug 28, 2019
2 parents 3cf37dc + a9a354d commit 76b4e6e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to *binless* will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
for versions 0.x of binless, minor releases might break backwards compatibility.

## [0.15.1]
### Fixed
- bug arising when a particular locus does not have reads in at least one
contact category

## [0.15.0]
### Added
- less errors regarding documentation when compiling
Expand Down Expand Up @@ -134,7 +139,8 @@ for versions 0.x of binless, minor releases might break backwards compatibility.
- Initial commit


[0.15.0]: ../../compare/v0.14.0...HEAD
[0.15.1]: ../../compare/v0.15.0...HEAD
[0.15.0]: ../../compare/v0.14.0...v0.15.0
[0.14.0]: ../../compare/v0.13.0...v0.14.0
[0.13.0]: ../../compare/v0.12.0...v0.13.0
[0.12.0]: ../../compare/v0.11.0...v0.12.0
Expand Down
2 changes: 1 addition & 1 deletion binless/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: binless
Type: Package
Title: binless: Resolution-independent Normalization And Interaction Detection For Hi-C Data
Version: 0.15.0
Version: 0.15.1
Authors@R: person("Yannick", "Spill", email = "[email protected]", role = c("aut", "cre"))
Author: Yannick Spill [aut, cre]
Maintainer: Yannick Spill <[email protected]>
Expand Down
7 changes: 6 additions & 1 deletion binless/R/preprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,15 @@ prepare_for_sparse_cs_norm = function(data, both=F, circularize=-1) {
stopifnot(all(X[,id==.I])) #IDs must start at one and have no gaps, for current stan implementation
#
cat("Produce count list\n")
contact.names = c("contact.close", "contact.down", "contact.far", "contact.up")
Y=dcast.data.table(enrich[id1 != id2
& category %in% c("contact.close", "contact.down", "contact.far", "contact.up"),
& category %in% contact.names,
.(id1,id2,pos1=re.closest1,pos2=re.closest2,category,N)],
...~category, value.var="N", fill=0)
if (!all(contact.names %in% colnames(Y))) {
missing <- contact.names[!contact.names %in% colnames(Y)]
Y[,missing] <- 0
}
setkey(Y,id1,id2)
Y[,distance:=pos2-pos1]
if (circularize>0) Y[,distance:=pmin(distance,circularize-distance+1)]
Expand Down
2 changes: 1 addition & 1 deletion binless/man/plot_virtual_4C.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 76b4e6e

Please sign in to comment.