Skip to content

Error in "plotTSSEnrichment" #252

@linhch5

Description

@linhch5

Attach your log file
ArchR has a built-in logging functionality for all complex functions. You MUST attach your log file (indicated in the console output) to this issue
ArchR-plotTSSEnrichment-1b483d685a8-Date-2020-07-20_Time-22-03-06.log
. Just drag and drop it here.

Describe the bug
I got a wrong TSSenrichment plot include just one normal line with 2 peaks and the other two lines almost straight. I am confused by the result. Is there anyone can help me? Thanks very much!

Screenshots
If applicable, add screenshots to help explain your problem.
image

Activity

jgranja24

jgranja24 commented on Jul 22, 2020

@jgranja24
Contributor

Hmmm I think this has happened for some other people. I will look into this sorry for the delay.

rcorces

rcorces commented on Aug 11, 2020

@rcorces
Collaborator

I'm assuming that this is related to running on windows. Windows is not supported and its not possible for us to troubleshoot this. I'm closing this issue.

Carota-1

Carota-1 commented on Aug 14, 2020

@Carota-1

I got the same issue when running in linux.

rcorces

rcorces commented on Aug 14, 2020

@rcorces
Collaborator

Can you try running with 1 thread and see if this solves the problem?

Carota-1

Carota-1 commented on Aug 17, 2020

@Carota-1

Thank you for your answer, but the issue still still exists when I use a thread.

jgranja24

jgranja24 commented on Oct 28, 2020

@jgranja24
Contributor

Sorry for the delays @Carota-1.

Can you try with the new release branch. I added more stability and logging and more features --

For Example

#New Release Branch
devtools::install_github("GreenleafLab/ArchR", ref="release_1.0.0", repos = BiocManager::repositories())

library(ArchR)
proj <- getTestProject()

p <- plotTSSEnrichment(ArchRProj = proj, groupBy = "Clusters")
plotPDF(p)

p <- plotFragmentSizes(ArchRProj = proj, groupBy = "Clusters")
plotPDF(p)

Screen Shot 2020-10-28 at 3 36 24 PM

Screen Shot 2020-10-28 at 3 36 27 PM

rcorces

rcorces commented on Nov 21, 2020

@rcorces
Collaborator

Closing due to inactivity. Feel free to post to this thread if the problem can be reproduced with the latest version of ArchR and we will re-open the issue.

zhijunyuu

zhijunyuu commented on Nov 24, 2020

@zhijunyuu

Sorry for the delays @Carota-1.

Can you try with the new release branch. I added more stability and logging and more features --

For Example

#New Release Branch
devtools::install_github("GreenleafLab/ArchR", ref="release_1.0.0", repos = BiocManager::repositories())

library(ArchR)
proj <- getTestProject()

p <- plotTSSEnrichment(ArchRProj = proj, groupBy = "Clusters")
plotPDF(p)

p <- plotFragmentSizes(ArchRProj = proj, groupBy = "Clusters")
plotPDF(p)
Screen Shot 2020-10-28 at 3 36 24 PM Screen Shot 2020-10-28 at 3 36 27 PM

I got the same issue running on linux and using the 1.0.0 version of ArchR. Also tried 1 thread, it didn't help.

rcorces

rcorces commented on Nov 24, 2020

@rcorces
Collaborator

@zhijunyuu - Can you provide a log file?

18 remaining items

Kaivalyamolugu

Kaivalyamolugu commented on Mar 11, 2021

@Kaivalyamolugu

Hello all, Thank you for your suggestions. I set the ArchR threads = 16 by running force = TRUE and that worked. Attached is the beautiful new plot! It does look like it's something to do with the threads?

Thanks,
Kaivalya
image

rcorces

rcorces commented on Mar 11, 2021

@rcorces
Collaborator

@Kaivalyamolugu - Thanks for confirming this. You are correct - there is something funky going on when threads = 1 in this function. I can recapitulate this error when I set threads = 1

proj <- getTestProject()
addArchRThreads(threads = 1)
plotTSSEnrichment(ArchRProj = proj, groupBy = "Clusters")

image

This is calculated incorrectly within the function and (unsurprisingly) when you use returnDF = TRUE the data frame object is incorrect as well:

> df1 <- plotTSSEnrichment(ArchRProj = proj, groupBy = "Clusters", returnDF = TRUE)
> df1[which(df1$x == 0),]
DataFrame with 5 rows and 5 columns
        group         x     value          normValue       smoothValue
  <character> <numeric> <integer>          <numeric>         <numeric>
1          C1         0       918   21.4182240278584  21.0873423732391
2          C2         0         7 0.0694334780892223 0.081156013351039
3          C3         0        21  0.696764608781776 0.811383895074882
4          C4         0        29  0.883315653886953 0.863932551764041
5          C5         0        14   1.37268292682927  1.22115299334812

I havent figured out where the problem is in the code but @jgranja24 will figure it out

Kaivalyamolugu

Kaivalyamolugu commented on Mar 11, 2021

@Kaivalyamolugu

Hello again, My R is crashing since I've set the threads to 16. Do you think it would be okay to set the threads to 1 for the rest of the code and set to 16 only for the TSS enrichment plot step?
Thanks,
Kaivalya

rcorces

rcorces commented on Mar 11, 2021

@rcorces
Collaborator

@Kaivalyamolugu - according to your logfile, ArchR only really detects 3 cores on your machine. The error with threads = 1 should be limited to plotTSSEnrichment(). Try threads = 2 though. this should be fine on your system.

Kaivalyamolugu

Kaivalyamolugu commented on Mar 11, 2021

@Kaivalyamolugu

Thank you for letting me know!

sqs1020

sqs1020 commented on Jan 20, 2022

@sqs1020

Hello, I am also getting the same problem on my 6 samples. I cannot use any other threads except for threads = 1. I am using macOS.
image

image

rcorces

rcorces commented on Jan 20, 2022

@rcorces
Collaborator

@sqs1020 - I believe your problem is unrelated. see #1145 (comment)
just run library(parallel) before using ArchR when using threads > 1

sqs1020

sqs1020 commented on Jan 20, 2022

@sqs1020

@sqs1020 - I believe your problem is unrelated. see #1145 (comment) just run library(parallel) before using ArchR when using threads > 1

Thanks for the reply. My innitial problem is related, that is asscociated with the "plotTSSEnrichment" function (see attached scrreenshot). And then I found this ticket and read the comments. People are saysing using different threads can solve the problem and that's why I have the problem trying different threads. Thank you!
image

sqs1020

sqs1020 commented on Jan 20, 2022

@sqs1020

library(parallel)

After using library(parallel) and trying threads = 6 , the problem solved. Thanks again!
image

added a commit that references this issue on Mar 30, 2022
rcorces

rcorces commented on May 21, 2022

@rcorces
Collaborator

This issue has finally been fixed via 506161d in release_1.0.2. It was a C++ bug.

rcorces

rcorces commented on May 21, 2022

@rcorces
Collaborator
> addArchRThreads(threads = 1)
Setting default number of Parallel threads to 1.
> plotTSSEnrichment(ArchRProj = proj, groupBy = "Clusters")
ArchR logging to : ArchRLogs/ArchR-plotTSSEnrichment-2f2e58d1b16f-Date-2022-05-21_Time-05-53-46.log
If there is an issue, please report to github with logFile!
2022-05-21 05:53:46 : C1 Computing TSS (1 of 5)!, 0.003 mins elapsed.
2022-05-21 05:53:47 : C1 Finished Computing TSS (1 of 5)!, 0.015 mins elapsed.
2022-05-21 05:53:47 : C2 Computing TSS (2 of 5)!, 0.017 mins elapsed.
2022-05-21 05:53:48 : C2 Finished Computing TSS (2 of 5)!, 0.024 mins elapsed.
2022-05-21 05:53:48 : C3 Computing TSS (3 of 5)!, 0.024 mins elapsed.
2022-05-21 05:53:48 : C3 Finished Computing TSS (3 of 5)!, 0.034 mins elapsed.
2022-05-21 05:53:48 : C4 Computing TSS (4 of 5)!, 0.034 mins elapsed.
2022-05-21 05:53:49 : C4 Finished Computing TSS (4 of 5)!, 0.044 mins elapsed.
2022-05-21 05:53:49 : C5 Computing TSS (5 of 5)!, 0.044 mins elapsed.
2022-05-21 05:53:49 : C5 Finished Computing TSS (5 of 5)!, 0.052 mins elapsed.
ArchR logging successful to : ArchRLogs/ArchR-plotTSSEnrichment-2f2e58d1b16f-Date-2022-05-21_Time-05-53-46.log
> 

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @rcorces@jgranja24@Kaivalyamolugu@sqs1020@Carota-1

      Issue actions

        Error in "plotTSSEnrichment" · Issue #252 · GreenleafLab/ArchR