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

problem with SelectTFs #23

Open
Dalhte opened this issue Jul 26, 2023 · 5 comments
Open

problem with SelectTFs #23

Dalhte opened this issue Jul 26, 2023 · 5 comments

Comments

@Dalhte
Copy link

Dalhte commented Jul 26, 2023

Hello there
I'm tryingto run ScMega on 10X multiome RNA+ATAC data obtained in Rats tissus. When I run the :
res <- SelectTFs(object = objG,
tf.assay = "chromvar",
rna.assay = "RNA",
atac.assay = "ATAC",
trajectory.name = "Trajectory",
return.heatmap = TRUE,
cor.cutoff = 0.1)
I get
Avis : No layers found matching search pattern provided
Error in GetAssayData():
! No layers are found
Here are the backtrace :
Backtrace:

  1. └─scMEGA::SelectTFs(...)
  2. ├─base::suppressMessages(...)
  3. │ └─base::withCallingHandlers(...)
  4. └─scMEGA::GetTrajectory(...)
  5. ├─SeuratObject::GetAssayData(object, assay = assay, slot = slot)
    
  6. └─SeuratObject:::GetAssayData.Seurat(object, assay = assay, slot = slot)
    
  7.   ├─SeuratObject::GetAssayData(object = object[[assay]], layer = layer)
    
  8.   └─SeuratObject:::GetAssayData.StdAssay(object = object[[assay]], layer = layer)
    
  9.     └─rlang::abort("No layers are found")
    

Can you help me, please ? Is it because I'm working with the rat genome? Or is it something else entirely?
Best
David

@Dalhte
Copy link
Author

Dalhte commented Jul 26, 2023

Hi again
I tried several things randomly:
it seems that "getAssaData" is deprecated in Seurat5 and to be replaced with LayerData, so could my problem come from incompatibility between Seurat5 and ScMega ?
I try to run LayerData for each assay (chromvar, RNA and ATAC), if I run them alone, I got nothing different, if I run for each something like :

objG[['RNA']] <- as(objG[['RNA']], Class = 'Assay5')
LayerData(object = objG[['RNA']])

I have a different error message: no motifs name in this Assay5 object. The problem arises only when I transform the ATAC assay in Assay5, not when I keep a "ChromatinAssay" class, but sadly then I have the "GetAssayData()`:
! No layers are found" again.
Don't know if that help ?

@Dalhte
Copy link
Author

Dalhte commented Jul 28, 2023

If ever it can help someone, here is what I did :
I bypassaded the getassayy using layerdata function:

objG[['SoupXRNA']] <- as(objG[['SoupXRNA']], Class = 'Assay5')
LayerData(object = objG[['SoupXRNA']])

objG[['ATAC']] <- as(objG[['ATAC']], Class = 'ChromatinAssay')
LayerData(object = objG[['ATAC']])

objG[['chromvar']] <- as(objG[['chromvar']], Class = 'ChromatinAssay')
LayerData(object = objG[['chromvar']])

Class = 'ChromatinAssay is necessary to keep the motif names

then I copied the selectTFs function to run if in the rstudio interface directly with some modifications:

and It seems to work fine

@lzj1769
Copy link
Member

lzj1769 commented Jul 28, 2023

Hi @Dalhte

Sorry for my late reply and glad that you found a solution.

Indeed, the Seurat v5 has uplated many APIs, and I need some time to update scMEGA to keep them compatible.

@Dalhte
Copy link
Author

Dalhte commented Jul 29, 2023

Hi @lzj1769
Don't worry, it was nice to find a solution by myself :) Even if the solution is quite tedious :DDD

Best
David

@evaham1
Copy link

evaham1 commented Sep 2, 2023

Hello!

Many thanks for the tool,
I am also encountering this same error with the issue seeming to be with GetAssayData() in GetTrajectory. I have had a go at trying to bypass this issue as @Dalhte suggested but this is just creating more errors. Could you please suggest a workaround for this or perhaps a suggestion of which Seurat version is best used with scMEGA? I followed the installation instructions which says devtools::install_github("satijalab/seurat", "seurat5", upgrade='always'), should I try re-running the scMEGA steps but with an older version of seurat? Any suggestions are greatly appreciated, I have managed to follow the steps of the tutorial up to SelectTFs so I'm very keen to get this final bit working to build the GRN!
Eva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants