added Lin_count.R
This commit is contained in:
parent
2e29cf8011
commit
f244741e83
1 changed files with 48 additions and 0 deletions
48
scripts/plotting/plotting_thesis/Lin_count.R
Normal file
48
scripts/plotting/plotting_thesis/Lin_count.R
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#=============
|
||||||
|
# Data: Input
|
||||||
|
#==============
|
||||||
|
#source("~/git/LSHTM_analysis/config/alr.R")
|
||||||
|
#source("~/git/LSHTM_analysis/config/embb.R")
|
||||||
|
#source("~/git/LSHTM_analysis/config/gid.R")
|
||||||
|
#source("~/git/LSHTM_analysis/config/katg.R")
|
||||||
|
#source("~/git/LSHTM_analysis/config/pnca.R")
|
||||||
|
source("~/git/LSHTM_analysis/config/rpob.R")
|
||||||
|
|
||||||
|
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||||
|
source("~/git/LSHTM_analysis/scripts/plotting/plotting_colnames.R")
|
||||||
|
|
||||||
|
###########################################################
|
||||||
|
class(merged_df2)
|
||||||
|
foo = as.data.frame(colnames(merged_df2))
|
||||||
|
|
||||||
|
cols_to_subset = c('mutationinformation'
|
||||||
|
, 'snp_frequency'
|
||||||
|
, 'pos_count'
|
||||||
|
, 'position'
|
||||||
|
, 'lineage'
|
||||||
|
, "sensitivity"
|
||||||
|
#, 'lineage_multimode'
|
||||||
|
, 'dst'
|
||||||
|
, 'dst2'
|
||||||
|
#, 'dst_multimode'
|
||||||
|
#, 'dst_multimode_all'
|
||||||
|
, 'dst_mode')
|
||||||
|
|
||||||
|
my_df = merged_df2[ ,cols_to_subset]
|
||||||
|
|
||||||
|
cat("\nTotal samples for ALL lineages", tolower(gene),":", nrow(my_df))
|
||||||
|
cat("\nTotal muts in ALL lineages", tolower(gene),":"
|
||||||
|
, length(unique(my_df$mutationinformation)))
|
||||||
|
|
||||||
|
sel_lineages1 = c("LBOV", "")
|
||||||
|
my_df2 = my_df[!my_df$lineage%in%sel_lineages1,]
|
||||||
|
table(my_df2$lineage)
|
||||||
|
sel_lineages2 = c("L1", "L2", "L3", "L4")
|
||||||
|
my_df2 = my_df2[my_df2$lineage%in%sel_lineages2,]
|
||||||
|
cat("\nTotal samples for L1-L4", tolower(gene),":", nrow(my_df2))
|
||||||
|
cat("\nTotal muts for L1-L4", tolower(gene),":"
|
||||||
|
, length(unique(my_df2$mutationinformation)))
|
||||||
|
|
||||||
|
table(my_df2$lineage)
|
||||||
|
table(my_df2$lineage,my_df2$sensitivity)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue