as.PAC: Converts an S3 PAC into a S4 PAC

View source: R/seqpac_S4classes.R

as.PACR Documentation

Converts an S3 PAC into a S4 PAC

Description

as.PAC Converts an S3 PAC object (list) to an S4 PAC object

Usage

as.PAC(from)

Arguments

from

S3 PAC-object containing at least a Pheno table with samples as row names, Anno table with sequences as row names and a Count table with raw counts (columns=samples, rows=sequences).

Details

Seqpac comes with two versions of the PAC object, either S4 or S3. The S3 PAC is simply a list where each object can be received using the $-sign. The S4 version is a newer type of R object with predefined slots, that is received using the @-sign. This function converts an S3 PAC object (list) to an S4 PAC object. You can also use the S4 coercion method "as" to turn an S4 PAC into an S3. See examples below.

Value

An S4 PAC object.

See Also

https://github.com/Danis102 for updates on the current package.

Other PAC analysis: PAC_covplot(), PAC_deseq(), PAC_filter(), PAC_filtsep(), PAC_gtf(), PAC_jitter(), PAC_mapper(), PAC_nbias(), PAC_norm(), PAC_pca(), PAC_pie(), PAC_saturation(), PAC_sizedist(), PAC_stackbar(), PAC_summary(), PAC_trna(), filtsep_bin(), map_rangetype(), tRNA_class()

Examples

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)



Danis102/seqpac documentation built on Aug. 26, 2023, 10:15 a.m.