Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoqing Fang committed Mar 21, 2020
1 parent bcdf1d1 commit 6eab581
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
21 changes: 10 additions & 11 deletions gatk.smk
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,21 @@ rule sample_calling:
gvcfi="/data/bases/fangzq/GVCF/{strain}.raw.g.vcf.idx"
# gvcf=expand("/data/bases/fangzq/strains/GATK_TMP/{strain}.chr{i}.raw.g.vcf", i=CHROMSOME),
# gvcfi=expand("/data/bases/fangzq/strains/GATK_TMP/{strain}.chr{i}.raw.g.vcf.idx", i=CHROMSOME)
threads: 2
threads: 12
log: "/data/bases/fangzq/strains/{strain}.haplotypecaller.log"
params:
#java_ops="-Xmx16G -Djava.io.tmpdir=%s"%TMPDIR,
java_ops="-Xmx32G -Djava.io.tmpdir=%s"%TMPDIR,
chrs=CHROMSOME,
tmpdir=TMPDIR,
strain="{strain}"
shell:
"""gatk HaplotypeCaller \
-ERC GVCF --tmp-dir {params.tmpdir} \
--native-pair-hmm-threads {threads} \
--dbsnp {input.dbSNP} \
-R {input.genome} \
-I {input.bam} \
-O {output.gvcf} 2> {log}
"""
"gatk --java-options '{params.java_ops}' HaplotypeCaller "
"-ERC GVCF "
"--native-pair-hmm-threads {threads} "
"--dbsnp {input.dbSNP} "
"-R {input.genome} "
"-I {input.bam} "
"-O {output.gvcf} 2> {log} "
## split run into chromosomes
# run:
# for ch in params['chrs']:
Expand Down Expand Up @@ -90,7 +89,7 @@ rule joint_calling:
output: "combined.chr{i}.vcf",
params:
tmpdir=TMPDIR,
java_ops= "-Xmx12G -Djava.io.tmpdir=%s"%TMPDIR
java_ops= "-Xmx32G -Djava.io.tmpdir=%s"%TMPDIR
log: "/data/bases/fangzq/strains/chr{i}.GenotypeGVCFs.log"
shell:
"gatk --java-options '{params.java_ops}' "
Expand Down
3 changes: 1 addition & 2 deletions rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ def parse_samples(tab=config['sample_meta']):
with open(tab, 'rU') as f:
lines = f.readlines()
for line in lines:
line = line.strip()
if not len(line) or line.startswith('#'): continue #skip blank line or comment linne
item = line.split(" ")
item = line.strip().split()
SAMPLES.append(item[0])
SAMPLES_ALIAS.append(item[1])
GROUP.append(item[2])
Expand Down

0 comments on commit 6eab581

Please sign in to comment.