Skip to content

Commit 8948c7f

Browse files
committed
v0.4 - clear folders for Manta run, fix optional annotation parameters.
1 parent 2bac4a1 commit 8948c7f

File tree

5 files changed

+24
-34
lines changed

5 files changed

+24
-34
lines changed

config/config.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
# All paths set on this file are relative to the workdir (if not absolute).
22
workdir: "/hpc/users/viallr01/ad-omics/ricardo/MyRepo/snakeSV/"
33

4-
OUT_FOLDER: "results_GIAB"
4+
OUT_FOLDER: "results_GIAB_refHGSVC2"
55
SAMPLE_KEY: "config/sampleKey.txt"
66

77
TOOLS:
88
- "manta"
99
- "smoove"
1010
- "delly"
1111

12-
# Custom annotations (optional)
13-
ANNOTATION_BED:
14-
- "data/annotation/custom/astrocytes_H3K27ac.bed"
15-
- "data/annotation/custom/microglia_H3K27ac.bed"
16-
- "data/annotation/custom/neurons_H3K27ac.bed"
17-
- "data/annotation/custom/oligodendrocytes_H3K27ac.bed"
18-
1912
# Custom SVs for genotyping (optional)
2013
SV_PANEL:
21-
- "data/sv_panel/hg002/variants.vcf"
14+
- "data/sv_panel/HGSVC2/merged.h37.vcf"
2215

2316
# Reference genome files
2417
REFERENCE_FASTA: "data/ref/human_g1k_v37.fasta"
2518
REF_BUILD: "37"
2619

2720
# Gencode GTF for SV annotation
28-
GENCODE_GTF: "data/annotation/gtf/gencode.v38lift37.annotation.nochr.gtf.gz"
21+
#GENCODE_GTF: "data/annotation/gtf/gencode.v38lift37.annotation.nochr.gtf.gz"
22+
23+
# Custom annotations (optional)
24+
#ANNOTATION_BED:
25+
# - "data/annotation/custom/astrocytes_H3K27ac.bed"
26+
# - "data/annotation/custom/microglia_H3K27ac.bed"
27+
# - "data/annotation/custom/neurons_H3K27ac.bed"
28+
# - "data/annotation/custom/oligodendrocytes_H3K27ac.bed"
2929

3030
# Custom tmp folder (if not /tmp)
3131
TMP_DIR: "~/ad-omics/ricardo/tmp/"
32-
33-
# Supporting files for tools like smoove and delly.
34-
# This path is relative to the Snakefile folder.
35-
# No need to change in most of the cases.
36-
LIB_DIR: "../resources/"
37-

example/tiny/config.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# All paths set on this file are relative to the workdir (if not absolute).
1+
# All paths set on this file are relative to the workdir (if not absolute).
22
SAMPLE_KEY: "sampleKey.txt"
33

44
TOOLS:
@@ -8,16 +8,7 @@ TOOLS:
88
# Reference genome files
99
REFERENCE_FASTA: "ref.fasta"
1010
REF_BUILD: "37"
11-
#DICT: "ref.dict"
12-
#NMASK: "ref.nmask.fasta.bed"
1311

1412
# Gencode GTF for SV annotation
1513
GENCODE_GTF: "gencode.gtf.gz"
1614

17-
# Custom tmp folder (if not /tmp)
18-
TMP_DIR: "/tmp/"
19-
20-
# Supporting files for tools like smoove and delly.
21-
# This path is relative to the Snakefile folder.
22-
# No need to change in most of the cases.
23-
LIB_DIR: "../resources/"

snakeSV

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Function: Print a help message.
44
display_help() {
5-
echo "snakeSV Pipeline (powered by Snakemake)"
5+
echo "snakeSV pipeline (powered by Snakemake)"
66
echo ""
77
echo "Usage: $0 --configfile FILE [Snakemake options]"
88
echo ""
@@ -15,11 +15,13 @@ display_help() {
1515
echo " -k, --keep-going go on with independent jobs if a job fails"
1616
echo " -n, --dryrun do not execute anything"
1717
echo " -p, --printshellcmds print out the shell commands that will be executed"
18-
echo " -t, --timestamp add a timestamp to all logging output"
18+
echo " -t, --timestamp add a timestamp to all logging output"
1919
echo ""
2020
echo " Full list of parameters:"
2121
echo " --help show Snakemake help (or snakemake -h)"
2222
echo ""
23+
echo "More info at https://github.com/RajLabMSSM/snakeSV"
24+
echo ""
2325
exit 0
2426
}
2527

workflow/Snakefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ include: "rules/preprocess.smk"
112112
include: "rules/qc.smk"
113113
include: "rules/other.smk"
114114
include: "rules/genotype.smk"
115-
include: "rules/annotation.smk"
116115

117116
###################################################################################################
118117
## SV discovery tools
@@ -126,7 +125,11 @@ for tool in config["TOOLS"]:
126125
###################################################################################################
127126
final_output = [OUT_FOLDER + "/merged_cohort/gt_merged.vcf.gz.tbi"]
128127

129-
if( "GENCODE_GTF" or "ANNOTATION_BED" not in config ):
128+
###################################################################################################
129+
## Annotations
130+
###################################################################################################
131+
if( ("GENCODE_GTF" in config) or ("ANNOTATION_BED" in config) ):
132+
include: "rules/annotation.smk"
130133
final_output.append(OUT_FOLDER + "/merged_cohort/gt_merged.annot.vcf.gz.tbi")
131134

132135
###################################################################################################

workflow/rules/tools/manta.smk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ rule manta:
33
bam = OUT_FOLDER + "/input/{sample}.bam",
44
bai = OUT_FOLDER + "/input/{sample}.bam.bai"
55
output:
6+
outdir = directory(OUT_FOLDER + "/sv_discovery/manta/{sample}/outdir/"),
67
vcf = OUT_FOLDER + "/sv_discovery/manta/{sample}/{sample}.manta.vcf.gz",
78
tbi = OUT_FOLDER + "/sv_discovery/manta/{sample}/{sample}.manta.vcf.gz.tbi"
89
conda:
@@ -14,9 +15,8 @@ rule manta:
1415
"configManta.py \
1516
--bam {input.bam} \
1617
--referenceFasta {REFERENCE_FASTA} \
17-
--runDir {OUT_FOLDER}/sv_discovery/manta/{wildcards.sample}/; "
18-
"{OUT_FOLDER}/sv_discovery/manta/{wildcards.sample}/runWorkflow.py; "
19-
"zgrep -v 'SVTYPE=BND' {OUT_FOLDER}/sv_discovery/manta/{wildcards.sample}/results/variants/diploidSV.vcf.gz | \
18+
--runDir {output.outdir}; "
19+
"{output.outdir}/runWorkflow.py; "
20+
"zgrep -v 'SVTYPE=BND' {output.outdir}/results/variants/diploidSV.vcf.gz | \
2021
bcftools sort -Oz -o {output.vcf}; "
2122
"tabix -p vcf {output.vcf}; "
22-

0 commit comments

Comments
 (0)