added first line to all func to run from
This commit is contained in:
parent
48a85ede0c
commit
552c5e77aa
8 changed files with 13 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env Rscript
|
||||
library(ggplot2)
|
||||
library(tidyverse)
|
||||
library(data.table)
|
||||
|
@ -18,5 +19,3 @@ aa_prop_bp <- function(plotdf
|
|||
, name = leg_name)
|
||||
return(mp)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#!/usr/bin/env Rscript
|
||||
########################################################################
|
||||
# TASK:calculate af and or for gwas data
|
||||
########################################################################
|
||||
my_afor <- function ( drug
|
||||
, gene
|
||||
, infile_master
|
||||
|
|
|
@ -9,5 +9,4 @@ mychisq_or = function(dst_numeric, mut_numeric){
|
|||
d = tab[1,1]
|
||||
if (d==0){ d<-0.5}
|
||||
(a/b)/(c/d)
|
||||
|
||||
}
|
|
@ -117,7 +117,6 @@ all_df = list(my_df, my_df_u, my_df_u_lig, dup_muts)
|
|||
|
||||
return(all_df)
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# end of data extraction and cleaning for plots #
|
||||
########################################################################
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env Rscript
|
||||
library(ggplot2)
|
||||
library(tidyverse)
|
||||
library(data.table)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env Rscript
|
||||
setwd("~/git/LSHTM_analysis/scripts/functions/")
|
||||
getwd()
|
||||
#############################################################
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env Rscript
|
||||
getwd()
|
||||
setwd("~/git/LSHTM_analysis/scripts/functions/")
|
||||
getwd()
|
||||
|
|
|
@ -104,6 +104,7 @@ plot_logo_multiple_muts = paste0(plotdir,"/", logo_multiple_muts)
|
|||
# REASSIGNMENT
|
||||
my_df = merged_df3
|
||||
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
colnames(my_df)
|
||||
str(my_df)
|
||||
|
||||
|
@ -113,7 +114,7 @@ c1 = unique(my_df$position)
|
|||
nrow(my_df)
|
||||
|
||||
# get freq count of positions so you can subset freq<1
|
||||
require(data.table)
|
||||
#require(data.table)
|
||||
setDT(my_df)[, mut_pos_occurrence := .N, by = .(position)] #189, 36
|
||||
|
||||
table(my_df$position)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue