Skip to content

Instantly share code, notes, and snippets.

View akhanf's full-sized avatar

Ali Khan akhanf

  • London, Ontario
View GitHub Profile
@akhanf
akhanf / Snakefile
Created May 21, 2020 12:42
Sample Snakefile for MDT
from os.path import join
configfile: 'config.yml'
container: config['container']
rule create_protocol:
input:
bvec = join(config['in_dir'],config['bvec']),
@akhanf
akhanf / snakemake_iterative_template
Last active October 2, 2020 23:52
Example of recipe for iteratively building a template using recursion (view graph with: snakemake -np --dag | dot | display)
input_images = ['A','B','C']
shell('touch {input_images}')
max_iters = 4
#need this to make sure iterations don't go below 0!
wildcard_constraints:
iteration="[0-9]+"
@akhanf
akhanf / snakemake_remotebatch
Created April 21, 2020 13:06
batch submission script
#!/bin/bash
hours=6
mem=128000
gpus=1
cpus=32
if [ "$#" -lt 2 ]
then
echo "Usage $0 RULE_NAME NUM_BATCHES <optional snakemake args>"