Skip to content

Commit 7b8218b

Browse files
committed
Use text instead of labels for pseudovolcano plot
1 parent 23e3cff commit 7b8218b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

workflow/scripts/report/snp_plots.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ vcf <- vcf %>%
5252

5353
# Fill positions without alt frequency with 0
5454
vcf <- vcf %>%
55-
complete(nesting(REGION, VARIANT_NAME, POS), SAMPLE, fill = list(ALT_FREQ = 0))
55+
complete(
56+
nesting(REGION, VARIANT_NAME, POS),
57+
SAMPLE,
58+
fill = list(ALT_FREQ = 0)
59+
)
5660

5761
# Join variants file and metadata file
5862
vcf <- left_join(vcf, data, by = c("SAMPLE" = "ID"))
@@ -128,7 +132,7 @@ volcano <- cor.df.fill %>%
128132
y = trans.p
129133
) +
130134
geom_point() +
131-
geom_label_repel(aes(label = label), max.overlaps = 1000) +
135+
geom_text_repel(aes(label = label), max.overlaps = 1000, direction = "x") +
132136
xlim(c(-1, 1)) +
133137
geom_hline(
134138
aes(yintercept = -log10(0.05)),

0 commit comments

Comments
 (0)