This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Fail on error | |
# We can wipe this once we move this to public servers | |
if [ -z ${GITHUB_USER} ]; then | |
echo "Please set the variable GITHUB_USER used to download variantgrid and bioinformatics projects" | |
exit 1; | |
fi | |
if [ -z ${GITHUB_PASSWORD} ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import matplotlib.pyplot as plt | |
import numpy as np | |
LATEX_BASELINE = 0.1 | |
FUNDIES = 20 | |
BIRTH_CONTROL_INVENTION=0.1 | |
FUNDIE_ARROW_OFFSET = 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
if len(sys.argv) != 2: | |
print "Usage %s: samtools_index" % os.path.basename(sys.argv[0]) | |
sys.exit(1) | |
samtools_index = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sam_or_bam_has_chrom(sam_or_bam_filename): | |
''' return true if sam or bam has chr in header reference names | |
warning: this will die if you have BOTH chr and NO chr | |
''' | |
sf = pysam.Samfile(sam_or_bam_filename, "rb") | |
header_dict = sf.header | |
sq = header_dict['SQ'] | |
has_chr = 0 | |
no_chr = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
print [''.join(s) for s in itertools.permutations("ACGT")] |