I am writing an S4 class called Expression
and would like to include an S4 object, DESeq2 = "DESeqDataSet"
as a slot:
setClass(
Class = "Expression",
representation = representation (
species = "character",
edgeR = "DGEList",
DESeq2 = "DESeqDataSet",
lengths = "matrix",
individuals = "vector",
treatments = "vector",
id = "vector",
samples = "vector",
sample_prep = "vector",
genome_type = "vector",
molecule_type = "vector",
blast_hit = "vector",
rRNA = "vector",
protein = "vector"
))
When I check the package, though, I get the following Warning:
Found the following significant warnings:
Warning: undefined slot classes in definition of "Expression": DESeq2(class "DESeqDataSet")
The class works fine (ie, there are now errors), but I would like to fix all warnings in our code.
The package with the DESeqDataSet
object (DESeq2
, also the name we have given to the slot) is imported in the package DESCRIPTION
file. Do I need to do something else to make its contents available for use in a slot? For example, I have used setOldClass()
to make S3 classes available for use in S4 slots.
Here is an example of a travis-ci build that throws the warning - https://travis-ci.org/caseywdunn/agalmar/builds/138564256
The full code that is giving the problem is at https://github.com/caseywdunn/agalmar/blob/a7c4013fcb5c924cfd6e1aa8e99f182ceec6fe20/R/utility_functions.R