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

Error running plotSmoothers with one lineage sce object #23

Closed
Jon-bioinfo opened this issue Dec 12, 2019 · 3 comments
Closed

Error running plotSmoothers with one lineage sce object #23

Jon-bioinfo opened this issue Dec 12, 2019 · 3 comments

Comments

@Jon-bioinfo
Copy link

I'm getting an error running plotSmoothers:
> plotSmoothers(sce, counts, gene = 'Fasn')
Error in pseudotime[lineageID == ii, ii] : incorrect number of dimensions

The counts, pca and clusters are from Seurat:
counts <- as.matrix(so@assays$RNA@counts)
lin <- getLineages(so@reductions$pca@cell.embeddings[, 1:10], clusterLabels = cl, start.clus = 4, end.clus=2)
crv <- getCurves(lin)
sce <- fitGAM(counts = counts[id, ], sds = crv, nknots = 7 )

image

I think this is due to having only one lineage and an sce object:

In the .plotSmoothers_sce function the code pseudotime <- slingshotColData[,grep(x = colnames(slingshotColData), pattern = "pseudotime")] returns a vector not a data frame when there is just one curve.

Thanks,

@HectorRDB
Copy link
Collaborator

Hey,
Thanks for pointing this out, this was indeed the issue. It should be fixed now, you can install the newest devel version of tradeSeq with

devtools::install_github("statOmics/tradeSeq")

Let me know if anything else is unclear. There should not be any other issues for the one lineage case but this situations has been less thoroughly benchmarked so there might be some more bugs.

@Jon-bioinfo
Copy link
Author

Thanks,

The same problem exists in the .clusterExpressionPatterns function.

@HectorRDB
Copy link
Collaborator

Hi,
Thanks for being so thorough, it really help us a lot.

HectorRDB added a commit that referenced this issue Jan 14, 2020
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

2 participants