S4 class for multi-way chromatin contacts from long-read sequencing (Pore-C, Micro-C XL). Represents interactions as hypergraphs where reads connect multiple genomic loci.
Constructor for MultiWayContacts from .pairs files.
Details
Workflow: Create → Import → Build → Tidy → Select → Visualize
Key features:
Hypergraph representation: reads as hyperedges connecting bins
Sparse matrix storage for memory efficiency
Multiple weight normalizations
Flexible filtering by order, chromosome, and weight
Slots
pairs_pathCharacter. Path to .pairs file.
pairsData.frame or NULL. Loaded pairs data.
bin_sizeInteger or NULL. Genomic bin size in base pairs.
focusCharacter or NULL. Chromosome(s) to analyze.
hypergraphdgCMatrix or NULL. Sparse incidence matrix (bins × hyperedges).
weightsData.frame. Hyperedge weights with normalizations (raw, log, by_order, minmax).
bin_infoData.frame. Genomic bin information.
hyperedge_readsSimpleList. Read names per hyperedge.
multiwaysNumeric. Contact count per hyperedge.
tidied_hypergraphData.frame or NULL. Long-format hypergraph.
select_hypergraphData.frame or NULL. Selected hyperedges for plotting.
See also
MultiWayContacts(), import-MultiWayContacts, build(), tidy(),
select(), gghypergraph()
Examples
if (FALSE) { # \dontrun{
# Basic usage
mc <- MultiWayContacts("sample.pairs.gz")
# Focus on chromosome
mc <- MultiWayContacts("sample.pairs.gz", focus = "chr1")
# Complete workflow
mc <- MultiWayContacts("sample.pairs.gz", focus = "chr1") |>
import() |>
build(bin_size = 1000000L) |>
tidy() |>
select(n_intra = 10, n_inter = 5) |>
gghypergraph()
} # }
