choros: Pipeline for RPF bias correction

View source: R/choros.R

chorosR Documentation

Pipeline for RPF bias correction

Description

This is a wrapper function to perform all the steps in the 'choros' pipeline: pre-processing of the RPF alignments, deciding which RPF lengths and frames to model, deciding which transcripts to use for training, regression modeling, correction of RPF counts, and evaluation of position-based biases before/after correction.

Usage

choros(
  bam_fname,
  transcript_fa_fname,
  transcript_length_fname,
  offsets_fname,
  expt_dir = ".",
  save_intermediate = T,
  extra_args = 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 offset / A site assignment rules .txt file

expt_dir

character; file path to directory to save output/intermediate files

save_intermediate

logical; whether to save intermediate files (if FALSE, only save alignment file with corrected weights)

extra_args

named list; additional parameters to pass onto internal functions

Value

A list containing: data frame of all RPF alignments with bias- corrected counts; data frame used for training the regression model; regression coefficients from the model fit; and a list of generated plots (diagnostic plot of RPF lengths and frames; bias evaluation per-codon and per-nucleotide position before and after bias correction)


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