This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Goseq pwf nullp error

Hi all,

I got some trouble while use goseq to do enrichment analysis recently, the trouble is:

> pwf=nullp(de.data,bias.data=gene.length)
Error in if (min(fv) < lower_bound) fv = fv - min(fv) + lower_bound :
  missing value where TRUE/FALSE needed

while using nullp function to calculate probability weight, I get the errors, could somebody help me?

ps: no NA existed in dataframe de.data, length(de.data) == length(gene.length)

Thanks a lot!

pwf rna-seq r

What is your organism? How are you producing gene.length?

Hi Parham, sorry for my delay, the organism is sheep, and the gene.length is as below:

gi|426215078|ref|XM_004001756.1|        872
gi|426218478|ref|XM_004003425.1|        1143
gi|426218480|ref|XM_004003426.1|        2344
gi|426218482|ref|XM_004003427.1|        822
...
...

Did I make any errors?

Thanks a lot!

If I can help you I have to see the codes you have before pwf=nullp(de.data,bias.data=gene.length).

Hi Parham,

The codes before pwf-nullp() is as below:

library(goseq)
genes_list=read.table("gene.list",sep="\t")
de.data=as.integer(t(genes_list$V2))
names(de.data)=as.vector(t(genes_list$V1))
a=read.table("hs.fa.len",sep="\t")
gene.length<-as.vector(t(a$V2))
pwf=nullp(de.data, bias.data=gene.length)

Its not very clear to me what you are doing. One thing I can say is, do the bias.data and de.data have the same length?

Yes, no NA existed in dataframe de.data, and length(de.data) == length(gene.length)

Could you please provide an example of :

  • genes_list
  • hs.fa.len

0 answers

No answers yet.

Log in to answer this question.