Title: | an R package for wrangling capillary electrophoresis data |
---|---|
Description: | an R package for wrangling capillary electrophoresis data |
Authors: | Eric Hunt [aut, cre] |
Maintainer: | Eric Hunt <[email protected]> |
License: | none |
Version: | 0.0.0.75 |
Built: | 2024-11-08 04:58:27 UTC |
Source: | https://github.com/eric-hunt/fragr |
munge_prodify
munge_prodify(nested_df, substrate_cutoff)
munge_prodify(nested_df, substrate_cutoff)
nested_df |
a nested data frame of CE data with all peak data lying in the list column 'data' |
substrate_cutoff |
a numeric value indicating the bp size above which all peaks should represent product |
returns the data frame relative data expressed in terms of percent product formed (i.e. 100
munge_subfix
munge_subfix(nested_df)
munge_subfix(nested_df)
nested_df |
a nested data frame of CE data with all peak data lying in the list column 'data' |
returns the data frame with the product peak(s) merged into one peak
parse_activity
will determine specific and non-specific activity, expressed in terms of product formed,
uisng a capillary migration model calculated by fragr::model_migration
parse_activity( nested_df, reg_vars, reg_limit, substrate_cutoff, top_n = 5, window_size = 2 )
parse_activity( nested_df, reg_vars, reg_limit, substrate_cutoff, top_n = 5, window_size = 2 )
nested_df |
a nested data frame of CE data with all peak data lying in the list column 'data' |
reg_vars |
a named vector of numeric values from |
reg_limit |
a numeric value defining how far the product peak may deviate from the model |
substrate_cutoff |
a numeric value indicating the bp size above which all peaks should represent product |
top_n |
a numeric value for noise reduction selecting the top number of peaks to analyze by peak area, defaults to five (5) unless otherwise specified |
window_size |
a numeric value indicating the ±window around the specific peak where off-target can be called on the same strand, defaults to two (2) bp above and below "act_bp" unless otherwise specified |
The regression model variables are used to create a predictive function,
which allows parse_activity
to select the peak closest to the theoretical or predicted size
and label this peak as the specific or expected activity in relation to all activity.
The "act" variable represents the activity determined from a peak closest to the theoretical predicted size,
which is determined by the regression model variables and alllowed deviation reg_limit arguments.
The "act_bp" variable identifies the called size of the peak which was used to generate the "act" variable.
The "offsense" variable represents the sum of all other activity besides "act" on the same strand.
The "offanti" variable is only included in situations where the substate is double-stranded,
and represents the sum of all activity falling on the opposite strand as "act" and "offsense".
parse_activity
returns the nested data frame with added variables "act", "act_bp", "offsense", and "offanti"
[fragr::model_migration]
parse_migmodel
parse_migmodel( df_list, channels, search_var, search_pattern, substrate_cutoff, limit = 10 )
parse_migmodel( df_list, channels, search_var, search_pattern, substrate_cutoff, limit = 10 )
df_list |
a list of data frames containing CE data imported with |
channels |
the one letter channel/dye code(s) (as a character vector) for which to build a migration regression model |
search_var |
a metadata-containing variable which contains the theoretical product size |
search_pattern |
a regex pattern for extracting the theoretical product size 'search_var' |
substrate_cutoff |
a numeric value indicating the bp size above which all peaks should represent product |
limit |
a numeric value defining how far, in basepairs, the called value an deviate from the theoretical value, defaults to ten (10) unless otherwise specified |
returns a model plot and list of variables..
read_PeakScanner
read_PeakScanner(directory_path, pattern = NULL, type = "legacy")
read_PeakScanner(directory_path, pattern = NULL, type = "legacy")
directory_path |
a path to a directory containing the .csv files |
pattern |
a regex pattern for selecing files in the directory, defaults to reading all .csv files present |
type |
a character string, either 'legacy' or 'cloud' indicating where the file was generated (desktop app or online app); defaults to 'legacy' |
generates a named list of tibbles, each neamed element is one *combined table* named with its origin file path
read_PeakScanner_file
read_PeakScanner_file(file_path, type = "legacy")
read_PeakScanner_file(file_path, type = "legacy")
file_path |
a path to a directory containing the .csv files |
type |
a character string, either 'legacy' or 'cloud' indicating where the file was generated (desktop app or online app); defaults to 'legacy' |
generates a named list of tibbles, each neamed element is one *combined table* named with its origin file path