GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
363 stars 129 forks source link

Continuing through after error ggplot for Fragment Size Distribution #2121

Open hira-anis opened 4 months ago

hira-anis commented 4 months ago

Continuing through after error ggplot for Fragment Size Distribution

Hey team! First of all thank you for everything that you do and the package! @rcorces @jgranja24 @jeffmgranja

Describe the bug ggplot in ArrowFiles throws an error. Was working perfectly fine like 2 days ago? Recent changes: installed gfortran to troubleshoot Matrix+irlba issue on MAC OS. Installed Matrix and irlba from source.

To reproduce this issue using the tutorial hematopoiesis, remove the minTSS and min Frags

Expected behavior Arrow files should create a directory called Quality control that is expected to have QC plots. They were all damaged files.

I installed the packages ggrastr and Cairo based on previous discussion I already have XQuartz on my system, i can and do use X11. However, the package was weirdly not available?

Screenshots `library(ArchR) library(ggrastr) library(Cairo) library(Matrix) library(irlba) library(ggplot2)

package.version("ArchR") [1] "1.0.3" package.version("ggrastr") "1.0.2" package.version("Cairo") "1.6-2" package.version("ggrastr") "1.0.2" package.version("irlba") "2.3.5.1" package.version("ggplot2") "3.5.0"

setwd("./for_ArchR_github")

inputFiles <- getTutorialData("Hematopoiesis") inputFiles addArchRGenome("hg38") addArchRThreads(threads = 1)

ArrowFiles <- createArrowFiles( inputFiles = inputFiles, sampleNames = names(inputFiles), addTileMat = TRUE, addGeneScoreMat = TRUE )

Cairo::Cairo(type='raster'); dev.off() The output RStudioGD 2

session_info() writeLines(capture.output(sessionInfo()), "sessionInfo.txt")`

Session Info sessionInfo.txt ArchR-createArrows-fac07e91819e-Date-2024-02-25_Time-13-32-55.log

Additional context I tried my best to explain the issue. Please let me know if there is anything else that's needed. Thank you once again.

rcorces commented 4 months ago

Hi @hira-anis! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
It is worth noting that there are very few actual bugs in ArchR. If you are getting an error, it is probably something specific to your dataset, usage, or computational environment, all of which are extremely challenging to troubleshoot. As such, we require reproducible examples (preferably using the tutorial dataset) from users who want assistance. If you cannot reproduce your error, we will not be able to help. Before going through the work of making a reproducible example, search the previous Issues, Discussions, function definitions, or the ArchR manual and you will likely find the answers you are looking for. If your post does not contain a reproducible example, it is unlikely to receive a response.
In addition to a reproducible example, you must do the following things before we help you, unless your original post already contained this information: 1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Did you post your log file? If not, add it now. 3.__ Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

hira-anis commented 4 months ago

Update: I ended up updating my MAC OS, Uninstalling and reinstalling R, uninstalling and reinstalling ArchR,Matrix (from source),irlba (from source), ggrastr, ggplot2 and Cairo. I also have XQuartz on my system.

I created a test code to check if ggplot2 and ggrastr are working.

Test cases

plot <- ggplot(df, aes(x = x, y = y)) + geom_point() plot

rasterize(plot, layers='Point', dpi=50)

Cairo::Cairo(type='raster'); dev.off() X11()

These work fine.

Here is the updated session info! Awaiting your response. Incase there is a way to bypass this. sessionInfo.txt

juliabelk commented 3 months ago

For me, downgrading specifically ggplot fixed this. This worked for me: conda install conda-forge::r-ggplot2=3.3

sshuklz commented 3 months ago

Had the same problem as well, downgrading ggplot2 to 3.3 also worked for me.

lzj1769 commented 2 months ago

FYI, ggplot=3.4 also fixes this issue.