Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mosaicatcher Update
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Weber
Mosaicatcher Update
Commits
8a5f43ef
Commit
8a5f43ef
authored
6 years ago
by
Maryam Ghareghani
Committed by
Tobias Marschall
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added a cutoff on the fraction of blacklisted bins for SV calling
parent
3c7b01e4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Snakefile
+5
-3
5 additions, 3 deletions
Snakefile
utils/mosaiClassifier/makeSVcalls.R
+5
-1
5 additions, 1 deletion
utils/mosaiClassifier/makeSVcalls.R
utils/mosaiClassifier_call.snakemake.R
+3
-1
3 additions, 1 deletion
utils/mosaiClassifier_call.snakemake.R
with
13 additions
and
5 deletions
Snakefile
+
5
−
3
View file @
8a5f43ef
...
@@ -557,11 +557,13 @@ rule plot_heatmap:
...
@@ -557,11 +557,13 @@ rule plot_heatmap:
rule mosaiClassifier_make_call:
rule mosaiClassifier_make_call:
input:
input:
probs = 'haplotag/table/{sample}/haplotag-likelihoods.{window
s
}.{bpdens}.Rdata'
probs = 'haplotag/table/{sample}/haplotag-likelihoods.{window}
_fixed_norm
.{bpdens}.Rdata'
output:
output:
"sv_calls/{sample}/{windows}.{bpdens,selected_j[0-9\\.]+_s[0-9\\.]+}/simpleCalls_llr{llr}_poppriors{pop_priors,(TRUE|FALSE)}_haplotags{use_haplotags,(TRUE|FALSE)}_gtcutoff{gtcutoff,[0-9\\.]+}_regfactor{regfactor,[0-9]+}.txt"
"sv_calls/{sample}/{window}_fixed_norm.{bpdens,selected_j[0-9\\.]+_s[0-9\\.]+}/simpleCalls_llr{llr}_poppriors{pop_priors,(TRUE|FALSE)}_haplotags{use_haplotags,(TRUE|FALSE)}_gtcutoff{gtcutoff,[0-9\\.]+}_regfactor{regfactor,[0-9]+}.txt"
params:
minFrac_used_bins = 0.8
log:
log:
"log/mosaiClassifier_make_call/{sample}/{window
s
}.{bpdens}.llr{llr}.poppriors{pop_priors}.haplotags{use_haplotags}.gtcutoff{gtcutoff}.regfactor{regfactor}.log"
"log/mosaiClassifier_make_call/{sample}/{window}
_fixed_norm
.{bpdens}.llr{llr}.poppriors{pop_priors}.haplotags{use_haplotags}.gtcutoff{gtcutoff}.regfactor{regfactor}.log"
script:
script:
"utils/mosaiClassifier_call.snakemake.R"
"utils/mosaiClassifier_call.snakemake.R"
...
...
This diff is collapsed.
Click to expand it.
utils/mosaiClassifier/makeSVcalls.R
+
5
−
1
View file @
8a5f43ef
...
@@ -9,7 +9,7 @@ source("utils/mosaiClassifier/mosaiClassifier.R")
...
@@ -9,7 +9,7 @@ source("utils/mosaiClassifier/mosaiClassifier.R")
#' @author Sascha Meiers
#' @author Sascha Meiers
#' @export
#' @export
#'
#'
makeSVCallSimple
<-
function
(
probs
,
llr_thr
=
1
,
use.pop.priors
=
FALSE
,
use.haplotags
=
FALSE
,
genotype.cutoff
=
0.0
)
{
makeSVCallSimple
<-
function
(
probs
,
llr_thr
=
1
,
use.pop.priors
=
FALSE
,
use.haplotags
=
FALSE
,
genotype.cutoff
=
0.0
,
bin.size
,
minFrac.used.bins
=
0.5
)
{
assert_that
(
is.data.table
(
probs
),
assert_that
(
is.data.table
(
probs
),
"sample"
%in%
colnames
(
probs
),
"sample"
%in%
colnames
(
probs
),
...
@@ -23,6 +23,10 @@ makeSVCallSimple <- function(probs, llr_thr = 1, use.pop.priors = FALSE, use.hap
...
@@ -23,6 +23,10 @@ makeSVCallSimple <- function(probs, llr_thr = 1, use.pop.priors = FALSE, use.hap
# make sure post-processing was done beforehands
# make sure post-processing was done beforehands
assert_that
(
"nb_hap_pp"
%in%
colnames
(
probs
))
%>%
invisible
assert_that
(
"nb_hap_pp"
%in%
colnames
(
probs
))
%>%
invisible
# kick out the segments with a large fraction of blacklisted bins
probs
<-
probs
[
num_bins
*
bin.size
/
(
end
-
start
)
>=
minFrac.used.bins
]
setkey
(
probs
,
chrom
,
start
,
end
,
sample
,
cell
)
setkey
(
probs
,
chrom
,
start
,
end
,
sample
,
cell
)
if
(
use.pop.priors
)
{
if
(
use.pop.priors
)
{
...
...
This diff is collapsed.
Click to expand it.
utils/mosaiClassifier_call.snakemake.R
+
3
−
1
View file @
8a5f43ef
...
@@ -11,8 +11,10 @@ use.pop.priors = eval(parse(text=snakemake@wildcards[["pop_priors"]]))
...
@@ -11,8 +11,10 @@ use.pop.priors = eval(parse(text=snakemake@wildcards[["pop_priors"]]))
use.haplotags
=
eval
(
parse
(
text
=
snakemake
@
wildcards
[[
"use_haplotags"
]]))
use.haplotags
=
eval
(
parse
(
text
=
snakemake
@
wildcards
[[
"use_haplotags"
]]))
regularizationFactor
=
10
^
(
-
as.numeric
(
snakemake
@
wildcards
[[
"regfactor"
]]))
regularizationFactor
=
10
^
(
-
as.numeric
(
snakemake
@
wildcards
[[
"regfactor"
]]))
genotype.cutoff
=
as.numeric
(
snakemake
@
wildcards
[[
"gtcutoff"
]])
genotype.cutoff
=
as.numeric
(
snakemake
@
wildcards
[[
"gtcutoff"
]])
minFrac.used.bins
=
as.numeric
(
snakemake
@
params
[[
"minFrac_used_bins"
]])
bin.size
=
as.numeric
(
snakemake
@
wildcards
[[
"window"
]])
probs
<-
mosaiClassifierPostProcessing
(
probs
,
regularizationFactor
=
regularizationFactor
)
probs
<-
mosaiClassifierPostProcessing
(
probs
,
regularizationFactor
=
regularizationFactor
)
tab
<-
makeSVCallSimple
(
probs
,
llr_thr
=
llr
,
use.pop.priors
=
use.pop.priors
,
use.haplotags
=
use.haplotags
,
genotype.cutoff
=
genotype.cutoff
)
tab
<-
makeSVCallSimple
(
probs
,
llr_thr
=
llr
,
use.pop.priors
=
use.pop.priors
,
use.haplotags
=
use.haplotags
,
genotype.cutoff
=
genotype.cutoff
,
bin.size
,
minFrac.used.bins
=
minFrac.used.bins
)
write.table
(
tab
,
file
=
snakemake
@
output
[[
1
]],
sep
=
"\t"
,
quote
=
F
,
row.names
=
F
,
col.names
=
T
)
write.table
(
tab
,
file
=
snakemake
@
output
[[
1
]],
sep
=
"\t"
,
quote
=
F
,
row.names
=
F
,
col.names
=
T
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment