Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Feb 23, 2022
1 parent 48031ee commit d901564
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WGS_pipeline/correct_mutect2_clusteredevent.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ library(tidyverse)
args = commandArgs(trailingOnly=TRUE)

filepath <- args[1]
name <- args[2]
vcf <- vcfR::read.vcfR(filepath)
df <- vcf@fix %>% as_tibble() %>% transmute(chromosome = CHROM, start = POS,ref = REF,alt = ALT,
filter = FILTER) %>% type_convert()
Expand All @@ -19,4 +20,4 @@ count_df <- count_df %>% mutate(filter = ifelse(filter %in% c("clustered_events"
n_somatic_neighbor <= 2,"PASS",filter))
vcf@fix[,"FILTER"] <- count_df$filter

write.vcf(vcf,str_c(file_path_sans_ext(filepath),".cluster-corrected.vcf.gz"))
write.vcf(vcf,str_c(name,"_clustercorrected.vcf.gz"))

0 comments on commit d901564

Please sign in to comment.