Skip to content
Snippets Groups Projects
Commit 9e9d8261 authored by Tobias Marschall's avatar Tobias Marschall
Browse files

Make calls with/without population priors and with different regularization factors

parent 9807d0ea
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ import os.path
# * calculate a segmentation into potential SVs using Mosaicatcher
METHODS = ["simpleCalls_llr1", "simpleCalls_llr4", "biAllelic_llr1", "biAllelic_llr4"]
METHODS = ["simpleCalls_llr1_poppriorsFALSE_regfactor10", "simpleCalls_llr4_poppriorsFALSE_regfactor10", "simpleCalls_llr1_poppriorsTRUE_regfactor6", "simpleCalls_llr4_poppriorsTRUE_regfactor6", "simpleCalls_llr1_poppriorsTRUE_regfactor10", "simpleCalls_llr4_poppriorsTRUE_regfactor10", "biAllelic_llr1", "biAllelic_llr4"]
singularity: "docker://smei/mosaicatcher-pipeline:v0.1"
......@@ -463,9 +463,9 @@ rule mosaiClassifier_make_call:
input:
probs = "sv_probabilities/{sample}/{windows}.{bpdens}/probabilities.Rdata"
output:
"sv_calls/{sample}/{windows}.{bpdens}/simpleCalls_llr{llr}.txt"
"sv_calls/{sample}/{windows}.{bpdens}/simpleCalls_llr{llr}_poppriors{pop_priors,(TRUE|FALSE)}_regfactor{regfactor,[0-9]+}.txt"
log:
"log/mosaiClassifier_make_call/{sample}/{windows}.{bpdens}.{llr}.log"
"log/mosaiClassifier_make_call/{sample}/{windows}.{bpdens}.llr{llr}.poppriors{pop_priors}.regfactor{regfactor}.log"
script:
"utils/mosaiClassifier_call.snakemake.R"
......
log <- file(snakemake@log[[1]], open='wt')
sink(file=log, type='message')
sink(file=log, type='output')
library(data.table)
source("utils/mosaiClassifier/makeSVcalls.R")
probs = readRDS(snakemake@input[["probs"]])
llr = as.numeric(snakemake@wildcards[["llr"]])
probs = readRDS(snakemake@input[["probs"]])
llr = as.numeric(snakemake@wildcards[["llr"]])
use.pop.priors = eval(parse(text=snakemake@wildcards[["pop_priors"]]))
regularizationFactor = 10^(-as.numeric(snakemake@wildcards[["regfactor"]]))
probs <- mosaiClassifierPostProcessing(probs)
tab <- makeSVCallSimple(probs, llr_thr = llr)
probs <- mosaiClassifierPostProcessing(probs, regularizationFactor = regularizationFactor)
tab <- makeSVCallSimple(probs, llr_thr = llr, use.pop.priors = use.pop.priors)
write.table(tab, file = snakemake@output[[1]], sep = "\t", quote=F, row.names = F, col.names = T)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment