Closed Ahmedalaraby20 closed 4 months ago
The 'pct' column is the percentage of cells that include the v_gene, so this is the expected behavior when you have some cells with multiple v_genes. If you remove cells with multiple v_genes, the 'pct' column will sum to 100%:
library(djvdj)
library(dplyr)
obj <- readRDS("meta.rds")
res <- obj |>
filter(paired & n_chains == 2) |>
calc_gene_usage(
data_cols = "v_gene",
return_df = TRUE,
cluster_col = "HTO_classification",
chain = "TRB"
)
res |>
group_by(HTO_classification) |>
summarize(sum_pct = sum(pct))
Hey Rayn, So I used
and I get
So I do
and now I get
This might be due to some cells having more than 1 vgene.
I am still using meta.zip