Skip to content

Commit

Permalink
Merge pull request friendsofstrandseq#41 from p-smirnov/plot-sv-calls…
Browse files Browse the repository at this point in the history
…_dev_p-smirnov1

Fixing small indexing errors in plot-sv-calls_dev
  • Loading branch information
weber8thomas authored Aug 9, 2023
2 parents 4463ca3 + 8d23cf5 commit 05c7959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workflow/scripts/plotting/plot-sv-calls_dev.R
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ if (!is.null(f_segments)) {


seg <-
merge(seg, bins[, .N, by = chrom][, .(chrom, N = c(0, cumsum(N))[1:(.N - 1)])], by = "chrom")
merge(seg, bins[, .N, by = chrom][, .(chrom, N = c(0, cumsum(N)[- .N]))], by = "chrom")

# print(c(1, bps[1:(.N - 1)] + 1))
# print(bps)
Expand All @@ -372,7 +372,7 @@ if (!is.null(f_segments)) {
# stop()


seg[, `:=`(from = c(1, bps[1:(.N - 1)] + 1), to = bps), by = chrom]
seg[, `:=`(from = c(1, bps[-length(bps)] + 1), to = bps), by = chrom]

# print(seg)

Expand Down

0 comments on commit 05c7959

Please sign in to comment.