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

Fix haplotag likelihood computation from snakefile

parent a5942117
No related branches found
No related tags found
No related merge requests found
......@@ -705,7 +705,7 @@ rule create_haplotag_table:
output:
tsv='haplotag/table/{sample}/by-cell/haplotag-counts.{cell}.{windows}.{bpdens}.tsv'
log:
"log/create_haplotag_table/{sample}.{cell}.log"
"log/create_haplotag_table/{sample}.{cell}.{windows}.{bpdens}.log"
script:
"utils/haplotagTable.snakemake.R"
......@@ -720,11 +720,11 @@ rule merge_haplotag_tables:
rule create_haplotag_likelihoods:
input:
haplotag_table='haplotag/table/{sample}/haplotag-counts.{windows}.{bpdens}.tsv'
sv_probs_table = 'sv_probabilities/{sample}/{windows}.{bpdens}/probabilities.Rdata'
haplotag_table='haplotag/table/{sample}/full/haplotag-counts.{windows}.{bpdens}.tsv',
sv_probs_table = 'sv_probabilities/{sample}/{windows}.{bpdens}/probabilities.Rdata',
output: 'haplotag/table/{sample}/haplotag-likelihoods.{windows}.{bpdens}.data'
log:
"log/create_haplotag_likelihoods/{sample}.log"
"log/create_haplotag_likelihoods/{sample}.{windows}.{bpdens}.log"
script:
"utils/haplotagProbs.snakemake.R"
......
sink(snakemake@log[[1]])
log <- file(snakemake@log[[1]], open='wt')
sink(file=log, type='message')
sink(file=log, type='output')
haplotagCounts <- snakemake@input[[haplotag_table]]
probs <- snakemake@input[[sv_probs_table]]
source('utils/haplotagProbs.R')
probs <- addHaploCountProbs(probs, haploCounts, alpha)
haplotagCounts <- fread(snakemake@input[["haplotag_table"]])
probs <- readRDS(snakemake@input[["sv_probs_table"]])
save(probs, file=snakemake@output[[1]])
\ No newline at end of file
probs <- addHaploCountProbs(probs, haplotagCounts, alpha=0.05)
saveRDS(probs, file=snakemake@output[[1]])
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