saving
This commit is contained in:
parent
23bb087ea3
commit
ade1739753
3 changed files with 27 additions and 10 deletions
|
@ -161,9 +161,11 @@ if (nrow(bar_or) == nrow(sen1) + nrow(res1) ){
|
|||
# percent for OR muts
|
||||
pc_orR = nrow(res1)/(nrow(sen1) + nrow(res1)); pc_orR
|
||||
|
||||
cat("Number of R muts with OR>1:", nrow(res1)
|
||||
, "\nPercentage of muts with OR>1 i.e resistant:"
|
||||
, pc_orR *100 )
|
||||
cat("\nNo.of DST muts:", nrow(bar_or)
|
||||
, "\nNo of DST (R):", table(bar_or$sensitivity)[[1]]
|
||||
, "\nNo of DST (S):", table(bar_or$sensitivity)[[2]]
|
||||
, "\nNumber of R muts with OR >1 (n = ", nrow(res1),")"
|
||||
, "\nPercentage of muts with OR>1 i.e resistant:" , pc_orR *100 )
|
||||
|
||||
# muts with highest OR
|
||||
head(bar_or$mutationinformation, 10)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env Rscript
|
||||
#source("~/git/LSHTM_analysis/config/katg.R")
|
||||
source("~/git/LSHTM_analysis/config/embb.R")
|
||||
#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
|
||||
#=======
|
||||
|
@ -150,8 +150,12 @@ nrow(Out_df_ligS)
|
|||
Out_df_ligS$drug_site = ifelse(Out_df_ligS$position%in%aa_pos_drug, "drug", "no")
|
||||
table(Out_df_ligS$drug_site)
|
||||
|
||||
Out_df_ligS$heme_site = ifelse(Out_df_ligS$position%in%aa_pos_hem, "heme", "no")
|
||||
table(Out_df_ligS$heme_site)
|
||||
Out_df_ligS$dsl_site = ifelse(Out_df_ligS$position%in%aa_pos_dsl, "dsl", "no")
|
||||
table(Out_df_ligS$dsl_site)
|
||||
|
||||
Out_df_ligS$cdl_site = ifelse(Out_df_ligS$position%in%aa_pos_cdl, "cdl", "no")
|
||||
table(Out_df_ligS$cdl_site)
|
||||
|
||||
|
||||
#--------------------
|
||||
# write output file: KS test within grpup
|
||||
|
@ -219,8 +223,11 @@ nrow(Out_df_ncaS)
|
|||
Out_df_ncaS$drug_site = ifelse(Out_df_ncaS$position%in%aa_pos_drug, "drug", "no")
|
||||
table(Out_df_ncaS$drug_site)
|
||||
|
||||
Out_df_ncaS$heme_site = ifelse(Out_df_ncaS$position%in%aa_pos_hem, "heme", "no")
|
||||
table(Out_df_ncaS$heme_site)
|
||||
Out_df_ncaS$dsl_site = ifelse(Out_df_ncaS$position%in%aa_pos_dsl, "dsl", "no")
|
||||
table(Out_df_ncaS$dsl_site)
|
||||
|
||||
Out_df_ncaS$cdl_site = ifelse(Out_df_ncaS$position%in%aa_pos_cdl, "cdl", "no")
|
||||
table(Out_df_ncaS$cdl_site)
|
||||
|
||||
#--------------------
|
||||
# write output file: KS test within grpup
|
||||
|
@ -446,8 +453,11 @@ nrow(combined_table)
|
|||
combined_table$drug_site = ifelse(combined_table$position%in%aa_pos_drug, "drug", "no")
|
||||
table(combined_table$drug_site)
|
||||
|
||||
combined_table$heme_site = ifelse(combined_table$position%in%aa_pos_hem, "heme", "no")
|
||||
table(combined_table$heme_site)
|
||||
combined_table$dsl_site = ifelse(combined_table$position%in%aa_pos_dsl, "dsl", "no")
|
||||
table(combined_table$dsl_site)
|
||||
|
||||
combined_table$cdl_site = ifelse(combined_table$position%in%aa_pos_cdl, "cdl", "no")
|
||||
table(combined_table$cdl_site)
|
||||
|
||||
#--------------------
|
||||
# write output file: KS test within grpup
|
||||
|
|
|
@ -28,6 +28,11 @@ sel_lin_snps_n = length(sel_lin_snps); sel_lin_snps_n
|
|||
sel_lin_samples_id = unique(df2_lin$id)
|
||||
sel_lin_samples_id_n = length(sel_lin_samples_id);sel_lin_samples_id_n
|
||||
|
||||
|
||||
sel_df_u = df2[df2$id%in%sel_lin_samples_id,]
|
||||
|
||||
|
||||
|
||||
# are the snps that are not in L1-L4 unique to L5-L7
|
||||
left_snps = all_snps[!all_snps%in%sel_lin_snps]
|
||||
left_snps_n = length(left_snps); left_snps_n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue