diff --git a/inst/extdata/microC_with-loops.rds b/inst/extdata/microC_with-loops.rds index 983398f..261bada 100644 Binary files a/inst/extdata/microC_with-loops.rds and b/inst/extdata/microC_with-loops.rds differ diff --git a/inst/pages/topological-features.qmd b/inst/pages/topological-features.qmd index 67b9d0d..808f817 100644 --- a/inst/pages/topological-features.qmd +++ b/inst/pages/topological-features.qmd @@ -313,20 +313,9 @@ you can import the annotated loops in `R` as follows: ```{r} ## Change the `.tsv` file to the local output file from chromosight -df <- readr::read_tsv(system.file('extdata', 'chromo.tsv', package = 'OHCA')) -loops <- InteractionSet::GInteractions( - anchor1 = GenomicRanges::GRanges( - df$chrom1, IRanges::IRanges(df$start1, df$end1) - ), - anchor2 = GenomicRanges::GRanges( - df$chrom2, IRanges::IRanges(df$start2, df$end2) - ), - bin_id1 = df$bin1, - bin_id2 = df$bin2, - score = df$score, - pvalue = df$pvalue, - qvalue = df$qvalue -) +loops <- system.file('extdata', 'chromo.tsv', package = 'OHCA') |> + readr::read_tsv() |> + plyinteractions::as_ginteractions(seqnames1 = chrom1, seqnames2 = chrom2) loops ``` @@ -342,8 +331,8 @@ GenomicInteractions::export.bedpe(loops, 'loops.bedpe') #### Visualizing chromatin loops ```{r} -p <- plotMatrix( - refocus(hic, 'chr17:62500001-63500000') |> zoom(5000), +plotMatrix( + hic, loops = loops, limits = c(-4, -1.2), caption = FALSE