man/TENxPeaks.Rd
b12b4dd3
 % Generated by roxygen2: do not edit by hand
af8481b5
 % Please edit documentation in R/TENxPeaks-class.R
 \name{TENxPeaks}
 \alias{TENxPeaks}
4fdecbe6
 \title{Import 10x peak annotation files from 10x}
b12b4dd3
 \usage{
60ea5118
 TENxPeaks(resource, extension, ...)
b12b4dd3
 }
bc9ed23f
 \arguments{
 \item{resource}{character(1) The path to the file}
 
60ea5118
 \item{extension}{character(1) The file extension for the given resource. It
 can usually be obtained from the file path. An override can be provided
 especially for \code{ExperimentHub} resources where the file extension is
 removed.}
 
bc9ed23f
 \item{...}{Additional inputs to the low level class generator functions}
 }
4fdecbe6
 \value{
fd5d3c1e
 A \code{GRanges} class object of peak locations
4fdecbe6
 }
b12b4dd3
 \description{
4fdecbe6
 This constructor function is designed to work with the files denoted with
 "peak_annotation" in the file name. These are usually produced as tab
 separated value files, i.e., \code{.tsv}.
 }
 \details{
 The output class allows handling of peak data. It can be used in
 conjunction with the \code{annotation} method on a \code{SingleCellExperiment} to add
 peak information to the experiment. The ranged data is represented as a
 \code{GRanges} class object.
b12b4dd3
 }
 \examples{
 
c533cd13
 fi <- system.file(
     "extdata", "pbmc_granulocyte_sorted_3k_ex_atac_peak_annotation.tsv",
     package = "TENxIO", mustWork = TRUE
 )
561c8f9a
 peak_file <- TENxPeaks(fi)
f50c9445
 peak_anno <- import(peak_file)
c533cd13
 peak_anno
b12b4dd3
 
c533cd13
 example(TENxH5)
 
 ## Add peaks to an existing SCE
 ## First, import the SCE from an example H5 file
 h5f <- system.file(
     "extdata", "pbmc_granulocyte_ff_bc_ex.h5",
     package = "TENxIO", mustWork = TRUE
 )
 con <- TENxH5(h5f)
1d05d9dc
 sce <- import(con)
c533cd13
 ## auto-import peaks when using annotation<-
561c8f9a
 annotation(sce, name = "peak_annotation") <- peak_file
c533cd13
 annotation(sce)
1d05d9dc
 
b12b4dd3
 }