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 | |
import subprocess | |
import time | |
import logging | |
import ipyparallel | |
TEMPLATE="""#!/bin/sh |
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
1064,1068d1063 | |
< retries = 0 | |
< while not os.path.isfile(file_or_archive): | |
< time.sleep(5) | |
< if retries > 5: break | |
< retries += 1 | |
1426,1430d1420 | |
< retries = 0 | |
< while not os.path.isfile(file_or_archive): | |
< time.sleep(5) |
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
c = get_config() | |
### If you want to auto-save .html and .py versions of your notebook: | |
# modified from: https://github.com/ipython/ipython/issues/8009 | |
import os | |
from subprocess import check_call | |
def post_save(model, os_path, contents_manager): | |
"""post-save hook for converting notebooks to .py scripts""" | |
if model['type'] != 'notebook': | |
return # only do this for notebooks |
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 | |
# Trying to get biopython to parse SRA xml output. I think I need these XSDs produced by SRA to do this. | |
if [ ! -e ~/.biopython/Bio/Entrez/XSDs ]; then mkdir -p ~/.biopython/Bio/Entrez/XSDs; fi | |
cd ~/.biopython/Bio/Entrez/XSDs | |
wget -O SRA.common.xsd "http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/sra/doc/SRA_1-5/SRA.common.xsd?view=co" | |
wget -O SRA.submission.xsd "http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/sra/doc/SRA_1-5/SRA.submission.xsd?view=co" | |
wget -O SRA.study.xsd "http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/sra/doc/SRA_1-5/SRA.study.xsd?view=co" | |
wget -O SRA.sample.xsd "http://www.ncbi.nlm.nih.gov/viewvc/v1/trunk/sra/doc/SRA_1-5/SRA.sample.xsd?view=co" |
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
from pprint import pprint | |
import jinja2 | |
import markdown | |
HTML_TEMPLATE = """{% macro get_html() %} | |
{{ content | markdown }} | |
{% endmacro %} | |
{% set html_content = get_html() %} | |
Title from Markdown meta-data: {{ get_title() }} |
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 | |
# This is a little bash script to create a tunnel for running jupyter | |
# notebooks. | |
# | |
# You can run the script like so: | |
# | |
# $ jupyterTunnel start remote1 | |
# | |
# This will create an ssh tunnel on port 7000 to remote 1, and create a control | |
# socket 'jupyter-ctrl-socket' in the current working direcotry. To stop the |
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
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
# core | |
brew install coreutils | |
# key commands | |
brew install binutils | |
brew install diffutils | |
brew install ed --default-names | |
brew install findutils --with-default-names |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
/* minimal page background */ | |
#pageContainer { | |
margin-top: 24px; | |
} | |
.page { | |
max-width: 100% !important; | |
border: none !important; | |
margin-bottom: 0 !important; | |
/* fix for dynamic positioning of the .page div */ |
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
# vim: set ft=snakemake: | |
shell.prefix("""set -euo pipefail; | |
if [ -e /lscratch/$SLURM_JOBID ]; then | |
export TMPDIR=/lscratch/$SLURM_JOBID | |
else | |
export TMPDIR=/tmp | |
fi; | |
""") | |
workdir: '.' |
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 | |
from lcdblib.snakemake import helpers | |
from lcdblib.utils import utils | |
URI = '../lcdb-wrapper-tests' | |
TMPDIR='/mnt/threeTB/centos_scratch' | |
references = { | |
'dmel': { |
OlderNewer