Skip to content

Error in design #1

@desmodus1984

Description

@desmodus1984

Hi,
I am trying to decide whether it is worth to use lfcShrink and I am trying to use mirrorCheck.
I created a DESeq object with a metadata and a count matrix.

miRNA.Dec22.cetaceans <- DESeqDataSetFromMatrix(countData = subset.miRNA.Dec.22.cetaceans,
                                             colData = subset.metadata.Dec.22,
                                             design = ~ sp)

Then, I used sva to find surrogate variables and I added them to the design.

mod <- model.matrix(~ sp, colData(miRNA.Dec22.cetaceans))
mod0 <- model.matrix(~ 1, colData(miRNA.Dec22.cetaceans))

svseq <- svaseq(dat, mod, mod0,B=10)
miRNA.Dec22.cetaceans_sva <- miRNA.Dec22.cetaceans
miRNA.Dec22.cetaceans_sva$SV1 <- svseq$sv[,1]
miRNA.Dec22.cetaceans_sva$SV2 <- svseq$sv[,2]
miRNA.Dec22.cetaceans_sva$SV3 <- svseq$sv[,3]
design(miRNA.Dec22.cetaceans_sva) <- ~ SV1 + SV2 + SV3 + sp

When I did lfcshrink, the LFC values shrunk and the miRNAs that were previously meeting enough LFC (abs()>=0.5), didn't any more.
Before
baseMean log2FoldChange lfcSE stat pvalue padj

hsa-miR-122-5p 217.373 -3.71737 1.83422 29.9837 3.95900e-05 0.01621210
hsa-miR-1-3p 363.626 -3.16970 2.17947 33.0295 1.03496e-05 0.00847631

After
baseMean log2FoldChange lfcSE pvalue padj

hsa-miR-122-5p 217.373 1.10653e-07 0.00144269 3.95900e-05 0.01621210
hsa-miR-1-3p 363.626 -2.85928e-07 0.00144270 1.03496e-05 0.00847631

I tried running mirrorCheck and it failed:

run_DESeq_all_contrasts(  miRNA.Dec22.cetaceans_sva,
+                           folder = results,
+                            mode = "apeglm",
+                            condition="sp",
+                            rowname2symbol = NULL,
+                            heatmap.annotation.col = NULL,
+                            p.cutoff = 0.1,
+                            fc.cutoff = 0.5,
+                            top.n = 50,
+                            useDingbats = F,
+                            print.all = F
+ )

Error in file.path(folder) :
cannot coerce type 'closure' to vector of type 'character'

Any reason, why this happened?
sp, isn't recognized.

run_DESeq_all_contrasts(  miRNA.Dec22.cetaceans_sva,
+                           folder = results,
+                            mode = "apeglm",
+                            condition=sp,
+                            rowname2symbol = NULL,
+                            heatmap.annotation.col = NULL,
+                            p.cutoff = 0.1,
+                            fc.cutoff = 0.5,
+                            top.n = 50,
+                            useDingbats = F,
+                            print.all = F
+ )

Error: object 'sp' not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions