Skip to content

Commit

Permalink
upload workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lzj1769 committed Jul 1, 2024
1 parent 6ab3a60 commit 66ca809
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# shell: Rscript {0}
- name: Render Rmarkdown files
run : |
pkgdown::build_article(name='myofibroblast-GRN', quiet=FALSE)
pkgdown::build_article(name='install.Rmd', quiet=FALSE)
shell: Rscript {0}
- name: Commit files
run: |
Expand Down
10 changes: 2 additions & 8 deletions R/grn.R
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,7 @@ GRNPlot <- function(df.grn,
GRNSpatialPlot <- function(object, assay,
df.grn,
tf.use,
min.cutoff = "q5",
max.cutoff = "q95",
vis.option = "B",
crop = TRUE){
vis.option = "B", ...){
DefaultAssay(object) <- assay

# select all targets for a TF
Expand All @@ -462,10 +459,7 @@ GRNSpatialPlot <- function(object, assay,
geneset <- list(tf.use = df.target$gene)
object <- AddModuleScore(object, features = geneset)

p <- Seurat::SpatialFeaturePlot(object, features = "Cluster1",
min.cutoff = min.cutoff,
max.cutoff = max.cutoff,
crop = crop)+
p <- Seurat::SpatialFeaturePlot(object, features = "Cluster1", ...)+
scale_fill_viridis(option = vis.option) +
ggtitle(glue::glue("{tf.use} targets")) +
labs(fill='')
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# R -e "devtools::document()"
# R -e "pkgdown::build_site(preview = FALSE, lazy=TRUE)"
R -e "pkgdown::build_article(name='myofibroblast-GRN', quiet=FALSE)"
# R -e "pkgdown::build_article(name='myofibroblast-GRN', quiet=FALSE)"
7 changes: 4 additions & 3 deletions vignettes/myofibroblast-GRN.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ obj.spatial <- readRDS("./VisiumSpatial/AKK004_157772.rds")
DefaultAssay(obj.spatial) <- "c2l_props"
p <- SpatialFeaturePlot(obj.spatial, features = "Fib", min.cutoff = "q5",
max.cutoff = "q95") +
max.cutoff = "q95", image.alpha = 1,
pt.size.factor = 400, keep.scale = NULL) +
scale_fill_viridis(option = "D") +
ggtitle("") +
labs(fill = "") +
Expand All @@ -593,12 +594,12 @@ We next can check the gene expression in space. Here, we use the above TFs.
```{r, fig.height = 5, fig.width = 10, fig.align = "center", eval=TRUE}
DefaultAssay(obj.spatial) <- "SCT"
p1 <- SpatialFeaturePlot(object = obj.spatial, features = "NR3C2") +
p1 <- SpatialFeaturePlot(object = obj.spatial, features = "NR3C2", image.alpha = 1, pt.size.factor = 400, keep.scale = NULL) +
ggtitle("") +
theme(legend.position = "bottom") +
scale_fill_viridis(option = "C")
p2 <- SpatialFeaturePlot(object = obj.spatial, features = "RUNX1") +
p2 <- SpatialFeaturePlot(object = obj.spatial, features = "RUNX1", image.alpha = 1, pt.size.factor = 400, keep.scale = NULL) +
ggtitle("") +
theme(legend.position = "bottom") +
scale_fill_viridis(option = "C")
Expand Down

0 comments on commit 66ca809

Please sign in to comment.