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
d580c130
Commit
d580c130
authored
7 years ago
by
Tobias Marschall
Browse files
Options
Downloads
Patches
Plain Diff
Add config option snv_calls to use existing SNV call sets
parent
7947b787
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Snake.config.json
+1
-0
1 addition, 0 deletions
Snake.config.json
Snakefile
+18
-3
18 additions, 3 deletions
Snakefile
with
19 additions
and
3 deletions
Snake.config.json
+
1
−
0
View file @
d580c130
...
...
@@ -10,6 +10,7 @@
"samtools"
:
"samtools"
,
"bcftools"
:
"bcftools"
,
"snv_calls"
:
""
,
"exclude_file"
:
"/g/korbel/meiers/tools/mosaicatcher/mosaicatcher/data/exclude/hg19.exclude"
,
"variable_bins"
:
{
...
...
This diff is collapsed.
Click to expand it.
Snakefile
+
18
−
3
View file @
d580c130
...
...
@@ -289,13 +289,16 @@ rule prepare_strandphaser_config_per_chrom:
print("bsGenome = '", config["R_reference"], "'", sep = "", file = f)
def locate_snv_vcf(wildcards):
if config["snv_calls"] == "":
return "snv_calls/{}.{}.vcf".format(config["sample"], wildcards.chrom)
else:
return "external_snv_calls/{}.{}.vcf".format(config["sample"], wildcards.chrom)
rule run_strandphaser_per_chrom:
input:
mergedbam = "snv_calls/merged.bam",
wcregions = "strand_states/" + config["sample"] + ".strandphaser_input.txt",
snppositions =
"snv_calls/" + config["sample"] + ".{chrom}.
vcf
"
,
snppositions =
locate_snv_
vcf,
configfile = "log/StrandPhaseR.{chrom}.config",
strandphaser = "utils/R-packages/StrandPhaseR/R/StrandPhaseR",
bamfolder = "bam"
...
...
@@ -402,3 +405,15 @@ rule merge_SNV_calls:
shell:
config["bcftools"] + " concat -O v -o {output} {input}"
rule split_external_snv_calls:
input:
vcf = config["snv_calls"]
output:
vcf = "external_snv_calls/" + config["sample"] + ".{chrom}.vcf"
log: "external_snv_calls/" + config["sample"] + ".{chrom}.vcf.log"
params:
bcftools = config["bcftools"],
#sample = config["sample"]
shell:
"({params.bcftools} view --samples " + config["sample"] + " --types snps {input.vcf} {wildcards.chrom} | bcftools view --genotype het - > {output.vcf}) > {log} 2>&1"
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