Learn R Programming

diffloop (version 1.0.2)

loopsSubset: Subset two difloop objects

Description

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

Usage

loopsSubset(dlo1, dlo2)

## S3 method for class 'loops,loops': loopsSubset(dlo1, dlo2)

Arguments

dlo1
A loops object
dlo2
A loops object

Value

  • A loops obect

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab