extract_spike_dat: Load and extract spUMIs from sequencing reads with v1...

View source: R/UMIcountR-funs.R

extract_spike_datR Documentation

Load and extract spUMIs from sequencing reads with v1 molecular spikes (5' or 3')

Description

extract_spike_dat is used to extract and parse molecular spike reads from bam files.

Usage

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
)

Arguments

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

Details

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.

Value

returns a data.table with reads, their UMI and the raw & error-corrected spUMI.

See Also

BamInput,ScanBamParam data.table-package

Examples

## 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)

cziegenhain/UMIcountR documentation built on May 30, 2022, 5:38 p.m.