File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ rule demix_plot:
3030rule 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" )
Original file line number Diff line number Diff line change @@ -14,18 +14,18 @@ library(logger)
1414
1515log_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
2020date_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
4040log_info(" Saving table to create heatmap" )
41- write.csv(vcf , snakemake @ output [[" table" ]])
41+ write.csv(variants , snakemake @ output [[" table" ]])
You can’t perform that action at this time.
0 commit comments