SamToBam {esATAC} | R Documentation |
This function convert a sam file into a bam file.
atacSam2Bam(atacProc, samInput = NULL, bamOutput = NULL, ...) ## S4 method for signature 'ATACProc' atacSam2Bam(atacProc, samInput = NULL, bamOutput = NULL, ...) sam2bam(samInput, bamOutput = NULL, ...)
atacProc |
|
samInput |
|
bamOutput |
|
... |
Additional arguments, currently unused. |
The sam file wiil be automatically obtained from
object(atacProc
) or input by hand. bamOutput can be ignored.
An invisible ATACProc-class
object scalar for
downstream analysis.
Wei Zhang
atacBowtie2Mapping
atacBam2Bed
atacBamSort
library(R.utils) sam_bz <- system.file("extdata", "Example.sam.bz2", package="esATAC") sam_path <- as.vector(bunzip2(filename = sam_bz, destname = file.path(getwd(), "Example.sam"), ext="bz2", FUN=bzfile, remove = FALSE)) sam2bam(samInput = sam_path)