Skip to content

Commit

Permalink
a few more specific exceptions, increase Broad LSF9 latency wait for …
Browse files Browse the repository at this point in the history
…Snakemake, remove some default snakemake targets
  • Loading branch information
dpark01 committed May 12, 2015
1 parent aeeecbf commit 1e486a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 6 additions & 3 deletions intrahost.py
Expand Up @@ -758,6 +758,9 @@ def parse_eff(eff_field):
(out['eff_type'], out['eff_codon_dna'], out['eff_aa'], out['eff_prot_len'], out['eff_gene'], out['eff_protein'], rank) = eff
return out

class SnpEffException(Exception):
pass

def parse_ann(ann_field, alleles, transcript_blacklist=set(('GP.2','GP.3'))):
''' parse the new snpEff "ANN" INFO field '''

Expand Down Expand Up @@ -798,12 +801,12 @@ def parse_ann(ann_field, alleles, transcript_blacklist=set(('GP.2','GP.3'))):
if not effs:
return {}
if len(effs) != len(effs_dict):
raise Exception("ANN field has non-unique alleles")
raise SnpEffException("ANN field has non-unique alleles")
for a in alleles:
if a not in effs_dict:
raise Exception("ANN field is missing ALT allele: " + a)
raise SnpEffException("ANN field is missing ALT allele: " + a)
if len(effs) != len(set(alleles)):
raise Exception("ANN field has %s entries, but ALT field has %s unique alleles: %s" % (
raise SnpEffException("ANN field has %s entries, but ALT field has %s unique alleles: %s" % (
len(effs), len(set(alleles)), ','.join(alleles)))

out = {}
Expand Down
1 change: 1 addition & 0 deletions pipes/Broad_LSF/run-pipe.sh
Expand Up @@ -17,6 +17,7 @@ source "$VENVDIR/bin/activate"
# invoke Snakemake in cluster mode with custom wrapper scripts
snakemake --timestamp --rerun-incomplete --keep-going --nolock \
--jobs 100000 --immediate-submit \
--latency-wait 20 \
--config mode=LSF job_profiler="$BINDIR/pipes/Broad_LSF/lsf-report.py" \
--directory . \
--jobscript "$BINDIR/pipes/Broad_LSF/jobscript.sh" \
Expand Down
3 changes: 0 additions & 3 deletions pipes/Snakefile
Expand Up @@ -36,9 +36,6 @@ rule all:
sample=read_samples_file(config["samples_assembly"])),
# intrahost variant calling
config["dataDir"]+'/'+config["subdirs"]["intrahost"] +'/isnvs.vcf.gz',
# create reference-guided analyses of diversity (quick outputs)
os.path.join(config["dataDir"], config["subdirs"]["interhost"], 'ref_guided.fasta'),
os.path.join(config["dataDir"], config["subdirs"]["interhost"], 'ref_guided.vcf.gz'),
# create summary reports
config["reportsDir"]+'/summary.fastqc.txt',
config["reportsDir"]+'/summary.spike_count.txt'
Expand Down

0 comments on commit 1e486a9

Please sign in to comment.