stemangiola / tidygate Goto Github PK
View Code? Open in Web Editor NEWLabel elements within user drawn gates
Label elements within user drawn gates
File loaded into R:
> library(readxl)
> LiveDead <- read_excel("Documents/LiveDead.xlsx",
+ col_types = c("numeric", "numeric", "text"))
> View(LiveDead)
> LiveDead
# A tibble: 5,046 x 3
Mean488x_525m Mean560x_607m Cell_Status
<dbl> <dbl> <chr>
1 1381. 302. Live
2 7104 266. Live
3 8073. 251. Live
4 960. 594. Live
5 814. 426. Live
6 8985. 250. Live
7 23917. 292. Live
8 990. 548. Live
9 1317. 464. Live
10 7952. 323. Live
# … with 5,036 more rows
Attempt to gate data
> LiveDead %>% gate(.data = LiveDead, .dim1 = Mean488x_525m, .dim2 = Mean560x_607m)
Error: Must subset columns with a valid subscript vector.
x Subscript has the wrong type `tbl_df<
Mean488x_525m: double
Mean560x_607m: double
Cell_Status : character
>`.
ℹ It must be numeric or character.
For the poll 5 the correct answer is
pbmc1_10x_v3_ATGGATCTCATGCCAA
gates used to work properly but suddenly all the gate I made were shown on the left top with smaller size. Is this a bug or am I doing something wrong? Below is my code and error message. Thx!
harmonized_gated1 <-
harmonized_seurat %>%
mutate(gated1 = tidygate::gate_chr(
UMAP_1, UMAP_2, .color = seurat_clusters,
.size = 0.1
))
Mark region on plot.
Error in dplyr::mutate()
:
ℹ In argument: gated1 = tidygate::gate_chr(...)
.
Caused by error in map()
:
ℹ In index: 1.
Caused by error in data[i, 1]
:
! subscript out of bounds
Run rlang::last_trace()
to see where the error occurred.
Hey everyone,
I have a dataset of 370k cells, and when I run tidygate it is very laggy,and out of 3 times, it works once without crashing. I think a restarization is needed once you have more than 100k cells, like the DimPlot in Seurat does it.
Once I reduce the number of plotted cells, the algorithm works smoother.
Cheers
tidygate allows gating points from a tibble, visually procedurally and in a replicable way, compatibly with a pipe-oriented programming style
https://github.com/stemangiola/tidygate
With an arbitrarily large amount of points (1M cells), it struggles, mostly at the visualisation step.
We propose a downsample strategy for the visual preview, while the selection would be done on all data points.
PLEASE IGNORE THIS AT THE MOMENT: As a possible second PR, the plotting backend might be changed from the old interactive plotting style base-R (often broken in the R studio server). A more modern Photoshop, the lasso-style selector, would be great. An example is CellSelector()
from Seurat. However, we would need to implement lasso-style gating and multiple gating.
Hi,
I would love to use your package but somehow I am not able to make it work. It would be great if you could help me understand, what is going wrong here. When I try the follwoing example I always get this error:
ggplot(tidygate_data)+geom_point(mapping = aes(x=Dim1,y=Dim2))
tidygate_gate <-
mutate()
column gate
.gate = gate_chr(Dim1, Dim2)
.var
has size 0 but must be size 1.rlang::last_error()
to see where the error occurred.Backtrace:
When I run the second part uncluding gate_chr, a new plot appears in the plot area (I am using RStudio), but it is empty.
Let me know if you need any other info!
Thanks for your help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.