FRiPQC {esATAC} | R Documentation

## Quality control for fraction of reads in peaks (FRiP)

### Description

Calculate the fraction of reads falling within peak regions

### Usage

    atacFripQC(atacProcReads, atacProcPeak, bsgenome = NULL,
      reportOutput = NULL, readsBedInput = NULL, peakBedInput = NULL, ...)

    ## S4 method for signature 'ATACProc'
    atacFripQC(atacProcReads, atacProcPeak, bsgenome = NULL,
      reportOutput = NULL, readsBedInput = NULL, peakBedInput = NULL, ...)

    fripQC(readsBedInput, peakBedInput, bsgenome = NULL, reportOutput = NULL,
      ...)

### Arguments

`atacProcReads` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacSamToBed` `samToBed` `atacBedUtils` `bedUtils`
`atacProcPeak` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacPeakCalling`, `peakCalling`.
`bsgenome` | `BSGenome` object scalar. BSGenome object for specific species.
`reportOutput` | `Character` scalar. The report file path
`readsBedInput` | `Character` scalar. Reads BED file for peak calling.
`peakBedInput` | `Character` scalar. Peaks BED file
`...` | Additional arguments, currently unused.

### Details

The parameter related to input and output file path will be automatically obtained from `ATACProc-class` object(`atacProc`) or generated based on known parameters if their values are default(e.g. `NULL`). Otherwise, the generated values will be overwrited. If you want to use this function independently, or you can use `fripQC` instead.

### Value

An invisible `fripQC` object scalar for downstream analysis.

### Author(s)

Zheng Wei

### See Also

`atacSamToBed` `atacBedUtils`

### Examples

    library(R.utils)
    library(magrittr)
    td <- tempdir()
    options(atacConf=setConfigure("tmpdir",td))

    bedbzfile <- system.file(package="esATAC", "extdata", "chr20.50000.bed.bz2")
    bedfile <- file.path(td,"chr20.50000.bed")
    bunzip2(bedbzfile,destname=bedfile,overwrite=TRUE,remove=FALSE)

    readsProc<-bedUtils(bedInput = bedfile,maxFragLen = 100, chrFilterList = NULL)
    peaksProc<- readsProc %>% atacPeakCalling
    library(BSgenome.Hsapiens.UCSC.hg19)

    atacFripQC(readsProc,peaksProc,bsgenome=BSgenome.Hsapiens.UCSC.hg19)

[Package esATAC version 1.2.3 Index]