View source: R/UMIcountR-funs.R
extract_spike_dat | R Documentation |
extract_spike_dat is used to extract and parse molecular spike reads from bam files.
extract_spike_dat( bam_path, spikename = "g_diySpike4", spikecontig = "diySpike", spikeUMI_start = NULL, spikeUMI_end = NULL, fixed_start_pos = NULL, match_seq_before_UMI = NULL, match_seq_after_UMI = NULL, spikeUMI_length = NULL )
bam_path |
path to input bam file, must be indexed zUMIs output file |
spikename |
name of the geneID for molecular spikes, Default: 'g_diySpike4' |
spikecontig |
name of the reference contig for molecular spikes, Default: 'diySpike' |
spikeUMI_start |
optional: fixed start position of the spUMI within reads, Default: NULL |
spikeUMI_end |
optional: fixed end position of the spUMI within reads, Default: NULL |
fixed_start_pos |
optional: fixed start position of the spUMI within reads, Default: NULL |
match_seq_before_UMI |
sequence to match before the spUMI, Default: NULL |
match_seq_after_UMI |
sequence to match after the spUMI, Default: NULL |
The spUMI can be extracted by known position within reads mapping to the molecular spike, when reads are required to map at a specific location (eg. for Smart-seq3 5' reads). In this case, all three arguments spikeUMI_start, spikeUMI_end and fixed_start_pos are required. When the position of the spUMI within reads is variable, provide the parameters match_seq_before_UMI and match_seq_after_UMI to extract the spUMI by matching the known surrounding sequence.
returns a data.table with reads, their UMI and the raw & error-corrected spUMI.
BamInput
,ScanBamParam
data.table-package
## Not run: example_dat <- extract_spike_dat( bam_path = bam, match_seq_before_UMI = "GAGCCTGGGGGAACAGGTAGG", match_seq_after_UMI = "CTCGGAGGAGAAA", spikename = "g_diySpike4", spikecontig = "diySpike", ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.