addMajorTrans: Add Major Trans Info to Existing abundance and count...

View source: R/utility_functions.R

addMajorTransR Documentation

Add Major Trans Info to Existing abundance and count dataframes

Description

addMajorTrans adds a binary indicator of the major trans for a given gene

Usage

addMajorTrans(
  genestouse,
  abGeneTempF,
  cntGeneTempF,
  abDatasets,
  CompMI = FALSE
)

Arguments

genestouse

A list of genenames that are in use for the compositional analysis.

abGeneTempF

data.frame of abundance information that will have the major transcript info added to it

cntGeneTempF

data.frame of count information that will have the major transcript info added to it. Usually also contains length information.

abDatasets

list of length genestouse containing genewise information per sample. Also contains the major transcript information as an attribute. Generally comes from the output of generateData.

CompMI

is a TRUE/FALSE corresponding to whether datasets for the multiple imputation based analysis are being used. This will add columns for transcripts that may be missing in the inferential replicates that were't missing in the non-inferential replicate data. Default is FALSE.

Details

addMajorTrans adds a binary indicator variable that takes a value of 1 if that transcript is the major transcript for its gene (and 0 otherwise). The major transcript is the transcript that has the highest average expression proportion across all samples for the given gene. The major transcripts are computed in generateData and input to this function via the abDatasets file.

Value

a list containing abGene and cntGene dataframes with the major transcript information added


skvanburen/CompDTUReg documentation built on Jan. 23, 2025, 9:01 a.m.