File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ log_info("Finding synonymous and non synonymous variants")
3434# Adding synonymous variable
3535data <- mutate(
3636 data ,
37- synonimous = case_when(
37+ SYNONYMOUS = case_when(
3838 REF_AA == ALT_AA ~ " Yes" ,
3939 TRUE ~ " No"
4040 )
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ empty_vcf <- tibble(
4343 VARIANT_NAME = as.character(NA ),
4444 ALT_FREQ = as.numeric(NA ),
4545 GB_FEATURE = as.character(NA ),
46- synonimous = as.character(NA ),
46+ SYNONYMOUS = as.character(NA ),
4747 POS = as.numeric(NA ),
4848 ALT = as.character(NA ),
4949 NV_class = as.character(NA ),
@@ -58,7 +58,7 @@ vcf <- vcf %>%
5858 VARIANT_NAME ,
5959 ALT_FREQ ,
6060 GB_FEATURE ,
61- synonimous ,
61+ SYNONYMOUS ,
6262 POS ,
6363 ALT
6464 )
@@ -94,7 +94,7 @@ vcf <- vcf %>%
9494 ),
9595 Class = case_when(
9696 GB_FEATURE == " Intergenic" ~ " Intergenic" ,
97- TRUE ~ synonimous
97+ TRUE ~ SYNONYMOUS
9898 ),
9999 POS = as.numeric(POS )
100100 ) %> %
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ vcf <- vcf %>%
2626 REGION ,
2727 ALT_FREQ ,
2828 GB_FEATURE ,
29- synonimous ,
29+ SYNONYMOUS ,
3030 POS
3131 )
3232
@@ -45,12 +45,12 @@ vcf <- left_join(vcf, metadata)
4545# PLOT
4646log_info(" Ploting dN and dS over time" )
4747plot_df <- vcf %> %
48- group_by(SAMPLE , synonimous ) %> %
48+ group_by(SAMPLE , SYNONYMOUS ) %> %
4949 summarise(
5050 Freq = sum(ALT_FREQ , na.rm = TRUE )
5151 ) %> %
5252 pivot_wider(
53- names_from = synonimous ,
53+ names_from = SYNONYMOUS ,
5454 values_from = Freq ,
5555 values_fill = 0
5656 ) %> %
@@ -135,12 +135,12 @@ ggsave(
135135# PLOT TABLES
136136log_info(" Saving plot table" )
137137vcf %> %
138- group_by(SAMPLE , synonimous ) %> %
138+ group_by(SAMPLE , SYNONYMOUS ) %> %
139139 summarise(
140140 Freq = sum(ALT_FREQ , na.rm = TRUE )
141141 ) %> %
142142 pivot_wider(
143- names_from = synonimous ,
143+ names_from = SYNONYMOUS ,
144144 values_from = Freq ,
145145 values_fill = 0
146146 ) %> %
You can’t perform that action at this time.
0 commit comments