gravatar for ally

2 hours ago by

I´m using goseq package after DESeq2 analysis and I am totally new in R

When I would like to test the pwf of my DE genes, I get an error:

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("TxDb.Athaliana.BioMart.plantsmart28")

library(TxDb.Athaliana.BioMart.plantsmart28)
txdb<-TxDb.Athaliana.BioMart.plantsmart28
txsByGene=transcriptsBy(txdb,"gene")
lengthData=median(width(txsByGene))



assayed.genes <- rownames(res)
de.genes <- rownames(res)[ which(res$padj < 0.05)]
genes<-as.integer(assayed.genes%in%de.genes)
names(genes)<-row.names(res$padj)

genes
    0     1 
29357  3476 

pwf<-nullp(genes,txdb,assayed.genes,lengthData)

Error in nullp(genes, txdb, assayed.genes, lengthData) : 
bias.data vector must have the same length as DEgenes vector!

length(lengthData)=33602

length(genes)=32833

DEgenes vector in the script is genes and contains all Arabidopsis genes (32833). I did not filter for counts.

bias.data vector in the script is lengthData and contains median length values of all transcripts (33602).

Does someone knows how to solve this error? Thank you very much in advance!

link

modified 1 hour ago

by

ATpoint38k

written
2 hours ago
by

ally0



Source link