Class representing metadata for expression data: Design
Source:R/class_PairwiseDesign.r
PairwiseDesign.RdAn R6 class to represent metadata for expression data. It combines a pairwise design of experiments with a 2-level structure and transcriptome annotation. Specifically, it provides the following features:
Pairwise design of experiment with a 2-level structure:
Samples are regrouped into groups
Groups are regrouped into batches, where one group is designed as the control group used as a reference for pairwise comparisons
Details
For more information on how to specify the arguments, please refer to the vignette defining file formats.
Methods
Method new()
Initialize a new PairwiseDesign object.
This method initializes a new PairwiseDesign object.
The object represents metadata for expression data, including pairwise
design of experiments and transcriptome annotation.
Usage
PairwiseDesign$new(
pairwise_design_file,
src_dir = NULL,
quant_source = "kallisto"
)Arguments
pairwise_design_filePath to the pairwise design file, which must be in .yml or .csv format.
src_dirPath(s) specified only in case of csv file with the path for each run to the folder with expression files. In case of several runs defined in the design file, a named vector is required. Can be specified for YML also but only 1 value for all runs.
quant_sourceThe source of quantification files. Either "kallisto" (default) or "salmon". This determines the file patterns to look for.
Method extract_sample_names()
get sample names with simple design-based filtering
Usage
PairwiseDesign$extract_sample_names(
in_batch = NULL,
in_group = NULL,
in_run = NULL,
basename = FALSE
)Arguments
in_batchA character vector of batch codes. Select or report only samples in those batches.
in_groupA character vector of group codes. Select or report only samples in those groups.
in_runA character vector of run IDs. Select or report only samples in those runs.
basenamewhether to return the basename in place of the complete name (with run id)
Method get_pairwise_design()
get the pairwise_design table with design-based filtering
Method list_paired_id_per_sample()
get the id to be used for paired analysis per sample only return for samples in batch with a paired design
Method filter_and_set_selected_samples()
Select samples based on design. The results will be an intersect with the previous selection. You can reset the object if it's not desired.
Usage
PairwiseDesign$filter_and_set_selected_samples(
in_batch = NULL,
in_group = NULL,
in_run = NULL
)Method set_selected_samples()
Set selected samples. The results will be an intersect with the previous selection. You can reset the object if it's not desired.