Description Usage Arguments Value Examples
View source: R/importBUStools.R
Read the barcodes, features (genes), and matrix from BUStools output. Import them as one SingleCellExperiment object. Note the cells in the output files for BUStools 0.39.4 are not filtered.
1 2 3 4 5 6 7 8 9 10 | importBUStools(
BUStoolsDirs,
samples,
matrixFileNames = "genes.mtx",
featuresFileNames = "genes.genes.txt",
barcodesFileNames = "genes.barcodes.txt",
gzipped = "auto",
class = c("Matrix", "matrix"),
delayedArray = TRUE
)
|
BUStoolsDirs |
A vector of paths to BUStools output files. Each sample
should have its own path. For example: |
samples |
A vector of user-defined sample names for the samples to be
imported. Must have the same length as |
matrixFileNames |
Filenames for the Market Exchange Format (MEX) sparse
matrix files (.mtx files). Must have length 1 or the same
length as |
featuresFileNames |
Filenames for the feature annotation files.
Must have length 1 or the same length as |
barcodesFileNames |
Filenames for the cell barcode list file.
Must have length 1 or the same length as |
gzipped |
Boolean. |
class |
Character. The class of the expression matrix stored in the SCE object. Can be one of "Matrix" (as returned by readMM function), or "matrix" (as returned by matrix function). Default "Matrix". |
delayedArray |
Boolean. Whether to read the expression matrix as
DelayedArray-class object or not. Default |
A SingleCellExperiment
object containing the count
matrix, the gene annotation, and the cell annotation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Example #1
# FASTQ files were downloaded from
# https://support.10xgenomics.com/single-cell-gene-expression/datasets/3.0.0
# /pbmc_1k_v3
# They were concatenated as follows:
# cat pbmc_1k_v3_S1_L001_R1_001.fastq.gz pbmc_1k_v3_S1_L002_R1_001.fastq.gz >
# pbmc_1k_v3_R1.fastq.gz
# cat pbmc_1k_v3_S1_L001_R2_001.fastq.gz pbmc_1k_v3_S1_L002_R2_001.fastq.gz >
# pbmc_1k_v3_R2.fastq.gz
# The following BUStools command generates the gene, cell, and
# matrix files
# bustools correct -w ./3M-february-2018.txt -p output.bus | \
# bustools sort -T tmp/ -t 4 -p - | \
# bustools count -o genecount/genes \
# -g ./transcripts_to_genes.txt \
# -e matrix.ec \
# -t transcripts.txt \
# --genecounts -
# The top 20 genes and the first 20 cells are included in this example.
sce <- importBUStools(
BUStoolsDirs = system.file("extdata/BUStools_PBMC_1k_v3_20x20/genecount/",
package = "singleCellTK"),
samples = "PBMC_1k_v3_20x20")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.