Skip to content

Commit

Permalink
fix: 1-based bin IDs in hicpro matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Jun 3, 2023
1 parent 55c6079 commit 075f726
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/parse-hicpro.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NULL

file <- gsub('~', Sys.getenv('HOME'), file)

# Get raw counts for bins from hic
# Get counts for bins from hic
matrix_df <- vroom::vroom(
file,
col_names = FALSE,
Expand All @@ -34,7 +34,7 @@ NULL

# Get anchors from hicpro
anchors <- .getHicproAnchors(bed)
# anchors$bin_id <- anchors$bin_id+1
anchors$bin_id <- anchors$bin_id+1
an1 <- left_join(
matrix_df, as.data.frame(anchors), by = c('start_idx' = 'bin_id')
) |> as("GRanges")
Expand Down

0 comments on commit 075f726

Please sign in to comment.