jfnavarro / st_viewer

A GUI tool for easy and smooth visualisation and analysis of Spatial Transcriptomics datasets
Other
11 stars 14 forks source link

Crash On Windows When Using DEA #29

Closed bminie closed 6 years ago

bminie commented 6 years ago

When attempting to use the viewer on a Windows machine, when I tried to run the DEA of two data sets it gets hung up when the DEA window first opens (see image below). When I click the run button, the viewer crashes within a few seconds with a C++ runtime error. I have tried this on the viewer installs built both from source and using the packaged installer and the error occurs each time. I uninstalled and reinstalled R a few times but still no luck.

Thanks, Brian differentialexpression_hangup

jfnavarro commented 6 years ago

Hi! Thanks for reporting! Do the other R related features work on your windows? Like the clustering, correlation of QC plots? If it is only the DEA what causes you problem could you share the selections that you are using?

bminie commented 6 years ago

I've been able to run the tSNE analysis as well as transcript heat mappings. I haven't tried the correlation of QC plots as of yet. What would be the best way to share the selections that I have been using?

image

image

Thanks, Brian

jfnavarro commented 6 years ago

Okay, what R version are you running? Can you load the DESEq2 library manually?

bminie commented 6 years ago

I'm currently running R 3.4.4. When I attempt to load the DESeq2 library in the R terminal I get the output which I put in the attached file. I installed that library a couple of times and the second time I did it I pulled in all the dependencies as well.

DESeq2_load_console.txt

bminie commented 6 years ago

The same crash happens when I try to use the SCRAN normalization as well. I get the following output when loading SCRAN from the R console:

library("scran") Loading required package: BiocParallel Loading required package: SingleCellExperiment

jfnavarro commented 6 years ago

Is it really a crash? The file that you attached seems to be truncated and there doesn't seem to be an problem loading those packages as far as I can tell.

bminie commented 6 years ago

Here is what I see when I try to run the DEA and the viewer force closes. I also attached a zip file containing the two data sets I am trying to run a DEA on. image

LIB-018372rd1_rerun.zip

jfnavarro commented 6 years ago

I had some time to look into this today. It seems like your selections contain a lot of zero inflated genes so DESeq2 fails to normalize the data. You can either use more strict thresholds or use SCRAN for normalization. I will close this issue, okay?

bminie commented 6 years ago

When you say zero inflated genes, does that means that when the selections were made genes that had zero counts were included in the selection? Before running the differential expression on those same two selections, if I increased the threshold to something like 2 or 5 should that fix the issue? I also wanted to let you know that I got the viewer running on an Ubuntu instance on AWS and validated all functionality. If you are interested I could send along info about what I did to get it up and running.

jfnavarro commented 6 years ago

Of course the genes with a count of zero are included (not with a count of zero in all the spots obviously)....By that I mean that there are genes that have an expression > 0 in very few spots. DESeq2 will not be able to compute size factors in such a scenario, you would get the same error if you load your 2 selections in R and try to compute the DESeq2 size factors manually. You will have to play with the thresholds until you remove the "problematic" genes. I cannot tell you what values to use, you would have to either try few values or plot the distribution of the genes counts per spot so to see what values would be good for the thresholds. Alternatively, you can just normalise with SCRAN which is less sensible to this effect and will require less strict thresholding. Great that you did that :) I already made instructions on how to build it on Linux and there is even a docker container file with instructions. I think it should be enough but feel free to send a pull a request if you see something missing in the README.

bminie commented 6 years ago

Unfortunately I'm still running into the application crash when trying to use either DESeq2 or scran for normalization. I tested out the viewer with the MOB 5 replicate to see if I hit the same error as when running out data set through and the viewer still crashes. Below is a screen shot of the viewer when it closes along with the exported traces from the R console when loading the DESeq2 and scran libraries.

image DESeq2_Load.txt scran_Load.txt

jfnavarro commented 6 years ago

Try version 0.7.1 which I released yesterday and make sure you run R 3.4.4.

bminie commented 6 years ago

With the new installer I was able to get the viewer fully functioning on one computer but when I tried to do a fresh install on a new computer I receive an error any time I tried to load a data set. The error says there is an error when importing the image, I see the genes and spots on the left but the image area is a black square with the error message in the middle.

jfnavarro commented 6 years ago

Good :) I dont know about the other computer...the files may be corrupted or you may not have free space...try and open a new issue if you still have problems. I will close this issue.

bminie commented 6 years ago

The image fail did happen on a laptop while it has been working on a tower. Can you recommend any specs for a computer for running the viewer?

jfnavarro commented 6 years ago

Well, you need some RAM memory to load up the high resolution images...