Skip to content

Commit b5aa082

Browse files
committed
Fix naming of variants table
1 parent a97a251 commit b5aa082

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

workflow/rules/report.smk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ rule demix_plot:
3030
rule heatmap_plot_data:
3131
conda: "../envs/renv.yaml"
3232
input:
33-
vcf = OUTDIR/f"{OUTPUT_NAME}.variants.tsv",
33+
variants = OUTDIR/f"{OUTPUT_NAME}.variants.tsv",
3434
metadata = config["METADATA"]
3535
output:
3636
table = report(REPORT_DIR_TABLES/"heatmap.csv")

workflow/scripts/report/heatmap.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ library(logger)
1414

1515
log_threshold(INFO)
1616

17-
vcf <- read_tsv(snakemake@input[["vcf"]])
17+
variants <- read_tsv(snakemake@input[["variants"]])
1818

1919
# Obtain sample names ordered by CollectionDate
2020
date_order <- read_csv(snakemake@input[["metadata"]]) %>%
2121
arrange(CollectionDate) %>%
2222
pull(ID) %>%
2323
unique()
2424

25-
# Create SNP variable and select useful variables from vcf
26-
vcf <- vcf %>% select(VARIANT_NAME, SAMPLE, ALT_FREQ)
25+
# Create SNP variable and select useful variables
26+
variants <- variants %>% select(VARIANT_NAME, SAMPLE, ALT_FREQ)
2727

28-
vcf <- vcf %>%
28+
variants <- variants %>%
2929
pivot_wider(
3030
names_from = VARIANT_NAME,
3131
values_from = ALT_FREQ,
@@ -38,4 +38,4 @@ vcf <- vcf %>%
3838
column_to_rownames(var = "SAMPLE")
3939

4040
log_info("Saving table to create heatmap")
41-
write.csv(vcf, snakemake@output[["table"]])
41+
write.csv(variants, snakemake@output[["table"]])

0 commit comments

Comments
 (0)