View source: R/wrapper_scPipeCPP.R
sc_exon_mapping | R Documentation |
Map aligned reads to exon annotation. The result will be written into optional fields in bam file with different tags. Following this link for more information regarding to bam file format: http://samtools.github.io/hts-specs
The function can accept multiple bam file as input, if multiple bam file is provided and the 'bc_len' is zero, then the function will use the barcode in the 'barcode_vector' to insert into the 'bc' bam tag. So the length of 'barcode_vector' and the length of 'inbam' should be the same If this is the case then the 'max_mis' argument in 'sc_demultiplex' should be zero. If 'be_len' is larger than zero, then the function will still seek for barcode in fastq headers with given length. In this case each bam file is not treated as from a single cell.
sc_exon_mapping(
inbam,
outbam,
annofn,
bam_tags = list(am = "YE", ge = "GE", bc = "BC", mb = "OX"),
bc_len = 8,
barcode_vector = "",
UMI_len = 6,
stnd = TRUE,
fix_chr = FALSE,
nthreads = 1
)
inbam |
input aligned bam file. can have multiple files as input |
outbam |
output bam filename |
annofn |
single string or vector of gff3 annotation filenames, data.frame in SAF format or GRanges object containing complete gene_id metadata column. |
bam_tags |
list defining BAM tags where mapping information is stored.
|
bc_len |
total barcode length |
barcode_vector |
a list of barcode if each individual bam is a single cell. (default: NULL). The barcode should be of the same length for each cell. |
UMI_len |
UMI length |
stnd |
TRUE to perform strand specific mapping. (default: TRUE) |
fix_chr |
TRUE to add 'chr' to chromosome names, MT to chrM. (default: FALSE) |
nthreads |
number of threads to use. (default: 1) |
generates a bam file with exons assigned
data_dir="celseq2_demo"
ERCCanno_fn = system.file("extdata", "ERCC92_anno.gff3",
package = "scPipe")
## Not run:
# for the complete workflow, refer to the vignettes
...
sc_exon_mapping(file.path(data_dir, "out.aln.bam"),
file.path(data_dir, "out.map.bam"),
ERCCanno_fn)
...
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.