alignRsubread {scruff} | R Documentation |
Rsubread
read alignment function align
This function is not available in Windows environment. Align cell
specific reads to reference genome and write sequence alignment results to
output directory. A wrapper to the align
function in Rsubread
package. For details please refer to Rsubread
manual.
alignRsubread( sce, index, unique = FALSE, nBestLocations = 1, format = "BAM", outDir = "./Alignment", cores = max(1, parallel::detectCores() - 2), threads = 1, summaryPrefix = "alignment", overwrite = FALSE, verbose = FALSE, logfilePrefix = format(Sys.time(), "%Y%m%d_%H%M%S"), ... )
sce |
A |
index |
Path to the |
unique |
Argument passed to |
nBestLocations |
Argument passed to |
format |
File format of sequence alignment results. "BAM" or "SAM". Default is "BAM". |
outDir |
Output directory for alignment results. Sequence alignment
files will be stored in folders in this directory, respectively.
Make sure the folder is empty. Default is |
cores |
Number of cores used for parallelization. Default is
|
threads |
Do not change. Number of threads/CPUs used for
mapping for each core. Refer to |
summaryPrefix |
Prefix for alignment summary filename. Default is
|
overwrite |
Boolean indicating whether to overwrite the output directory. Default is FALSE. |
verbose |
Boolean indicating whether to print log messages. Useful for debugging. Default to FALSE. |
logfilePrefix |
Prefix for log file. Default is current date and time
in the format of |
... |
Additional arguments passed to the |
A SingleCellExperiment object containing the alignment
summary information in the colData
slot. The alignment_path
column of the annotation table contains the paths to output alignment files.
# The SingleCellExperiment object returned by demultiplex function is # required for running alignRsubread function ## Not run: data(barcodeExample, package = "scruff") fastqs <- list.files(system.file("extdata", package = "scruff"), pattern = "\\.fastq\\.gz", full.names = TRUE) de <- demultiplex( project = "example", experiment = c("1h1"), lane = c("L001"), read1Path = c(fastqs[1]), read2Path = c(fastqs[2]), barcodeExample, bcStart = 1, bcStop = 8, umiStart = 9, umiStop = 12, keep = 75, overwrite = TRUE) # Alignment library(Rsubread) # Create index files for GRCm38_MT. fasta <- system.file("extdata", "GRCm38_MT.fa", package = "scruff") # Specify the basename for Rsubread index indexBase <- "GRCm38_MT" buildindex(basename = indexBase, reference = fasta, indexSplit = FALSE) al <- alignRsubread(de, indexBase, overwrite = TRUE) ## End(Not run)