File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,18 +11,18 @@ library(logger)
1111
1212log_threshold(INFO )
1313
14- log_info(" Reading variants table, replacing CHROM with the reference name" )
14+ log_info(" Reading variants table, replacing REGION with the reference name" )
1515variants <- read_tsv(
1616 snakemake @ input $ tsv ,
1717 col_types = list (
18- CHROM = col_character(),
18+ REGION = col_character(),
1919 POS = col_integer(),
2020 REF = col_character(),
2121 ALT = col_character()
2222 )
2323) %> %
2424 mutate(
25- CHROM = snakemake @ params $ ref_name ,
25+ REGION = snakemake @ params $ ref_name ,
2626 is_insertion = startsWith(ALT , " +" ),
2727 is_deletion = startsWith(ALT , " -" ),
2828 REF_VCF = case_when(
@@ -35,8 +35,7 @@ variants <- read_tsv(
3535 TRUE ~ ALT
3636 )
3737 ) %> %
38- select(- is_insertion , - is_deletion ) %> %
39- rename(CHROM = REGION )
38+ select(- is_insertion , - is_deletion )
4039
4140log_info(" Reading annotation table" )
4241annotation <- read_tsv(
@@ -68,15 +67,16 @@ merged <- left_join(
6867 variants ,
6968 annotation ,
7069 by = c(
71- " CHROM " = " CHROM" ,
70+ " REGION " = " CHROM" ,
7271 " POS" = " POS" ,
7372 " REF_VCF" = " REF" ,
7473 " ALT_VCF" = " ALT"
7574 )
7675) %> %
7776 mutate(
7877 SAMPLE = snakemake @ params $ sample
79- )
78+ ) %> %
79+ rename(CHROM = REGION )
8080
8181log_info(" Saving results" )
8282write_tsv(
You can’t perform that action at this time.
0 commit comments