CELP_detect_bias | R Documentation |
Function to compute codon-level stalling bias coefficients using the CELP (Consistent Excess of Loess Preds) method
CELP_detect_bias(tr_codon_read_count_list, loess_method = "interpolate", codon_raduis = 5)
tr_codon_read_count_list |
A list generated by |
loess_method |
Determines whether the fitted surface should be computed exactly ("direct") or via interpolation from a kd tree ("interpolate"). A third option is "none" which means than raw observed counts to calculate the bias coefficient (no loess). Default: "interpolate". |
codon_radius |
Number of codons on either side of each codon influencing the loess prediction for the middle codon. Default: 5. |
This function starts with running a loess curve on per-codon read counts along the transcript to borrow information from neighboring codons mitigating the uncertainty of p-site offset assignment and experimental stochasticity. Loess span parameter is calculated from the user-defined codon radius and CDS length. Then, a bias coefficient is calculated for each codon by integrating information on the excess of loess-predicted read counts at that codon comapred to the transcript's background across all samples. Finally, loess predicted counts read counts are divided by bias coefficients to calculate bias-corrected counts. The "direct" fitting method takes longer to complete but does not run into kd-tree-related memory issues. The loess_method "none" option is included mainly to enable comparison and show effectiveness of using loess in finding bona fide bias positions. It is NOT recommended for actual bias detection.
A list of data frames (one per transcript) containing codon-level bias coefficients. It has the following structure: list$<transcript.ID> data.frame: [1] codon_number [2] codon_type [3] aa_type [4] bias_coefficient.
bias_coeff_list_LMCN_noloess <- CELP_detect_bias(tr_codon_read_count_LMCN, loess_method = "none") bias_coeff_list_LMCN_withloess <- CELP_detect_bias(tr_codon_read_count_LMCN, loess_method = "interpolate")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.