load_bam: Pre-process RPF alignment file

View source: R/prep_data.R

load_bamR Documentation

Pre-process RPF alignment file

Description

This function takes a .bam alignment file where each row corresponds to an individual RPF read; generates annotations for RPF codon index, 5' digest length, 3' digest length, A-/P-/E-site codons, GC content, and bias sequences; filters out invalid RPFs; and aggregates identical RPFs.

If 'read_type' is 'disome', user must also specify 'offsets_5prime_fname' and 'offsets_3prime_fname'.

Usage

load_bam(
  bam_fname,
  transcript_fa_fname,
  transcript_length_fname,
  offsets_fname = NULL,
  num_cores = NULL,
  gc_omit = "APE",
  read_type = "monosome",
  f5_length = 3,
  f3_length = 3,
  offsets_5prime_fname = NULL,
  offsets_3prime_fname = NULL
)

Arguments

bam_fname

character; file path to .bam alignment file

transcript_fa_fname

character; file path to transcriptome .fasta file

transcript_length_fname

character; file path to transcriptome lengths file

offsets_fname

character; file path to A-site assignment rules file

num_cores

integer; number of cores to use for parallelization

read_type

character; one of 'monosome' or 'disome'

f5_length

integer; length of sequence between RPF 5' end and A site

f3_length

integer; length of sequence between A site and RPF 3' end

Value

A data frame of aggregated RPF counts and annotations


amandamok/choros documentation built on March 15, 2023, 7:57 p.m.