Open phoebee-h opened 10 months ago
Hello Phoebe, thanks for using SPATA2. As for your questions:
variables
where you can specify exactly which numeric variables you want to include in the screening, genes, gene sets other numeric features etc.assay_name
. It defaults to an assay named Spatial. I recognize that this is suboptimal and should default to the default assay of the Seurat object. Can you try and set assay_name = "SCT"
and run the function again? Can you extract the genes now? object <- identifyTissueOutline(object)
at any time. This should identify the spatial outline that can be visualized via ggpLayerTissueOutline()
. I hope this helps a bit. Please feel free to pose follow up questions if I could not adress your questions sufficiently.
Best regards
Jan
Hi Jan,
Thank you for your kind response. Indeed, genes can be viewed followed by your instructions.
spata2_object <-
SPATA2::asSPATA2(
object = cortex,
sample_name = "mouse_brain",
image_name = "slice1",
spatial_method = "SCT" # Do not write "Visium" or "Spatial"
)
I have some follow-up questions.
Difference of transformSeuratToSpata()
and asSPATA2()
?
The createSpatialTrajectories()
helps a lot, I think the arrow is way more straightforward. What does 'guiding comment' mean, would it be necessary?
According to functions in createSpatialTrajectories()
, does the number of arrows matter in a line? For example, when drawing a trajectory, is a single arrow different from one composed of three arrows? (Please ignore the spot not chosen here due to my shaky fingers. Please assume that all spots are chosen the same.)
For the demo dataset, what is image_annotation, such as "image_annotations[["269_T"]]
" ? Is it necessary for spata2 object? If so, how do we manually create it?
Where can I check the info on segmentation annotation? Is there a way to import segmentation results in the spata2 object, instead of using createSpatialSegmentation()
? In which part is it stored?
I created a trajectory called "test2", but the following code does not work. It shows the error:
# > genes
# [1] "Trbc2" "Ighm" "Lamp5" "Slc30a3"
# > gene_colors
# Trbc2 Ighm Lamp5 Slc30a3
# "#E64B35FF" "#4DBBD5FF" "#00A087FF" "#3C5488FF"
plotTrajectoryLineplot( object = spata2_object, id = "test2", variables = genes, smooth_se = TRUE, clrp_adjust = gene_colors )
Error in base::as.numeric(tobj@segment[, c("x", "y")]) : 'list' object cannot be coerced to type 'double'
Thank you again!
Phoebe.
Hello Phoebe, sorry for the late reply. I've been facing some busy days lately.
display_trajectory_parts
should allow this.addFeatures()
should help. plotSpatialTrajectories()
? Hi Jan, Thanks for your kind response anyway.
plotSpatialTrajectories()
works for me. So, I am not sure why plotTrajectoryLineplot()
failed. These are the ids that were stored in my object.
> names(spata2_object@trajectories$mouse_brain)
[1] "test1" "test2" "test3"
Thank you. Phoebe
Hey, I found the problem and fixed it. Plotting trajectory lineplots should work now for trajectories with multiple parts, too. I pushed the fixed code to the current master branch. Can you install again and see if it works for you, too?
@kueckelj
Thank you for dealing with my question.
Does the deployment failure affect the version of what I can download?
remotes::install_github(repo = "theMILOlab/SPATA2@87c7f5cfd24caaf5a3c2001653b61d74fc04bc5f")
Hi, Thanks for maintaining SPATA2! I have a seurat object after QC and SCT normalized, which was used for spata trajectory analysis. I am confused by the structure of spata2 object. Q1. What information should be included in spata2 object for trajectory analysis? What should be checked first? Q2. If I use the
"addSpatialTrajectory"
, how do I check the limitation (or borders) of the parameter "start, end"? Q3. Why the genes cannot be retrieved by "getGenes()
", which causes the problem in generating figures? Q4. I lost something after converting the object from seurat, how do I make the information as in demonstration"image_annotations[["269_T"]]"
? Would it be necessary for trajectory analysis? Q5. In which step expand a column "outline" in the coordinate?Thank you. Phoebe.