getCoverage: Count gene conversion events which cover/start at every DNA...

View source: R/getCoverage.R

getCoverageR Documentation

Count gene conversion events which cover/start at every DNA position along the germline

Description

This function counts how often gene conversion events (partitioned by different combinations of values in column1 and column2 of db) cover/start at every DNA position along the V gene.

Usage

getCoverage(
  db,
  column1,
  column2,
  start_col,
  end_col = NULL,
  type = c("coverage", "start")
)

Arguments

db

data.frame, output from batchConvertAnalysis.

column1

optional, character corresponding to a column name in db. If supplied, calculation of coverage will be considered separately for every unique value in column1 of the data frame tb so that histograms can be plotted separately.

column2

optional, character corresponding to a column name in db. If supplied, calculation of coverage will be considered separately for every unique value in column2 of the data frame tb so that histograms can be plotted separately.

start_col

character, column in db which gives the start position.

end_col

character, column in db which gives the end position. Not used when type == 'start'.

type

character, either 'coverage' (i.e. how often is a given DNA position included within gene conversion events?) or 'start' (i.e. how often do gene conversion events start at a given DNA position?).

Value

A data.frame with three columns:

position

numeric, DNA position

value

numeric, if type =='coverage' the proportion of gene conversion events which cover the given position. If type == 'start', the proportion of events which begin at the given position.

region

character, either 'FWR' (framework) or 'CDR'. Follows the standard IMGT numbering; the region is inferred from the position column.


Fraternalilab/BrepConvert documentation built on Oct. 14, 2022, 5:54 p.m.