View source: R/seqpac_S4classes.R
PAC-class | R Documentation |
S4 version of the PAC object.
PAC(Pheno, Anno, Counts, norm, summary)
Pheno |
Phenotype data.frame table with sample ID as row names and where columns are variables associated with the samples. Can be generated using the make_pheno function. |
Anno |
Annotation data.frame table with unique sequences as row names and where columns are variables associated with the sequences. |
Counts |
Counts table (data.frame) with unique sequences as row names (identical to Anno) and where columns are sample ID (identical to row names for Pheno. Should contain raw counts and can be generated using the make_counts function. |
norm |
List of data.frames. May be regarded as a "folder" with normalized counts tables. The listed data.frames must have identical sequence names as Counts/Anno (rows) and sample IDs (columns) as Counts/Pheno. Can be generated using the PAC_norm function, but seqpac functions will attempt use any normalized table stored in norm that are in agreement with the above cafeterias. |
summary |
List of data.frames, just like norm, but contains summarized raw or normalized counts (e.g. means, standard errors, fold changes). Important, the listed data.frames must have identical sequence names as Counts/Anno (rows), but columns don't need sample IDs. Can be generated using the PAC_summary function, but seqpac functions will attempt use any summarized table stored in the summary "folder". |
Just like the S3 version, all sub-tables must have identical sequence (row)
names. To extract tables from S4 objects, use the getter commands or use @
(e.g. PAC@Pheno) just like $ for the S3 version (e.g. pheno(PAC)). You may
also use a coercion method, e.g. PAC_S3 <- as(PAC_S4, "list")
Holds up to 5 slots:
data.frame > information about the samples
data.frame > sequences annotations
data.frame > sequence counts over samples
list of data.frames > normalized counts
list of data.frames > summarized counts or normalized counts
Generates a S4 PAC-object.
load(system.file("extdata", "drosophila_sRNA_pac_filt_anno.Rdata",
package = "seqpac", mustWork = TRUE))
# check type
class(pac)
isS4(pac)
# Turns S4 PAC object into a S3
pac_s3 <- as(pac, "list")
# Turns S3 PAC object into a S4
pac_s4 <- as.PAC(pac_s3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.