loopsSubset: Subset two difloop objects

Description Usage Arguments Details Value Examples

Description

loopsSubset takes the interactions and anchors present in dlo1 and uses the counts and samples from dlo2.

Usage

1
2
3
4
loopsSubset(dlo1, dlo2)

## S4 method for signature 'loops,loops'
loopsSubset(dlo1, dlo2)

Arguments

dlo1

A loops object

dlo2

A loops object

Details

This function plays nice with union to ensure counts are correct after taking the union of two loops objects. The subset function simply returns the anchors and interactions of dlo1 and the counts and colData of dlo2.

Value

A loops obect

Examples

1
2
3
4
5
6
7
8
# divide and recombine samples
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
naive <- loops.small[,1:2]
primed <- loops.small[,3:4]
np <- union(naive, primed)
# Subset from full to get correct counts
c.np <- loopsSubset(np, loops.small)

diffloop documentation built on Nov. 8, 2020, 5:48 p.m.