loopsSubset {diffloop} | R Documentation

## 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)

    ## 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

    # 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)

[Package diffloop version 1.8.0 Index]