Skip to content

Commit 7b2831d

Browse files
committed
fix missing column
1 parent b697a7c commit 7b2831d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

workflow/scripts/calculate_dnds.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ dn.ds <- variants %>%
6767
summarise(Freq = sum(ALT_FREQ, na.rm = TRUE), .groups = "drop") %>%
6868
complete(SAMPLE, SYNONYMOUS = c("No", "Yes"), fill = list(Freq = 0)) %>%
6969
pivot_wider(names_from = SYNONYMOUS, values_from = Freq) %>%
70-
transmute(
70+
mutate(
7171
dn = No / total_n,
7272
ds = Yes / total_s
7373
) %>%
74-
ungroup() %>%
75-
left_join(unique(select(variants, SAMPLE, interval))) %>%
74+
left_join(unique(select(variants, SAMPLE, interval)), by = "SAMPLE") %>%
7675
transmute(
7776
sample = SAMPLE,
7877
day = interval,

0 commit comments

Comments
 (0)