Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addReproduciblePeakSet error #2266

Open
superSXB opened this issue Feb 19, 2025 · 3 comments
Open

addReproduciblePeakSet error #2266

superSXB opened this issue Feb 19, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@superSXB
Copy link

Hello, recently when I was using ArchR and reached the step of "proj_sub <- addReproduciblePeakSet(ArchRProj = proj, groupBy = 'celltype', genomeSize = 2.78e9)", I encountered a situation where the summit.bed file was not successfully generated. This file should be generated by masc2 when it reads the insertions.bed file. However, the summit.bed file was not successfully generated, and ArchR continued to execute, resulting in an error. I have now determined that my macs2 should be fine because I can successfully run other projects. I also tried reducing the number of threads in "addArchRThreads(threads = 20)", but it still didn't work. I am conducting the analysis on a large computing node, and I'm sure that there is sufficient memory. The same steps work for my other projects, but occasionally I encounter this error. After encountering this error, I can only import the peakset generated by cellranger, which I think is not very accurate. So I would like to ask if you have any solutions. I'm eager to know the solution. I would be extremely grateful if you could reply.

@superSXB superSXB added the bug Something isn't working label Feb 19, 2025
@immanuelazn
Copy link
Collaborator

Hi @superSXB! 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.

If you are getting an error, it is likely due to 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.

@immanuelazn
Copy link
Collaborator

Hi @superSXB , just to be sure, are you running this with ArchR 1.0.3? Also can you share your log file as well? I think what would be good is to determine whether the insertion beds are being generated correctly, and whether the issue is with our handling of your inputs/outputs, or something else.

Maybe first try doing the following:

coverageMetadata <- .getCoverageMetadata(ArchRProj = ArchRProj, groupBy = "celltype")
coverageFiles <- coverageMetadata$File
bedFile <- file.path(bedDir, paste0(make.names(basename(names(coverageFiles)[i])),"-",i,".insertions.bed"))
o <- .writeCoverageToBed(coverageFiles[i], bedFile, excludeChr = c("chrM","chrY"), logFile = createLogFile("addReproduciblePeakSet"))

Then see if you can manually run macs2 on these files.

@superSXB
Copy link
Author

First of all, I'm using version 1.0.2. I'm sorry that my log file was accidentally deleted because it was originally written in the main path. However, my problem is the same as Issue #2162. It can be basically determined that it's a problem with macs2. The insertion beds file was generated normally, and running macs2 manually also works fine. But it fails to return to the ArchR project. Strangely, I succeeded when I did this for all cells. When I extracted certain cell types and did it for the second time, this problem occurred. I have now solved this problem in the following way: idx <- getCellNames(proj), which gives me the barcodes of the cells I want to filter. Then I copied the original arrow file to another completely isolated path. Then, I created a newproj. After that, newproj <- proj[idx,], which extracts the corresponding cells. And then newprojcelltype. In this way, when I perform addReproduciblePeakSet in a completely isolated path, I can successfully generate the peakset. Thank you. I'm really curious about why this is the case.

嗨,可以肯定的是,您是否使用 ArchR 1.0.3 运行它?您也可以共享您的日志文件吗?我认为最好确定插入床是否正确生成,以及问题是我们如何处理您的输入/输出,还是其他原因。

也许首先尝试执行以下作:

coverageMetadata <- .getCoverageMetadata(ArchRProj = ArchRProj, groupBy = "celltype")
coverageFiles <- coverageMetadata$File
bedFile <- file.path(bedDir, paste0(make.names(basename(names(coverageFiles)[i])),"-",i,".insertions.bed"))
o <- .writeCoverageToBed(coverageFiles[i], bedFile, excludeChr = c("chrM","chrY"), logFile = createLogFile("addReproduciblePeakSet"))

然后查看是否可以在这些文件上手动运行 macs2。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants