CutSitePre: Extract ATAC-seq cutting site from bed file.

CutSitePreR Documentation

Extract ATAC-seq cutting site from bed file.

Description

Extract cutting site from ATAC-seq fangment bed file (from atacSamToBed).

Usage

atacExtractCutSite(
  atacProc,
  bedInput = NULL,
  csOutput.dir = NULL,
  prefix = NULL,
  ...
)

## S4 method for signature 'ATACProc'
atacExtractCutSite(
  atacProc,
  bedInput = NULL,
  csOutput.dir = NULL,
  prefix = NULL,
  ...
)

extractcutsite(bedInput, csOutput.dir = NULL, prefix = NULL, ...)

Arguments

atacProc

ATACProc-class object scalar. It has to be the return value of upstream process: atacSamToBed.

bedInput

Character scalar. Input bed file path, must be merged bed file(a line is a fragment). The input file should be UCSC bed format(0-based).

csOutput.dir

Character scalar. The output path, an empty folder would be great. Default: a folder in the same path as input bed file.

prefix

Character scalar. Output file name prefix, e.g. prefix_chr*.bed, default "Cutsite".

...

Additional arguments, currently unused.

Details

In ATAC-seq data, every line in merged bed file (from atacSamToBed, the first 3 column is chr, start, end) means a DNA fragment, the cutting site is start+1 and end, this function extract and sort this information for the next step (atacCutSiteCount).

Value

An invisible ATACProc-class object scalar for downstream analysis.

Author(s)

Wei Zhang

See Also

atacCutSiteCount

Examples


library(R.utils)
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))
extractcutsite(bedInput = frag, prefix = "ATAC")


wzthu/wzzw documentation built on Aug. 13, 2022, 7:11 a.m.