CutSiteCountR {esATAC} | R Documentation

## Count cut site number in given motif region and plot footprint.

### Description

This function is used to count cut site number in given motif regions and plot footprint. Multi-motif is supported. NOTE: The input parameter is a a little bit complex, `atacExtractCutSite` and `atacMotifScan` is recommended to use which makes the entire procedure easier.

### Usage

    atacCutSiteCount(
      atacProcCutSite,
      atacProcMotifScan = NULL,
      csInput = NULL,
      motif_info = NULL,
      chr = c(1:22, "X", "Y"),
      matrixOutput = NULL,
      strandLength = 100,
      FootPrint = TRUE,
      prefix = NULL,
      ...
    )

    ## S4 method for signature 'ATACProc'
    atacCutSiteCount(
      atacProcCutSite,
      atacProcMotifScan = NULL,
      csInput = NULL,
      motif_info = NULL,
      chr = c(1:22, "X", "Y"),
      matrixOutput = NULL,
      strandLength = 100,
      FootPrint = TRUE,
      prefix = NULL,
      ...
    )

    cutsitecount(
      csInput = NULL,
      motif_info = NULL,
      chr = c(1:22, "X", "Y"),
      matrixOutput = NULL,
      strandLength = 100,
      FootPrint = TRUE,
      prefix = NULL,
      ...
    )

### Arguments

`atacProcCutSite` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacExtractCutSite`.
`atacProcMotifScan` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacMotifScan`.
`csInput` | Your cut site information file(from atacExtractCutSite function, separated by chromatin name and all cut site are sorted) path with prefix. e.g. "/your_cut_site_information_path/prefix".
`motif_info` | A rds file from function `atacMotifScan`. In the rds file, it saves 3 column information(motif, motif exact position information file path and motif length).
`chr` | Which chromatin the program will processing. It must be identical with the filename of cut site information files or subset of . Default:c(1:22, "X", "Y").
`matrixOutput` | The output directory, where to save your cut site count of every motif position. an empty folder would be great. Default:tmpdir/Footprint
`strandLength` | How many bp(base pair) do you want to count up/downstream of the motif. default:100.
`FootPrint` | TRUE or FALSE, plot footprint or not.
`prefix` | prefix for the pdf file.
`...` | Additional arguments, currently unused.

### Details

The parameter is simplified because of too many input file. parameter `atacProcCutSite` and `atacProcMotifScan` contains all input information so function `atacExtractCutSite` and `atacMotifScan` is recommended to use together. For instance, if you want footprint of 3 TFs (transcription factor) of human in chr1-22, X, Y, then you need 24 chromatin cut site files, 3 motif position files as well as 3 integers of the motif. Function `atacExtractCutSite` and `atacMotifScan` will do all this, you just specify which motif you want. Therefore, `atacExtractCutSite` and `atacMotifScan` is recommended to use together.

### Value

An invisible `ATACProc-class` object scalar.

### Author(s)

Wei Zhang

### See Also

`atacExtractCutSite` `atacMotifScan`

### Examples

    library(R.utils)
    library(BSgenome.Hsapiens.UCSC.hg19)
    ## processing bed file
    fra_path <- system.file("extdata", "chr20.50000.bed.bz2", package="esATAC")
    frag <- as.vector(bunzip2(filename = fra_path,
    destname = file.path(getwd(), "chr20.50000.bed"),
    ext="bz2", FUN=bzfile, overwrite=TRUE, remove = FALSE))
    cs.data <- extractcutsite(bedInput = frag, prefix = "ATAC")

    ## find motif position
    p1bz <- system.file("extdata", "Example_peak1.bed.bz2", package="esATAC")
    peak1_path <- as.vector(bunzip2(filename = p1bz,
    destname = file.path(getwd(), "Example_peak1.bed"),
    ext="bz2", FUN = bzfile, overwrite=TRUE, remove = FALSE))
    # motif <- readRDS(system.file("extdata", "MotifPFM.rds", package="esATAC"))
    # motif.data <- motifscan(peak = peak1_path, genome = BSgenome.Hsapiens.UCSC.hg19, motifs = motif)

    ## plot footprint
    # atacCutSiteCount(atacProcCutSite = cs.data, atacProcMotifScan = motif.data)

[Package esATAC version 1.12.0 Index]