Percent of reads assigned to targeted genes vs others
Closed this issue · 0 comments
lcolladotor commented
Could either be:
- barplots like the ones from https://github.com/LieberInstitute/Visium_IF_AD/blob/master/plots/09_pathology_vs_BayesSpace/pathology_vs_Bayesspace_cluster_barplots/spe_targeted_barplots_Abeta_outliers.pdf
- boxplots like https://github.com/LieberInstitute/Visium_IF_AD/blob/master/plots/09_pathology_vs_BayesSpace/pathology_vs_Bayesspace_cluster_boxplots/spe_wholegenome_PAbeta.pdf but with samples labeled like with https://rpkgs.datanovia.com/ggpubr/reference/ggboxplot.html which can be used to label samples like at https://github.com/LieberInstitute/Visium_IF_AD/blob/master/plots/03_analysis/10x_checks/cross_study_spaceranger_metrics_boxplots.pdf. Actually, we would use https://rpkgs.datanovia.com/ggpubr/reference/ggpaired.html.
To compute the percent of reads, we could do it like this:
genes <- ## read gene IDs from the TGE panel (1100 or so)
m <- match(genes, rowData(spe)$gene_name) ## or gene_id
total <- colSums(counts(spe))
total_tge <- colSums(counts(spe[m, ]))
percent <- total_tge / total * 100
I'll be interested to see how this changes for TGE vs whole genome.