Package 'uncleR'

Title: an R package for parsing UNcle data
Description: UNcleR is an R package for parsing data exported from Unchained Labs UNcle instruments for the purpose of downstream analysis of biologics stability data.
Authors: Eric Hunt [aut, cre]
Maintainer: Eric Hunt <[email protected]>
License: MIT + file LICENSE
Version: 0.1
Built: 2024-11-08 04:58:34 UTC
Source: https://github.com/eric-hunt/uncleR

Help Index


Join user-defined metadata from 'uncleR::get_meta' function to imported Uncle data

Description

add_meta

Usage

add_meta(data, meta)

Arguments

data

a dataframe to assign metadata to

meta

a named list of tibbles containing metadata for experiments imported from 'uncleR::get_meta' function defaults to c("well")

Value

a dataframe with metadata added as new variables, matched according to well


Consolidates Uncle Experiments

Description

This function consolidates experiments for a protein based on directory hierarchy. The hierarchy should be as follows from within the working directory where these functions will be executed:

Usage

consolidate_experiments(
  prot_dir,
  join_vars = NULL,
  legacy = FALSE,
  SLSheader = TRUE,
  DLSheader = FALSE
)

Arguments

prot_dir

a character string identical to subdirectory name of working directory where the experiment "Exports" folder is located for the protein being analyzed

legacy

a boolean value, TRUE if individual SLS/DLS spectra files were exported, FALSE if SLS/DLS "bundle" files were exported; default is FALSE

SLSheader

sets header argument for uncleR::import_SLSsum; defaults to TRUE

DLSheader

sets header argument for uncleR::import_DLSsum; defaults to FALSE

Details

<wd>/ <prot_dir>/ "Exports"/ "General Screen" "pH Screen" ...

The prot_dir argument should match the name of the protein subdirectory within the working directory. This is deliberate as it forces the user to make a coherent choice about which data to process. Exported summary and spectra should be contained within named subdirectories of a directory named "Exports" located within the prot_dir directory.

consolidate_experiments

Value

a named list of dataframes containing the consolidated data for each experiment


Get metadata from unified Excel document

Description

get_meta

Usage

get_meta(path)

Arguments

path

a character string path to an Excel document containing metadata for each experiment in separate worksheets defaults to c("well")

Value

a named list of tibbles containing metadata for experiments


Import Uncle DLS spectra into R

Description

import_DLSspec

Usage

import_DLSspec(
  directory_path,
  pattern = NULL,
  type = NA,
  header = TRUE,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex pattern for further selecing files in the directory; defaults to NULL to force user input that discriminates intensity from mass DLS files

type

a character string, "C", "I", or "M", to signify if the data is correlation function, intensity, or mass distribution DLS spectra

header

if TRUE skips first 3 rows of .xlsx file to remove Uncle header; default is TRUE

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Import Uncle Tm/Tagg DLS summary into R

Description

import_DLSsum

Usage

import_DLSsum(
  directory_path,
  pattern = "DLS Sum",
  sheet = NULL,
  temp_cutoff = 25,
  header = FALSE,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex pattern for further selecing files in the directory, defaults to "DLS Sum"

sheet

character string to specify sheet if multi-sheet workbook is exported

temp_cutoff

numeric value, excluding all DLS data obtained at temperatures above this value, default is 100 (°C)

header

if TRUE skips first 4 rows of .xlsx file to remove Uncle header, default is FALSE

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Import dynamic Uncle spectra (DLS) into R

Description

import_dynamicBundle

Usage

import_dynamicBundle(
  directory_path,
  pattern = "DLS Bundle",
  skip = 2,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex for narrowing selection of files in the 'directory_path'; defaults to "DLS Bundle"

skip

number of rows of embedded run metadata in the .xlsx file to remove; default is 2

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Details

Note: This import function will only import DLS spectra performed at the beginning of the temperature ramp, i.e. the lowest temperature.

Value

a named (with filename) list of dataframes or a single merged dataframe


Import Uncle fluorescence spectra into R

Description

import_FLUORspec

Usage

import_FLUORspec(
  directory_path,
  pattern = "Tm Spec",
  header = TRUE,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex pattern for further selecing files in the directory; defaults to "Tm Spec"

header

if TRUE skips first 3 rows of .xlsx file to remove Uncle header; default is TRUE

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Import Uncle Tagg spectra into R

Description

import_SLSspec

Usage

import_SLSspec(
  directory_path,
  pattern = "SLS Spec",
  lambda = 266,
  header = TRUE,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex pattern for further selecing files in the directory; defaults to SLS Spec

lambda

a number value representing wavelength for Tagg spectra, typically 266nm for small aggregates and 473nm for large aggregates; default is 266nm

header

if TRUE skips first 1 rows of .xlsx file to remove Uncle header; default is TRUE

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Import Uncle Tm/Tagg SLS summary into R

Description

import_SLSsum

Usage

import_SLSsum(
  directory_path,
  pattern = "SLS Sum",
  sheet = NULL,
  header = FALSE,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex pattern for further selecing files in the directory; defaults to "SLS Sum"

sheet

character string to specify sheet if multi-sheet workbook is exported

header

if TRUE skips first 4 rows of .xlsx file to remove Uncle header; default is FALSE

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Import static Uncle spectra (nanoDSF and SLS) into R

Description

import_staticBundle

Usage

import_staticBundle(
  directory_path,
  pattern = "SLS Bundle",
  skip = 3,
  combine = TRUE
)

Arguments

directory_path

a path to a directory containing the exported .xlsx files

pattern

a regex for narrowing selection of files in the 'directory_path'; defaults to "SLS Bundle"

skip

number of rows of embedded run metadata in the .xlsx file to remove; default is 3

combine

if TRUE, returns all imported data merged into one unified dataframe with an "origin" column listing the original file path, FALSE will return a list of dataframes; default is TRUE

Value

a named (with filename) list of dataframes or a single merged dataframe


Joins imported and parsed DLS and Tm/Tagg SLS summary dataframes from the same experiment

Description

join_SLS_DLS

Usage

join_SLS_DLS(SLS_data, DLS_data, .by = c("well", "sample_num", "prot_conc"))

Arguments

SLS_data

a dataframe object containing SLS data

DLS_data

a dataframe object containing DLS data

.by

a character vector of variable names by which to join tables; defaults to c("well", "sample_num", "prot_conc")

Value

a dataframe