qqwang-berkeley / JUM

A tool for annotation-free differential analysis of tissue-specific pre-mRNA alternative splicing patterns
MIT License
27 stars 11 forks source link

Error of Rscript at write.table step #41

Closed farzaneafzali closed 1 year ago

farzaneafzali commented 1 year ago

Hi, I tried several ways to get the result of Rscript step but it doesn't write the table for me. This is the error I get:

Error in write.table(dxr1, "AS_differential.txt", sep = "\t", quote = F) : 
  unimplemented type 'list' in 'EncodeElement'
Execution halted

I think it might be due to having a list but my tries for flattening the list (which I don't know which column might be) didn't work. I tried this flattening code: df <- apply(df,2,as.character) and then tried to write.csv but no luck, either.

Before that error there is a warning as well:

converting counts to integer mode
Warning message:
In DESeqDataSet(rse, design, ignoreRank = TRUE) :
  some variables in design formula are characters, converting to factors

I should also mention that I get one text file (AS_differential.txt) but it just has one row!

Can someone help to solve this issue please? Thanks a lot. :)

farzaneafzali commented 1 year ago

Solved: My data was insanely huge and consisted multi-layers of lists in the DEXSeqResults that I wasn't able to either convert to data.frame nor doing anything on it. At last, I saved the results of analysis in a .RData Image by: save.image(file='file.RData') And then opened it in a GUI Rstudio to study what's going on. My tries there to convert subsets of this result to data.frame was also not successful. At the end, I took a subset of my results less tha pvalue 0.05 and then did write.table from that.

dxr1.sig <- as.data.frame(dxr1[dxr1$pvalue < 0.05 & !is.na(dxr1$pvalue),])
write.table(dxr1.sig, "AS_differential.txt", sep="\t", quote=F)