View source: R/scAPAtrap_funlib.R
generatescExpMa | R Documentation |
Given peaks' count and annotation file, this function can filter peaks with low expression levels and generate different types of objects, including data.frame (df), list with data.frame peaks.meta and Sparse Matrix peaks.count (list), SeuratObject (Seurat), SingleCellExperiment (sce), movAPA's PACdataset (PAC).
generatescExpMa(
countsfile,
peaksfile,
barcode = NULL,
tails = NULL,
d = 100,
min.cells = 10,
min.count = 10,
ofile = NULL,
...
)
countsfile |
The decompressed file path of counts.tsv.gz generated by |
peaksfile |
The path of the peaks.saf file generated by |
barcode |
Vector of the barcode list for filtering cells. |
tails |
The result produced by |
d |
Max distance from the tail and peak to determine whether a peak is real (if it is within d-nt of a tail). |
min.cells |
peak is expressed in at least a few cells,the default value is 10. |
min.count |
peak minimum expression, the default value is 10. |
ofile |
if not NULL then output the an variable called scAPAtrapData to ofile, and return ofile. |
... |
Arguments passed to other methods and/or advanced arguments. Advanced arguments:
|
A list containing peaks.meta and peaks.count (ofile=NULL) or the ofile name (ofile!=NULL). The ofile is an RDA file which contains a variable called scAPAtrapData after load(ofile). The scAPAtrapData is a list.
The chromosome name in tails and peaksfile(peaks.saf) must be consistent (e.g., both be 1 or be Chr1).
## Not run:
countsfile <- countPeaks(umitools.path,'./data/final.bam','./data',TenX=TRUE)
peakfile <- generateSAF(forwardPeaks,reversePeaks,'./data')
tails <- findTails(bamfile = './data/demo.bam')
barcode <- utils::read.delim2('./data/barcodes.tsv',header = FALSE)
barcode <- gsub('-[0-9]','',barcode$V1)
scExpMa <- generatescExpMa(countsfile, peaksfile, barcode, tails,
d=100, min.cells = 10, min.count = 10)
scExpMa2 <- eneratescExpMa(countsfile, peaksfile, barcode,
min.cells = 10, min.count = 100, verbose=TRUE, logf='xx.log')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.