Skip to content

Instantly share code, notes, and snippets.

@crosenth
Last active December 10, 2015 20:18
Show Gist options
  • Save crosenth/4487031 to your computer and use it in GitHub Desktop.
Save crosenth/4487031 to your computer and use it in GitHub Desktop.
SConstruct template
"""
Short description here
"""
import os
from bioscons.fileutils import Targets
from bioscons.slurm import SlurmEnvironment
from SCons.Script import ARGUMENTS, Variables, Decider
# check timestamps before calculating md5 checksums
# see http://www.scons.org/doc/production/HTML/scons-user.html#AEN929
Decider('MD5-timestamp')
outdir = ARGUMENTS.get('out', 'output')
# Cluster configuration
use_cluster = ARGUMENTS.get('use_cluster', 'false') == 'true'
slurm_queue = ARGUMENTS.get('slurm_queue', 'any')
blast_nproc = ARGUMENTS.get('blast_nproc', 6)
vars = Variables()
vars.Add('out',
help = '',
default = outdir)
env = SlurmEnvironment(ENV = os.environ,
variables = vars,
use_cluster=use_cluster,
slurm_queue=slurm_queue,
blast_nproc=blast_nproc
)
targets = Targets()
command = env.Command(
target = '',
source = '',
action = ('')
)
targets.update(locals().values())
# identify extraneous files
targets.show_extras(outdir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment