thelovelab / fishpond

Differential expression and allelic analysis, nonparametric statistics
https://thelovelab.github.io/fishpond
27 stars 9 forks source link

Have all 0 LFC for all infReps, remove these first #36

Closed zhangjy859 closed 7 months ago

zhangjy859 commented 9 months ago

Hi,

I got a error when test dynamic allelic imbalance,

y <- swish(y, x="allele", pair="samples",
           cov="time", cor="pearson")
Error in swishCorPair(infRepsArray, condition, pair, covariate, cor, nperms,  : 
  5220 features have all 0 LFC for all infReps, remove these first

However, I am not sure how to remove all 0 LFC for all infReps, could you please give me more infomation?

Regrads,

Zhang

mikelove commented 9 months ago

You can use the labelKeep function… see vignette.

zhangjy859 commented 9 months ago

Hi,

I noted that, and I have run

y <- labelKeep(y)
y <- y[mcols(y)$keep,]
zhangjy859 commented 9 months ago

My full code is:

y <- importAllelicCounts(
  sample_tximeta, a1="L", a2="R",
  format="wide", tx2gene=tx2gene.1
)
y <- labelKeep(y)
y <- y[mcols(y)$keep,]

y <- fishpond::swish(y, x="allele", pair="samples",
           cov="time", cor="pearson")
mikelove commented 9 months ago

Oh right. I forgot the right code to use.

See this code chunk

https://thelovelab.github.io/fishpond/articles/allelic.html#filtering-features

zhangjy859 commented 9 months ago

Hi,

Its work well, thank you for your help

Regrads,

Zhang