Skip to content

Commit

Permalink
fix: redirects to single chr. plotting if only 2 chromosomes trans in…
Browse files Browse the repository at this point in the history
…teractions are found
  • Loading branch information
js2264 committed Oct 3, 2023
1 parent 85b00a4 commit 1e6e8cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ setMethod("plotMatrix", "GInteractions", function(
GenomicRanges::seqnames(InteractionSet::regions(gis))
)))

if (nseqnames == 1) { ## SINGLE CHROMOSOME MAP
if (nseqnames == 1 | {nseqnames == 2 & all(
GenomicRanges::seqnames(InteractionSet::anchors(gis, "first")) !=
GenomicRanges::seqnames(InteractionSet::anchors(gis, "second"))
)}) { ## SINGLE CHROMOSOME MAP or 2 CHROMOSOMES TRANS INTERSECTION

if (is.null(maxDistance)) { ##### REGULAR SQUARE MATRIX
## -- Convert gis to table and extract x/y
Expand Down

0 comments on commit 1e6e8cb

Please sign in to comment.