Skip to content

Instantly share code, notes, and snippets.

@DonFreed
DonFreed / test.smk
Created April 11, 2020 06:28
An example Snakmake file with the DAG dependent target wildcards
#!/usr/bin/env snakemake
# Requires Python3.6 or greater
rule align_A:
output:
outfile = "align__A/{sample}.bam"
shell:
'''
mkdir -p $(dirname {output.outfile})
@DonFreed
DonFreed / README.md
Last active January 23, 2017 21:19
Create gVCFs from all low-coverage 1000 Genomes samples
@DonFreed
DonFreed / 120x_denovo_cut.txt
Last active September 11, 2016 01:09
Mosaic Variant Sensitivity
63 63
49 66
211 27
56 64
140 18
65 65
68 61
39 30
75 58
10 18
@DonFreed
DonFreed / find_pl_allele.py
Last active February 1, 2016 17:01
Find the position of PL tags with arbitrary max alleles and ploidy.
def find_pl_allele(allele, n_alleles, ploidy):
gts = [0] * ploidy
idx = ploidy - 1
pl_pos = 0
while (sum(gts) <= ploidy * (n_alleles - 1)):
if allele in gts:
yield pl_pos
if sum(gts) == ploidy * (n_alleles - 1):
break