Learn R Programming

alphabetr (version 0.2.2)

read_alphabetr: Read in alphabetr sequencing data into the binary matrix form needed by bagpipe()

Description

read_alphabetr() will read in two different forms of a csv file to convert sequencing data using the alphabetr approach into the binary matrices required by bagpipe. The csv file(s) can have one of two forms. (1) A single csv file with three columns: column 1 containing whether the sequence is "TCRA" or "TCRB"; column 2 containing the well number; and column 3 containing the CDR3 sequence (2) Two CSV files, one for TCRA and one for TCRB, with two columns: column 1 containing the well number and column 2 containing the CDR3 sequence

Usage

read_alphabetr(data = NULL, data_alpha = NULL, data_beta = NULL)

Arguments

data
To read in a 3-column csv file containing both TCRA and TCRB sequencing information
data_alpha
To read in a 2-column csv file containing TCRA sequencing information. Must be used in conjunction with the data_beta argument and cannot be used with the data argument.
data_beta
To read in a 2-column csv file containing TCRB sequencing information. Must be used in conjunction with the data_alpha argument and cannot eb used with the data argument.

Value

A list of two binary matrices that represent the sequencing data and two character vectors that give the CDR3 sequences associated with each chain index.

Examples

Run this code
## Not run: 
#   dat <- read_alphabetr(data = "alphabetr_data.csv")
# 
#   # saving the alpha and beta binary matrices
#   data_alpha <- dat$alpha
#   data_beta  <- dat$beta
# 
#   # finding the cdr3 sequences of alpha_2 and beta_4 respectively
#   cdr3_alpha2 <- dat$alpha_lib[2]
#   cdr3_beta4  <- dat$beta_lib[4]
# ## End(Not run)

Run the code above in your browser using DataLab