Coder Social home page Coder Social logo

urd's People

Contributors

farrellja avatar maximilianh avatar zouter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urd's Issues

Error in simulateRandomWalksFromTips step

Hi all,
I have just started to use URD. I have an object with roughly 12000 cells from 3 timepoints during differentiation. I'm currently stuck at simulateRandomWalksFromTips. I get the following error:

Error in sample.int(length(x), size, replace, prob) : too few positive probabilities

I have tried changing n.per.tip, root.visits and max.steps without any luck. I'm also not sure what these parameters are exactly, still exploring and learning.

It would be great if anyone has ideas about how to fix this error.
Thanks.

Plotting my markers genes in URD object

Hi,

I am trying to plot my own marker genes in URD after graph clustering but I always face this error

Error in intI(i, n = d[1], dn[[1]], give.dn = FALSE) : 
  invalid character indexing
> names(pr.markers) <- clusters
> 
> I30.n <- length(unique([email protected]$`Infomap-30`))
> 
> I30.cluster.assignments <- data.frame(
+     cluster=1:I30.n,
+     name=rep(NA, I30.n),
+     tip=rep(NA, I30.n),
+     row.names=1:I30.n
+ )
> View(I30.cluster.assignments)
> plotDot(axial), genes = "DDB_G0280225", clustering="Infomap-30")

Could you please help me in solving this error

pseudotimeDetermineLogistic

When I use the pseudotimeDetermineLogistic function, how do I understand these two arguments: optimal.cells.forward and max.cells.back?How do I set them in my data,thanks

Using clusters of cells at the earliest time point

Sorry this is not an issue, rather my problem; URD requires user to define some cluster of cells (tips) at the last time point.
What URD gave me by 3 time points is this picture

ibb.co/cWorp9

[blue](url


)

Blue is last time point that has three tips (A, B, C) ,green is between time point and red is root cells (first time point).
In my system (amoeba) I know cells in the earliest time point can be grouped to at least 3 groups of cells (by Seurat R), while here by URD I just have a mass of cells in earliest time point (may be this is true in vertebrate system where we have pluripotent cells). How I can use my clusters of cells at the earliest time point to plot such a tree please?

Thanks a lot

Generate biased transition matrix

Hi,
@farrellja , my object is too large, so that I can not generate biased transition matrix:
biased.tm <- pseudotimeWeightTransitionMatrix(object, pseudotime = "pseudotime", logistic.params = diffusion.logistic, pseudotime.direction = "<")
The error as following is 'Error: cannot allocate vector of size 10.8 Gb‘
and my input object=1.8G, and the number of my cells is 38000.
What can I do for this?

Finding the variable genes between cells

Sorry, I have 1563 cells in 8 time points (2h to 16 h).

If I am not wrong, I should change

var.by.stage <- lapply(seq(3,12,3), function(n) {
  findVariableGenes(axial, cells.fit=cellsInCluster(axial, "stage", stages[(n-2):n]), set.object.var.genes=F, diffCV.cutoff=0.3, mean.min=.005, mean.max=100, main.use=paste0("Stages ", stages[n-2], " to ", stages[n]), do.plot=TRUE)
})

to

var.by.stage <- lapply(seq(3,12,4), function(n) {
  findVariableGenes(axial, cells.fit=cellsInCluster(axial, "stage", stages[(n-2):n]), set.object.var.genes=F, diffCV.cutoff=0.3, mean.min=.005, mean.max=100, main.use=paste0("Stages ", stages[n-2], " to ", stages[n]), do.plot=TRUE)
})

As I 8 stages. seq(3,12,3) to seq(3,12,4)

Plotting a long list of genes on URD cell

Hi,

Seurat R package has some functions like FeaturePlot and DoHeatmap by which we can plot the expression of a list of genes on cell clusters. Likely URD does not have such options or I can not find that. URD has plotDot but would be clear only for a few number of genes. Could you please help me in plotting the expression pattern of a list of genes (for example 200 genes) on cluster of cells in URD?

Thanks a lot in advance

Using URD with small a number of cells

Hi, I am really interested in working with URD. I have 9 time points and roughly 200 cells in each time point. However, k-NN distance identifies all of my cells as outliers; I tried to optimise my analysis with changing sigma to NULL, local, etc in diffusion map and another parameter setting to meet URD criterias but likely I am getting non sense results(I compared my clustering on final stage cells with seurat, that was pretty different and unexpected). Do you think with this small number of cells I still can use URD? What is your suggestion please

Many thanks

Importing Seurat ro URD

Hi,

I have clustered my cells by Seurat, now I would like to trace gene expression pattern during the development by URD. I tried to figure how how I could import my Seurat object to URD but unfortunately I failed. Could you please help me in this regard?

Thanks lot in advance

Calculating gene modules

Hello,

Sorry, I want to work with URD gene modules but I don't have any imagination how a module file looks like.

Here you are mentioning

cm <- read.csv("~/Dropbox/Jeff-Yiqun/DE modules/AllModuleByAllCell.csv", row.names = 1)
# Load top genes for each module
what.loaded <- load("~/Dropbox/Jeff-Yiqun/DE modules/Module_top_25genes.Robj")
mod.genes.top25 <- top_25genes
what.loaded <- load("~/Dropbox/Jeff-Yiqun/DE modules/module_lineages.Robj")

Could I have access to these files so might be I understand how I produce my own NMF?

Thank you for any help

how to extract the Embeddings information after treeForceDirectedLayout processing

Hello,
it's really a impressive working to generate the URD algorithm. And the treeForceDirectedLayout is a important formula to visualize the single cell connection. However, recently I tried to extract the Embeddings information from URD object after treeForceDirectedLayout processing, I didn't know where that information stored. Could you help me work it out?
Thanks

Error from force-directed layout generation

Hi,

I went through the quick start tutorial and at the force-directed layout generation, I came across the following error:

Error in RANN::nn2(object@tree$walks.force.layout[, c("x", "y", "telescope.pt")], :
NA/NaN/Inf in foreign function call (arg 1)

The following is the verbose message I received when "treeForceDirectedLayout" was run:

[1] "2018-10-11 11:07:27 : Starting with parameters fr 120 NN 2 D 20387 cells"
[1] "Removing 0 cells that are not assigned a pseudotime or a segment in the tree."
[1] "2018-10-11 11:07:27: Preparing walk data."
[1] "2018-10-11 11:07:27: Calculating nearest neighbor graph."
[1] "2018-10-11 11:07:32: Preparing edge list."
[1] "2018-10-11 11:07:42: Removing 6.61% of edges that are between segments with distance > 2"
[1] "2018-10-11 11:07:43: Trimming cells that are no longer well connected."
[1] "2018-10-11 11:07:45: 99.93% of starting cells preserved."
[1] "2018-10-11 11:07:45: Preparing igraph object."
[1] "2018-10-11 11:07:46: Doing force-directed layout."
[1] "2018-10-11 11:13:09: Calculating Z."
[1] "2018-10-11 11:13:25: Calculating local density."

I would appreciate any input in overcoming this error. Thanks!

Force-directed tree drawing error

Hi again Jeff. I've run into an issue with treeForceDirectedLayout. I am guessing that for this function to work, the @tree$segment.names slot is supposed to contain something, but mine is empty. Maybe it got renamed at some point? Here is an example URD object and reproduction code.
Thanks!

URD object:
treeforce_bug_example.Robj.gz

> library(magrittr)
> library(URD)
> my_urd_tree = readRDS("path/to/unzipped/attached/file.Robj")
> my_urd_tree %<>% treeForceDirectedLayout

Error in data.frame(seg = segTerminal(object), name = object@tree$segment.names[segTerminal(object)],  : 
  arguments imply differing number of rows: 2, 0


> dge_urd_tree@tree$segment.names
NULL
> dge_urd_tree@tree %>% names %>% grep("segment", value = T, .)
[1] "segment.pseudotime.limits" "segment.divergence"        "segment.joins"             "segments"                 "segment.joins.initial"     "cells.in.segment"          "segment.layout"     

Output of traceback():

4: stop(gettextf("arguments imply differing number of rows: %s", 
       paste(unique(nrows), collapse = ", ")), domain = NA)
3: data.frame(seg = segTerminal(object), name = object@tree$segment.names[segTerminal(object)], 
       name.short = object@tree$segment.names.short[segTerminal(object)], 
       stringsAsFactors = F, row.names = segTerminal(object))
2: treeForcePositionLabels(object)
1: treeForceDirectedLayout(dge_urd_tree, tips = tip_cells)

Not a complete segment tree plot

Hi URD team,

I have two issues using URD to build tree.

  1. I got a not complete segment tree plot, as below:

image
there is not a tree structure.
The running code and log for bulidTree is :

urd.tree <- buildTree(urd.tree, pseudotime = "pseudotime", divergence.method = "preference",
save.all.breakpoint.info = T, tips.use = c('6','8','9','10','11','13','14','16','17'), cells.per.pseudotime.bin = 25,
bins.per.pseudotime.window = 8, p.thresh = 0.05, min.cells.per.segment = 10,
save.breakpoint.plots = NULL)
[1] "Calculating divergence between 6 and 8 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 9 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 6 and 10 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 6 and 13 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 14 (Pseudotime 0 to 0.462)"
[1] "Calculating divergence between 6 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 6 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 8 and 9 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 8 and 10 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 8 and 13 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 14 (Pseudotime 0 to 0.474)"
[1] "Calculating divergence between 8 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 8 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 9 and 10 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 11 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 13 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 14 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 9 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 9 and 17 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 10 and 11 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 10 and 13 (Pseudotime 0 to 0.553)"
[1] "Calculating divergence between 10 and 14 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 10 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 10 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 11 and 13 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 11 and 14 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 11 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 11 and 17 (Pseudotime 0 to 0.448)"
[1] "Calculating divergence between 13 and 14 (Pseudotime 0 to 0.512)"
[1] "Calculating divergence between 13 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 13 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 14 and 16 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 14 and 17 (Pseudotime 0 to 0.458)"
[1] "Calculating divergence between 16 and 17 (Pseudotime 0 to 0.305)"
[1] "Joining segments 10 and 13 at pseudotime 0.363 to create segment 18"
[1] "Calculating divergence between 6 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 8 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 9 and 18 (Pseudotime 0 to 0.362)"
[1] "Calculating divergence between 11 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 14 and 18 (Pseudotime 0 to 0.363)"
[1] "Calculating divergence between 16 and 18 (Pseudotime 0 to 0.305)"
[1] "Calculating divergence between 17 and 18 (Pseudotime 0 to 0.363)"
[1] "Joining segments 14 and 18 at pseudotime 0.234 to create segment 19"
[1] "Calculating divergence between 6 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 8 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 9 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 11 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 16 and 19 (Pseudotime 0 to 0.234)"
[1] "Calculating divergence between 17 and 19 (Pseudotime 0 to 0.234)"
[1] "Joining segments 8 and 11 at pseudotime 0.215 to create segment 20"
[1] "Calculating divergence between 6 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 9 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 16 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 17 and 20 (Pseudotime 0 to 0.215)"
[1] "Calculating divergence between 19 and 20 (Pseudotime 0 to 0.215)"
[1] "Joining segments 9 and 17 at pseudotime 0.21 to create segment 21"
[1] "Calculating divergence between 6 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 16 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 19 and 21 (Pseudotime 0 to 0.21)"
[1] "Calculating divergence between 20 and 21 (Pseudotime 0 to 0.21)"
[1] "Joining segments 19 and 20 at pseudotime 0.203 to create segment 22"
[1] "Calculating divergence between 6 and 22 (Pseudotime 0 to 0.203)"
[1] "Calculating divergence between 16 and 22 (Pseudotime 0 to 0.203)"
[1] "Calculating divergence between 21 and 22 (Pseudotime 0 to 0.203)"
[1] "Joining segments 6 and 22 at pseudotime 0.189 to create segment 23"
[1] "Calculating divergence between 16 and 23 (Pseudotime 0 to 0.189)"
[1] "Calculating divergence between 21 and 23 (Pseudotime 0 to 0.189)"
[1] "Joining segments 21 and 23 at pseudotime 0.178 to create segment 24"
[1] "Calculating divergence between 16 and 24 (Pseudotime 0 to 0.178)"
[1] "Joining segments 16 and 24 at pseudotime 0.172 to create segment 25"
[1] "Assigning cells to segments."
[1] "Collapsing short segments."
[1] "Removing singleton segments."
[1] "Reassigning cells to segments."
[1] "Assigning cells to nodes."
[1] "Laying out tree."
[1] "Adding cells to tree."
Warning messages:
1: In assignCellsToSegments(object, pseudotime, verbose) :
  3636 cells were not visited by a branch that exists at their pseudotime and were not assigned.
2: In assignCellsToSegments(object, pseudotime, verbose) :
  3636 cells were not visited by a branch that exists at their pseudotime and were not assigned.

Also running log for plotTree(urd.tree, "segment") says some rows are removed, I do not know whether it will affect the tree plot.

Warning messages:
1: Removed 6312 rows containing missing values (geom_point).
2: Removed 64 rows containing missing values (geom_segment).

Another issue is I got relatively low pseudotime value(max is 0.6 around), is any concerns about this?
image

Thanks in advance! Very powerful and handy package!

buildTree Error

Hello @farrellja,

I am trying to run URD on single cell data which is around 50K cells. When I am running buildTree(), I am getting the embedding error :

[1] "Calculating divergence between 47 and 56 (Pseudotime 0.439 to 0.553)"
Error in embed(1:n.pseudotime.groups, dimension = min(window.size, length(unique(visit.data$pseudotime.group)))) :
wrong embedding dimension

Does this mean that all the cells in the cluster have unassigned pseudotime ?

object@group instead of [email protected]?

Hi there,

I'm trying to do gene cascade in a 2D URD tree, but when I call aucprTestAlongTree as in:

markers <- aucprTestAlongTree(objTree, pseudotime="pseudotime", tips=tip,
            log.effect.size=0.4, auc.factor = 1.25, max.auc.threshold = 0.85, 
            frac.must.express = 0.1, frac.min.diff = 0, genes.use=genes.use, 
            only.return.global=F, must.beat.sibs=0.6, report.debug=T)

I get this error:

Error in markersAUCPR(object = object, cells.1 = cells.1, cells.2 = cells.2,  : 
  no slot of name "group" for this object of class "URD"

So I looked at markersAUCPR and it calls:

if (is.null(clustering)) {
    clust.use <- object@group 

But I didn't think URD objects had a slot called "group" just "group.ids". Why does markersAUCPR
reference object@group?

For reference my tree, objTree, is an URD object: 18385 genes x 23602 cells. Any help would be greatly appreciated! Many thanks!

Cannot install on linux

I can install the package in windows. However I had a hard time to install it on Linux. I am wondering whether the package is compatible with Linux? Thanks!

Possible extra system dependency - udunits

Using R-3.4.1, the full install script failed at ggraph for me. Further investigation reveals a library libudunits2.a is missing.
I installed udunits from the AUR, could be under a different name in your distribution.
Possible extra steps necessary -

install.packages("udunits2")
devtools::install_github(c("hadley/ggplot2", "GuangchuangYu/ggtree"))

source("https://raw.githubusercontent.com/farrellja/URD/master/URD-Install.R") now works.

memory blowout on createURD

I'm looking at a largish dataset, 190k cells, coming from a Seurat object. My data matrix is coming in spase as a dgCMatrix but when I go to make an URD object i get the following error:

axial <- createURD(count.data = counts, meta = meta)

2020-04-17 16:28:00: Filtering cells by number of genes.
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

This is a big memory (~700 GB) Unix machine, and it seems like it should all work, given that in the past I have had little problem running 10k cells on my 16gb mac. I'm wondering if the matrix is accidentally loosing its sparseness in the filtering call?

scRNA profiles from multiple time points; Seurat to URD; clustering in Seurat

I have scRNA profiles of whole mouse embryos at multiple time points. I would like to cluster them using Seurat and then feed cluster identities into URD. Is this possible? If it is possible, where in the URD tutorial should I start after loading the data? And should I cluster cells from each timepoint separately or all together from all the time points at one time?

Using different set of genes in calcPCA

Hi,

Sorry, I would like to use a set of genes in calculating PCs rather than variable genes as default or all of genes but I am getting this error,

> 
> class(as.character(my_set))
[1] "character"
> length(as.character(my_set))
[1] 3939
>  <- calcPCA(object, mp.factor = 1.5,genes.use=as.character(my_set))
[1] "2018-10-03 21:23:11: Centering and scaling data."
Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : 
  invalid character indexing
> 

Could you please help me in solving that?

Thank you

Cell types annotation for the Zebrafish datasets

Hi,
I checked https://portals.broadinstitute.org/single_cell/study/SCP162/single-cell-reconstruction-of-developmental-trajectories-during-zebrafish-embryogenesis#study-summary.
I find the zebrafish lineages build by URD is very nice. The tips shows a clear cell differentiation trajectories. But I cannot find the cell types annotations for the clusters. Can I use the markers genes used in your analysis to annotate all clusters (no only tips)? Thanks

Error in embed in Buildtree

Hi,
when I use Buildtree, it always prompt error about

Error in embed(1:n.pseudotime.groups, dimension = min(window.size, length(unique(visit.data$pseudotime.group))))

and I traced the source and I found

  if (!is.null(pseudotime.max)) visit.data <- visit.data[which(visit.data$pseudotime <= pseudotime.max),]

will produce empty visit.data.

How can I solve it except filter the tips?

thanks

More than 70% of Cells Not Getting Walked

I have roughly 60 thousand cells. Only 30% or so are getting walked and assigned a branch. At first, I thought that maybe tip specification may have accounted for this. I fiddled around with tip assignments and the number of cells getting walked didn't dramatically increase. Is there an earlier parameter that could be affecting which cells get walked?

Possibly constrained R version?

I've noticed that a lot of dependencies (and consequently the install) break with R version 3.5.1. I can confirm that it did not have the same errors when installing under R-3.4.3 and R-3.4.1.

Perhaps this should be mentioned somewhere so others don't waste their time. I can open a PR to edit the install.md if this is confirmed.

cells' pseudotime assigned as NA

Hi URD team,
Thanks for providing such a great analysis tool!

I am encountering some trouble in my own data set.
Basically, after calcDM(urd, knn = 100, sigma=16) and floodPseudotime(urd, root.cells=root.cells, n=150, minimum.cells.flooded=2, verbose=T), I have some cells not assigned pseudotime values, especially at some terminal stage(see below)
image

I checked running log, and 80% cells are visited(14597 in total), when I increase sigma value from 16 into 20 and about 90% cells are visited, I am not getting what the results look like for sigma=20(takes long time at this step), but it looks like increasing sigma value can increase percent of cells visited.

However, is there any drawbacks by only increasing sigma value?

Even though I have read this detailed issue, I guess my issue is related to poor pseudotime calculation, rather than not enough random walk simulations(see below)
image

pseudotimeWeightTransitionMatrix & simulateRandomWalksFromTips

Hi, farrellja,

I got the problem that after running pseudotimeWeightTransitionMatrix to get the axial.biased.tm (using my own data) and then running simulateRandomWalksFromTips and use axial.biased.tm as transiting matrix parameter, it will make the error like,
Error in transition.matrix["current.cell", ] : subscript out of bounds

I think this error is produced because after running pseudotimeWeightTransitionMatrix, it deletes some cells which do not have pseudotime.vec, but they are still included in tip.cells when running simulateRandomWalksFromTips.

Are there some other reasons which would cause error like this, or how to solve this problem without deleting them from tip.cells.

Thank you very much.

Failure to install on Windows R3.6.1

Hi, Farrellja

Thanks for such a wonderful package, I'm having problems with installing it on my windows x64 platform with R version of 3.6.1

The following is what I have as error messages, please help

devtools::install_github(repo="farrellja/URD")
Downloading GitHub repo farrellja/URD@master
Skipping 1 packages not available: destiny
√ checking for file 'C:\Users\a1189099\AppData\Local\Temp\Rtmp2Jj8SP\remotes1054cc563d6\farrellja-URD-cb6d83f/DESCRIPTION' ...

  • preparing 'URD': (1.5s)
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts (1.2s)
  • checking for empty or unneeded directories
  • building 'URD_1.1.0.tar.gz'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-10-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-11-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-12-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-13-3.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-14-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-15-3.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-3.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-4.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-17-5.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-18-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-18-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-3.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-2-4.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-20-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-21-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-22-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-3-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-2.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-4-3.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-6-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-7-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-9-1.png'
    Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
    storing paths of more than 100 bytes is not portable:
    'URD/Analyses/SupplementaryAnalysis/URD-11-BatchModuleRemovalAndClusteringAnalysisOfSmartseqDataset.Rmd'

Installing package into ‘C:/R_lib’
(as ‘lib’ is unspecified)
'\UOFA\USERS$\users9\a1189099'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.

  • installing source package 'URD' ...
    ** using staged installation
    ** R
    Error : (converted from warning) unable to re-encode 'NMFDoublets.R' line 297
    ERROR: unable to collate and parse R files for package 'URD'
  • removing 'C:/R_lib/URD'
    Error: Failed to install 'URD' from GitHub:
    (converted from warning) installation of package ‘C:/Users/a1189099/AppData/Local/Temp/Rtmp2Jj8SP/file10546d122651/URD_1.1.0.tar.gz’ had non-zero exit status
    In addition: Warning messages:
    1: In untar2(tarfile, files, list, exdir) :
    skipping pax global extended headers
    2: In untar2(tarfile, files, list, exdir) :
    skipping pax global extended headers

I actually have all dependent packages, which I don't really know what to do at this point. I've updated my R, and still the same message popped up. Thanks in advance!

floodBuildTM function

Hi, I had an error using floodPseudotime in a very large matrix (~55k cells).
ERROR MESAGE:
"Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105"

I saw that the problem was in floodBuildTM function.
I tried to substitute:
tm.sum.max <- max(apply(tm.flood, 1, sum))
by:
tm.sum.max <- max(rowSums(tm.flood))

It was faster and didn't consume almost none of my RAM.

What you think?

The newest version should be:
function (object = NULL, dm = NULL)
{
if (is.null(object) & is.null(dm))
stop("Must provide either object or diffusion map.")
if (!is.null(object)) {
tm.flood <- object@dm@transitions
}
else if (!is.null(dm)) {
tm.flood <- dm@transitions
}
tm.sum.max <- max(rowSums(tm.flood))
tm.flood <- tm.flood/tm.sum.max
return(tm.flood)
}

Regards, Diego

Finding cluster specific marker genes

Hi,

I have 3 clusters of cells, I want to find marker genes specific to each cluster; By markersAUCPR function in URD package I am doing so

> markersAUCPR(object, clust.1 = "1", clust.2 = NULL, cells.1 = NULL,
+              cells.2 = NULL, clustering = "Louvain-60", effect.size = 2,
+              frac.must.express = 0.2, frac.min.diff = 0.2, genes.use = NULL)

I think clust.1 = "1" vs clust.2 = NULL means compare cells in cluster 1 vs all cells in two other clusters and return marker genes specific to cluster 1; By doing so I am getting 9000 marker genes while I only have 11000 genes in my genome. Additionally, when I am plotting the expression of marker genes defined for cluster 1 on URD cluster, I expect only these genes become yellow in cells in cluster 1 but all heat map become yellow (please look at picture).

[


](url)
So I suspect if my interpretation of this function for finding marker genes specific to each cluster is right. I read the source code but nothing new I got from that.

Could somebody have a look at this function and tell me if I am wrong?

Thanksa lot

Error in names(stats) in aucprTestAlongTree

Hi,
I follow the code in supplementary analysis, as below:

# Determine tips to run DE for
tips.to.run <- setdiff(as.character(object@tree$segment.names), c("Primoridal Germ Cells", "EVL/Periderm"))
genes.use <- NULL # Calculate for all genes

# Calculate the markers of each other population.
gene.markers <- list()
for (tipn in 1:length(tips.to.run)) {
  tip <- tips.to.run[tipn]
  print(paste0(Sys.time(), ": ", tip))
  markers <- aucprTestAlongTree(object, pseudotime="pseudotime", tips=tip, log.effect.size=0.4, auc.factor = 1.25, max.auc.threshold = 0.85, frac.must.express = 0.1, frac.min.diff = 0, genes.use=genes.use, root="7", only.return.global=F, must.beat.sibs=0.6, report.debug=T, segs.to.skip = NULL)
  saveRDS(markers, file=paste0("cascades/aucpr/", tip, ".rds"))
  gene.markers[[tip]] <- markers
}

However, I got the error, Unknown is one of my tip:

[1] "2019-06-02 21:17:16: Unknown"
Error in names(stats) <- c("n.1", "n.2", "pt.1.mean", "pt.2.mean", "pt.1.median",  :
  'names' attribute [14] must be the same length as the vector [10]
In addition: Warning messages:
1: In if (format == "unary") { :
  the condition has length > 1 and only the first element will be used
2: In mean.default(object@meta[cells.1, "n.Genes"]) :
  argument is not numeric or logical: returning NA
3: In mean.default(object@meta[cells.2, "n.Genes"]) :
  argument is not numeric or logical: returning NA
4: In mean.default(object@meta[cells.1, "n.Trans"]) :
  argument is not numeric or logical: returning NA
5: In mean.default(object@meta[cells.2, "n.Trans"]) :
  argument is not numeric or logical: returning NA

Any suggestion how do I get this error?
Thanks!

Error When Running pseudotimeWeightTransitionMatrix

When I run pseudotimeWeightTransitionMatrix I get the following error. How do I make sense of the error and what should I do to resolve it?

pt.logistic <- pseudotimeDetermineLogistic(aggr.urd, "pseudotime", optimal.cells.forward=20, max.cells.back=40, do.plot = FALSE)

[1] "Mean pseudotime back (~40 cells) 0.000365363412175712"
[1] "Chance of accepted move to equal pseudotime is 0.820789323633629"
[1] "Mean pseudotime forward (~20 cells) -0.000183876064440276"

biased.tm <- pseudotimeWeightTransitionMatrix(aggr.urd, "pseudotime", logistic.params = pt.logistic)

Error in if (sparse && !sM) data <- as(data, "sparseMatrix") else if (!sparse) { :
missing value where TRUE/FALSE needed
Calls: pseudotimeWeightTransitionMatrix -> * -> * -> callGeneric -> eval -> eval -> Matrix
In addition: Warning message:
In sum(isN0(as(x, "matrix"))) : integer overflow - use sum(as.numeric(.))
Execution halted

URD -> destiny -> VIM -> car only available for R3.5

Hi, when running your installation script I'm getting an error, since the package "car" required by VIM required by destiny is not available for R < 3.5:

ERROR: dependency ‘VIM’ is not available for package ‘destiny’
* removing ‘/cluster/home/max/miniconda3/envs/r34/lib/R/library/destiny’

The downloaded source packages are in
        ‘/scratch/tmp/RtmpCX3hgU/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Error in eval(ei, envir) : 
  Failed to install required package 'destiny' from Bioconductor.
In addition: Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘VIM’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘destiny’ had non-zero exit status
> 
> 
> install.packages("VIM")
Warning: dependency ‘car’ is not available
trying URL 'http://cloud.r-project.org/src/contrib/VIM_4.8.0.tar.gz'
Content type 'application/x-gzip' length 342022 bytes (334 KB)
==================================================
downloaded 334 KB

ERROR: dependency ‘car’ is not available for package ‘VIM’
* removing ‘/cluster/home/max/miniconda3/envs/r34/lib/R/library/VIM’

The downloaded source packages are in
        ‘/scratch/tmp/RtmpCX3hgU/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("VIM") :
  installation of package ‘VIM’ had non-zero exit status
> install.packages("car")
Warning message:
package ‘car’ is not available (for R version 3.4.1) 

car indeed requires R3.5
https://cran.r-project.org/web/packages/car/index.html

are you running URD on R3.4 ?

Multiple root/end states

Hi,

Thank you for developing URD. I am wondering whether it is possible to assign multiple root/end states using the urdSubset function? I tried assigning them as (... c("end1", "end2", "end3")) and it accepted but, but then got an error downstream.

Currently, I have 6 time points but three of them are "end points" - all starting from the same root (although there may be more than one since this cluster of cells is heterogeneous).Is it possible to assign a particular subset from this cluster of cells as root?

Any help is much appreciated.

Thanks,

Error in combineTipVisitation

Hello, I had a problem running my analysis according to the steps in your paper.
Combine a few sets of tips where you walked from two groups of cells that probably should be considered one, based on the fact that theyare intermixed in the diffusion map.

Diencephalon

object <- combineTipVisitation(object, Wha)
But the error are as following:Error in [.data.frame([email protected], , cols) :
undefined columns selected.
According the indicates of this error,I run "object <- combineTipVisitation([email protected], "3", "33", "3")"
but there still existing an another error “Error in combineTipVisitation([email protected], "3", "33", "3") :
trying to get slot "tree" from an object (class "data.frame") that is not an S4 object
How could I continue the work?

Permanent error by graphClustering

Hi, I have 1562 cells in 8 time point (2h to 16h).

I am running URD, my root stage is h2 and final stage is h16 but I am being stopped at this stage. Could you please help me?

> axial.6somite <- graphClustering(axial.6somite, num.nn = 50, do.jaccard=TRUE, method="Louvain")
Error in graphClustering(axial.6somite, num.nn = 50, do.jaccard = TRUE,  : 
  unused arguments (num.nn = 50, do.jaccard = TRUE, method = "Louvain")
> 

> print(object.6s)

 URD object: 12451 genes x 1556 cells. 


object.6s.mnn <- graphClustering(object.6s) 

Show Traceback Rerun with Debug Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘graphClustering’ for signature ‘"URD"’ > 

This is whole of my process

> axial <- createURD(count.data = as.matrix(T), meta = r, min.cells=3, min.counts=3)
2018-08-24 09:05:16: Filtering cells by number of genes.
2018-08-24 09:05:18: Filtering genes by number of cells.
2018-08-24 09:05:19: Filtering genes by number of counts across entire data.
2018-08-24 09:05:20: Filtering genes by maximum observed expression.
2018-08-24 09:05:22: Creating URD object.
2018-08-24 09:05:23: Determining normalization factors.
2018-08-24 09:05:24: Normalizing and log-transforming the data.
2018-08-24 09:05:29: Finishing setup of the URD object.
2018-08-24 09:05:29: All done.
> [email protected]$stage <- as.character(axial@meta[rownames([email protected]),"stage.nice"])
> stages <- sort(unique([email protected]$stage))

         init stage
s1.1     s1.1   h16
s1.2     s1.2   h16
s1.3     s1.3   h16

> var.by.stage <- lapply(seq(3,8,3), function(n) {
+   findVariableGenes(axial, cells.fit=cellsInCluster(axial, "stage", stages[(n-2):n]), set.object.var.genes=F, diffCV.cutoff=0.3, mean.min=.005, mean.max=100, main.use=paste0("Stages ", stages[n-2], " to ", stages[n]), do.plot=TRUE)
+ })
Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) :
  38 x values <= 0 omitted from logarithmic plot
2: In densfun(x, parm[1], parm[2], ...) : NaNs produced
3: In densfun(x, parm[1], parm[2], ...) : NaNs produced
4: In densfun(x, parm[1], parm[2], ...) : NaNs produced
5: In densfun(x, parm[1], parm[2], ...) : NaNs produced
6: In xy.coords(x, y, xlabel, ylabel, log) :
  6 x values <= 0 omitted from logarithmic plot
> var.genes <- sort(unique(unlist(var.by.stage)))
> [email protected] <- var.genes
> axial <- calcPCA(axial, mp.factor = 2)
[1] "2018-08-24 09:08:45: Centering and scaling data."
[1] "2018-08-24 09:08:51: Removing genes with no variation."
[1] "2018-08-24 09:08:53: Calculating PCA."
[1] "2018-08-24 09:10:34: Estimating significant PCs."
[1] "Marchenko-Pastur eigenvalue null upper bound: 14.3352330233523"
[1] "9 PCs have eigenvalues larger than 2 times null upper bound."
[1] "Storing 18 PCs."
> pcSDPlot(axial)
> set.seed(19)
> axial <- calcTsne(object = axial)
> plotDim(axial, "stage.nice", plot.title = "tSNE: Stage")
> axial <- calcDM(axial, knn = 40, sigma=16)
[1] "Using provided global sigma 16"
Error in stopifsmall(max(trans_p@x, na.rm = TRUE)) : 
  The supplied sigma is not large enough. Please select a larger one.
			find_sigmas(data) should return one with the right order of magnitude. (max dist. is 5.271e-31)
> axial <- calcDM(axial, knn = 40, sigma=NULL)
[1] "destiny determined an optimal global sigma of 273.752"
> plotDimArray(axial, reduction.use = "dm", dims.to.plot = 1:8, outer.title = "Diffusion Map (Sigma NULL, 40 NNs): Stage", label="stage", plot.title="", legend=F)
> plotDim(axial, "stage.nice", transitions.plot = 10000, plot.title="Developmental stage (with transitions)")
> root.cells <- cellsInCluster(axial, "stage", "h2")
> root.cells <- cellsInCluster(axial, "stage", "h2")
> axial.floods <- floodPseudotime(axial, root.cells = root.cells, n=50, minimum.cells.flooded = 2, verbose=F)
> axial <- floodPseudotimeProcess(axial, axial.floods, floods.name="pseudotime")
> pseudotimePlotStabilityOverall(axial)
> plotDim(axial, "pseudotime")
> plotDists(axial, "pseudotime", "stage", plot.title="Pseudotime by stage")
> axial.6somite <- urdSubset(axial, cells.keep=cellsInCluster(axial, "stage", "h16"))
> [email protected] <- var.by.stage[[4]]
Error in var.by.stage[[4]] : subscript out of bounds
> [email protected] <- var.by.stage[[8]]
Error in var.by.stage[[8]] : subscript out of bounds
> [email protected] <- var.by.stage[[1]]
> axial.6somite <- calcPCA(axial.6somite, mp.factor = 1.5)
[1] "2018-08-24 09:20:30: Centering and scaling data."
[1] "2018-08-24 09:20:31: Removing genes with no variation."
[1] "2018-08-24 09:20:32: Calculating PCA."
[1] "2018-08-24 09:20:34: Estimating significant PCs."
[1] "Marchenko-Pastur eigenvalue null upper bound: 69.0546023898962"
[1] "3 PCs have eigenvalues larger than 1.5 times null upper bound."
[1] "Storing 6 PCs."
> pcSDPlot(axial.6somite)
> set.seed(20)
> axial.6somite <- calcTsne(axial.6somite)
> axial.6somite <- graphClustering(axial.6somite, num.nn = 50, do.jaccard=T, method="Louvain")
Error in graphClustering(axial.6somite, num.nn = 50, do.jaccard = T, method = "Louvain") : 
  unused arguments (num.nn = 50, do.jaccard = T, method = "Louvain")
> axial.6somite <- graphClustering(axial.6somite, num.nn = 50, do.jaccard=TRUE, method="Louvain")
Error in graphClustering(axial.6somite, num.nn = 50, do.jaccard = TRUE,  : 
  unused arguments (num.nn = 50, do.jaccard = TRUE, method = "Louvain")
> axial.6somite <- graphClustering(axial.6somite, do.jaccard=TRUE, method="Louvain")
Error in graphClustering(axial.6somite, do.jaccard = TRUE, method = "Louvain") : 
  unused arguments (do.jaccard = TRUE, method = "Louvain")
> axial.6somite <- graphClustering(axial.6somite, method="Louvain")
Error in graphClustering(axial.6somite, method = "Louvain") : 
  unused argument (method = "Louvain")
> axial.6somite <- graphClustering(axial.6somite)
 Show Traceback
 
 Rerun with Debug
 Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘graphClustering’ for signature ‘"URD"’ > plotDim(axial.6somite, "Louvain-50", plot.title = "Louvain (50 NN) graph clustering", point.size=3)
Error in data.for.plot(object, label = label, label.type = label.type,  : 
  Cannot find Louvain-50 in metadata, group.ids, signatures, genes, or pseudotime.
> View(read.table("meta.axial.txt"))
> [email protected] <- var.by.stage[[2]]
> axial.6somite <- calcPCA(axial.6somite, mp.factor = 1.5)
[1] "2018-08-24 09:24:13: Centering and scaling data."
[1] "2018-08-24 09:24:15: Removing genes with no variation."
[1] "2018-08-24 09:24:15: Calculating PCA."
[1] "2018-08-24 09:24:17: Estimating significant PCs."
[1] "Marchenko-Pastur eigenvalue null upper bound: 71.5558152464193"
[1] "3 PCs have eigenvalues larger than 1.5 times null upper bound."
[1] "Storing 6 PCs."
> pcSDPlot(axial.6somite)
> set.seed(20)
> axial.6somite <- calcTsne(axial.6somite)
> [email protected] <- var.by.stage[[2]]
> axial.6somite <- graphClustering(axial.6somite, num.nn = 50, do.jaccard=TRUE, method="Louvain")
Error in graphClustering(axial.6somite, num.nn = 50, do.jaccard = TRUE,  : 
  unused arguments (num.nn = 50, do.jaccard = TRUE, method = "Louvain")
> [email protected] <- var.by.stage[[3]]
Error in var.by.stage[[3]] : subscript out of bounds
> [email protected] <- var.by.stage[[4]]
Error in var.by.stage[[4]] : subscript out of bounds
> [email protected] <- var.by.stage[[5]]
Error in var.by.stage[[5]] : subscript out of bounds
> [email protected] <- var.by.stage[[6]]
Error in var.by.stage[[6]] : subscript out of bounds
> 7# Calculate PCA and tSNE
[1] 7
> [email protected] <- var.by.stage[[7]]
Error in var.by.stage[[7]] : subscript out of bounds
> [email protected] <- var.by.stage[[8]]
Error in var.by.stage[[8]] : subscript out of bounds
> [email protected] <- var.by.stage[[1]]
> axial.6somite <- calcPCA(axial.6somite, mp.factor = 1.5)
[1] "2018-08-24 09:26:14: Centering and scaling data."
[1] "2018-08-24 09:26:15: Removing genes with no variation."
[1] "2018-08-24 09:26:16: Calculating PCA."
[1] "2018-08-24 09:26:18: Estimating significant PCs."
[1] "Marchenko-Pastur eigenvalue null upper bound: 69.0546023898962"
[1] "3 PCs have eigenvalues larger than 1.5 times null upper bound."
[1] "Storing 6 PCs."
> pcSDPlot(axial.6somite)
> set.seed(20)
> axial.6somite <- calcTsne(axial.6somite)
> axial.6somite <- graphClustering(axial.6somite, num.nn = 50, do.jaccard=TRUE, method="Louvain")
Error in graphClustering(axial.6somite, num.nn = 50, do.jaccard = TRUE,  : 
  unused arguments (num.nn = 50, do.jaccard = TRUE, method = "Louvain")
> 

Where is meta.axial.txt in artical

Hi, My original intention was to learn how to reconstruct the trajectory of cell development, so I downloaded your public data (SRP124289).
However, these fastq files on offer have already been processed. The read lengths are variable because they’ve already been polyA trimmed and adapter trimmed, and I can't do anything with the fastq file I have downloaded.
So I can only download your expression matrix, but we all know that when using URD, similar to testdata, you need two input files (count.axial.txt and meta.axial.txt). Now I only downloaded to count.txt. Where can I get the meta.axial.txt of the article data?

aucprTestByFactor

I've run through URD with a single cell dataset, and I am now attempting to analyze some of the branch points in the tree. I have successfully used the aucprTestAlongTree to find genes characteristic of a specific lineage, but now want to find out the genes upregulated along each branch at a specific split.

Following the format found at: https://rdrr.io/github/farrellja/URD/f/Analyses/SupplementaryAnalysis/URD-06-GeneExpressionCascades.Rmd

I ran:

routeA <- cellsInCluster(axial.tree, "segment", c(35, 32, 28))
routeB <- cellsInCluster(axial.tree, "segment", c(35,32, 13))
groups <- c( 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 3, 4, 5, 6, 7, 8, 9)
aucprTestByFactor(axial.tree, cells.1 = routeA, cells.2 = routeB, label = "segment", groups = groups)

and received the error:

Error in [<-.data.frame(*tmp*, is.na(genes.data$AUCPR), "AUCPR", value = 0) :
replacement has 1 row, data has 0

I tried different ways of identifying cells.1 and cells.2, a couple different group.ids as the label, and a couple different groups, but received the same error each time. I am not extremely familiar with R, and don't know exactly how to fix the issue.

For reference, the "groups" listed above are just the numbers of each of the dataset "stages", which were extracted from the cluster identities of several merged Seurat objects. Every cell in the object should have a number in this stages column in group.ids.

Can't install URD due to TTR error on mac

Hi Guys,

I wanted to try URD on my scRNA-seq data. I tried installing it from CRAN or GitHub but I'm always getting an issue that TTR package can't be installed that is an issue to install destiny package and finally URD installation isn't successful.

> make: gfortran: No such file or directory
> make: *** [movingAverages.o] Error 1
> ERROR: compilation failed for package ‘TTR’
> * removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/TTR’
> Warning in install.packages :
>   installation of package ‘TTR’ had non-zero exit status

I tried to install Fortran compiler on mac but it doesn't help with TTR. Currently I'm running R 3.5.1. any help would be appreciated.
Worst case scenario I could downgrade my R version, but not sure which version will be supported by all the packages.

Cheers!

Remove Batch Effects from Samples of the Same Stage

I have multiple samples per developmental stage. I notice that samples of the same stage are not as closely distributed along pseudotime as I would like. I have a feeling batch effects among samples of the same stage may explain this phenomenon. Is there a way to correct for batch effects between samples of the same stage across multiple stages?

Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

Hi @farrellja ,
I'm trying URD on a dataset with about 50k cells and when I try to run:

myURDobject.biased.tm <- as.matrix(pseudotimeWeightTransitionMatrix(myURDobject, "pseudotime", logistic.params=myURDobject.ptlogistic))

it gives the following error:

Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

I realize this may be related to issue #6, but I do not know how to fix it. Can you please help?

Thank you.

Weird behavior from buildTree

Hi @farrellja , I have been using URD for a while but recently I'm having trouble with the buildTree function. It seems no matter if I take a previous processed axial.rds object, or start from the beginning, the tree layout looks like just a mess. More specifically, even if I take a previous axial.rds after processRandomWalksFromTips, then call buildTree exactly the same as before (I kept all my code), I still get a messed tree.

I noticed that now I get some warnings from ggplot such as:
Removed 760 rows containing missing values (geom_point).
Removed 8 rows containing missing values (geom_segment).

If I directly load a previous axial.tree.rds, then plotTree is still able to get the expected tree layout.
I have also tried to uninstall and reinstall the package, but the problem still exists.
I suspect it could be due to some dependant that got updated but completely have no better idea.

It would be great if you can shed some light on this! I have also attached the two layouts that are supposed to be the same.
Thanks!

image
image

Problems installing URD

Hey,

I have issues installing URD. The installer script is outdated with Bioconductor installations for R 3.5 and up, as the commands have changed, and so I'm installing manually. All dependencies appear to be installing fine, but I cannot get URD to install.

After devtools announce sit will start to build URD...
- building 'URD_1.1.0.tar.gz'

...First I get a whole bunch of warnings that follow the same basic pattern:
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, : storing paths of more than 100 bytes is not portable: 'URD/Analyses/QuickStart/URD-QuickStart-AxialMesoderm_files/figure-markdown_github/unnamed-chunk-10-1.png'

Then, this happens:
`Installing package into ‘C:/Users/bjv2113/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)

  • installing source package 'URD' ...
    ** using staged installation
    ** R
    Error : (converted from warning) unable to re-encode 'NMFDoublets.R' line 297
    ERROR: unable to collate and parse R files for package 'URD'
  • removing 'C:/Users/bjv2113/Documents/R/win-library/3.6/URD'
    Error: Failed to install 'URD' from GitHub:
    (converted from warning) installation of package ‘C:/Users/bjv2113/AppData/Local/Temp/RtmpOacWPd/file4ae07e397ec1/URD_1.1.0.tar.gz’ had non-zero exit status`

Any help would be appreciated. URD seems like an interesting package and I'd love to give it a go!

reorder cluster of heatmap

Hi, @farrellja
I am using your complete code to plot a cascade heatmap of my own data.

# Hierarchical cluster based on smoothed expression
h.ss <- hclust(dist(as.matrix(ss[varying.genes.5cell, ])), method = "ward.D2")
h.ss.d <- as.dendrogram(h.ss)
k = 15 # Cluster number chosen by eye.
h.ss.clust <- cutree(h.ss, k = k)
# Get cluster order as it will be in the heatmap
clust.order <- unique(h.ss.clust[rev(h.ss$order)])
h.ss.clust.ord <- plyr::mapvalues(from = clust.order, to = 1:k, x = h.ss.clust)
# Generate cluster color vector
cluster.h <- seq(0, 1, length.out = k + 1)
cluster.s <- rep(c(1, 0.75), length = k)
cluster.v <- rep(c(1, 0.75), length = k)
cluster.colors <- hsv(h = cluster.h[1:k], s = cluster.s, v = cluster.v)
h.ss.clust.col <- plyr::mapvalues(from = as.character(1:k), to = cluster.colors,
x = h.ss.clust.ord)
# Generate the actual heatmap and save as a PDF.
pdf(paste0(main.path, "URD/GranularZymogen/GranularZymogen-Varying.pdf"), width = 17,
height = 22)
# Plot the heatmap
gplots::heatmap.2(x = as.matrix(ss[varying.genes.5cell[rev(h.ss$order)], ]), Rowv = F,
RowSideColors = h.ss.clust.col[rev(h.ss$order)], Colv = F, dendrogram = "none",
col = cols, trace = "none", density.info = "none", key = F, cexCol = 0.8, cexRow = 0.08,
margins = c(8, 8), lwid = c(0.3, 4), lhei = c(0.3, 4), labCol = NA)
# Put a title on it
title("Granular/Zymogen Expression", line = -1, adj = 0.48, cex.main = 4)
# Add tissue labels to bottom
title("Head", line = -103, adj = 0.08, cex.main = 2)
title("Foot", line = -103, adj = 0.95, cex.main = 2)
dev.off()

How to reorder the cluster of heatmap?
I try to set new order of clust.order, such as clust.order <- c(3,2,1,4,5,6,7,8,9,10), but the heatmap keeps the same.

Should I reorder the matrix? Any suggestion?
Thanks!

btw: sorry for pulling a 'heatmap.2-like' issue.

buildTree error: undefined columns selected

Hi Team URD! I was super impressed with your zebrafish paper, so I am trying out your package. I've hit a snag. It says:

> library(magrittr)
> library(URD)
> my_urd = readRDS("path/to/unzipped/attached/file.Robj")
> my_urd_tree = loadTipCells(my_urd, "tip.clusters")
> my_urd_tree %<>% buildTree( verbose = T, pseudotime = "pseudotime" )

Error in `[.data.frame`([email protected], , paste0("visitfreq.raw.", segments)) : 
  undefined columns selected

I tried converting @group.ids$tip.clusters to numeric, but I get the same error.

My example data:

small_example.Robj.gz

I am using URD version 1.0.1 (installed from commit ed083d4) and R version 3.4.3 on Mac OS 10.11.6. Let me know if you can't reproduce the problem.

Supplementary Analysis

Where I can find the supplementary analysis referenced in the quick start? I'm having trouble finding it. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.