Plotting after arcsinh transformation and using multiple cofactors #176
Replies: 6 comments
-
yeah. I've found make.colour.plot is always a problem. After running it (and the heatmap too) I have issues with all my plots. Not make.multi.plot for some reason. I cant seem to get it to print in a markdown document. I even have issues inserting images after running it. My work around was to create a function to automatically test a range of cofactors and use ggplot to create facet plots for all my markers (I'm using 20 markers), with one facet plot per co-factor. Then pick the appropriate co-factor for the data, and apply it to the dataset. If anyone finds a way to fix the make.colour.plot issue, id be very interested. |
Beta Was this translation helpful? Give feedback.
-
@phuongtran807 @csecarroll thanks for reaching out! I don't get the same issue, but I have a feeling I know what the issue is the As a first pass, let's try a quick test: could you try adding In terms of specifying different co-factors, you can essentially just run
Note in this case I have just picked the co-factors and channels at random, not saying these choices would be correct for this dataset. |
Beta Was this translation helpful? Give feedback.
-
Hello! Thanks for the quick response (and for the great package). So I've tried a few things out this morning. If I'm using make.colour.plot to plot say FSC and SSC, I have no issues. It outputs fine and I can also output a ggplot version afterwards with no issues. However, after using make.colour.plot to do a UMAP or tSNE plot, I no longer get the output (it opens the plot panel but it remains blank), and then I can no longer get a ggplot plot to output anymore either. if i add dev.off() it does seem to fix the problem. I was adding graphics.off() previously, which didn't fix it. They now show up in the plots pane and I can run a ggplot plot afterwards with no issues. I've been using Spectre almost daily for months now and its great to have these working. However, with the heatmaps, dev.off() doesn't seem to fix the issues with them. I seem to have an issue assigning them to an object too. for example
hm1
adding dev.off() did not fix it. Thanks for your help |
Beta Was this translation helpful? Give feedback.
-
@csecarroll now that is weird. Could you try plotting with the clustered demo dataset?
just as a sanity check for the heatmap, but for the filename you might be missing quotations? |
Beta Was this translation helpful? Give feedback.
-
yes. I've checked and i had the correct quotations (I had just removed a very specific part of the name in the github comment but it was correct in R). I also don't have any issues if I run the normal pheatmap function on exp. I'm not sure if it could be an issue with using vs code instead of R studio. I can try running it in Rstudio and see what happens. When I get some time, I'll give the demo dataset a go. thanks again. |
Beta Was this translation helpful? Give feedback.
-
@csecarroll I think I managed to replicate your problem on vs code. So after running Also, the |
Beta Was this translation helpful? Give feedback.
-
Hi!
First of all, thanks for the great package and documentation.
I am currently following the instruction 'Discovery workflow with batch alignment using CytoNorm' and was wondering how to procede if I'm choosing different cofactors for different channels. Also, I have a problem with plotting after the arcsinh transformation.
for(i in transformed.cols){
make.colour.plot(do.subsample(cell.dat, 20000), i, plot.against)
}
It runs about half an hour and then I get the warning message ('In grDevices::dev.off() : agg could not write to the given file') and no output.
It does give me an output when I'm doing it without the for-loop and by defining one specific marker tho but that would take some time with 16 different markers..
Thanks for your help!
Phuong
Beta Was this translation helpful? Give feedback.
All reactions