filterLoops {diffloop} | R Documentation

## Filter loops

### Description

`filterLoops` filters out loops that aren't wide, aren't prevalent within samples or prevalent between samples

### Usage

    filterLoops(dlo, width = 0, nreplicates = 0, nsamples = 1)

    ## S4 method for signature 'ANY'
    filterLoops(dlo, width = 0, nreplicates = 0, nsamples = 1)

### Arguments

`dlo` | A loops object
`width` | Minimum loop width
`nreplicates` | Minimum number of counts per loop
`nsamples` | Minimum number of samples per loop per counts

### Details

Function that restricts loops in a loops object. `width` specifies the minimum width between anchors. Default is zero. `nreplicates` restricts loops to at least this specified amount of counts is present in at least one sample. Instead of `nreplicates` being present in only one sample, `nsamples` specifies how many individual samples that a loop must have `nreplicates` in to be included after filtering.

### Value

A loops object

### Examples

    rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
    load(rda)
    # Restrict loops to > 5kb width
    filtered.jpn1 <- filterLoops(loops.small, 5000, 0, 0)
    # Restrict loops to > 5kb width and have >= 3 replicates in >= 1 sample
    filtered.jpn2 <- filterLoops(loops.small, 5000, 3, 1)
    # Restrict loops to > 10kb width and have >= 3 replicates in >= 2 samples
    filtered.jpn3 <- filterLoops(loops.small, 10000, 3, 2)

[Package diffloop version 1.16.0 Index]