Load well-level data written to binary format
load_well_counts_binary.RdThis function loads well-level data written to binary files (.parquet and .rds)
by the write_well_data_to_binary() function. The data contains
sparse matrices (well x clone) of read counts for TCRalpha and TCRbeta
along with metadata data frames for each clone.
Data loaded this way can be used as input to the plot_tshell() function.
Arguments
- folder
the directory with ".parquet" and ".rds" files written by
write_well_data_to_binary()- prefix
a prefix with the sample name that will be prepended to the output file names
- lazy
whether to "lazy load" the clone metadata files. This can speed up loading because these files are usually very large (default is TRUE).
Value
This function returns a list with the following elements:
alpha- a sparse matrix ("dgCMatrix") of TCRalpha read counts in column-oriented format. SeeMatrix::`dgCMatrix-class`()beta- a sparse matrix ("dgCMatrix") of TCRbeta read counts in column-oriented format. SeeMatrix::`dgCMatrix-class`()alpha_meta- a data frame of clone metadata for TCRalpha clones. Row i relates to column i ofalpha.beta_meta- a data frame of clone metadata for TCRbeta clones. Row i relates to column i ofbeta.col_meta- a data frame of well metadata (i.e. well names)alpha_meta_file- the file for the TCRalpha clone metadatabeta_meta_file- the file for the TCRbeta clone metadata