This file contains hidden or 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 re, sys, os | |
from stat import S_ISFIFO | |
import argparse | |
# quick and dirty script to show emoji or bars for samtools mpileup quality scrores | |
# extra verbose so this does not require any external libraries | |
# based on fastqe and emojify: | |
# https://raw.githubusercontent.com/fastqe/fastqe/master/fastqe/fastqe_map.py |
This file contains hidden or 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
||id.google.com^ | |
||accounts.google.com/gsi/$3p |
This file contains hidden or 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 sys, re | |
flowcell_to_machine_model_and_chemistry = { | |
r'[A-Z,0-9]{5}AAXX':{ | |
"machine": "Illumina Genome Analyzer IIx", | |
"chemistry": "All", | |
"lane_count": 8, | |
"note": "" |
This file contains hidden or 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 sys, os | |
import argparse | |
from Bio import SeqIO | |
from Bio.Seq import MutableSeq, Seq | |
from Bio.SeqIO import FastaIO | |
from itertools import cycle, chain | |
This file contains hidden or 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 gets the state of Meross outlets, model MSS110. It may only work if the outlets have been added via HomeKit but not accessed via the Meross cloud. | |
# requires jq | |
# see Meross API: | |
# https://github.com/dieantu/ha-config/blob/96cd122bcb6e0559e147c57d04448828cbc190d5/custom_components/meross_lan/merossclient/api.http | |
PLUG_IP=$1 | |
PLUG_STATE=$2 | |
currenttime="$(date '+%s')" |
This file contains hidden or 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
//var delimitRegex = /\W+/; | |
//var delimitRegex = /[^\w\n]+/; | |
var delimitRegex = /[^\w\-\–\—\(\)\.:,;]+/; | |
function countPerSection() { | |
var body = DocumentApp.getActiveDocument().getBody(); | |
var para = body.getParagraphs(); | |
var levels = para.map(function(p) { | |
return [DocumentApp.ParagraphHeading.TITLE, | |
DocumentApp.ParagraphHeading.SUBTITLE, |
This file contains hidden or 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 glob | |
import pandas as pd | |
import pzfx_parser as gpp # pip install pzfx_parser; conda install openpyxl | |
gp_ext = ".pzfx" | |
for f in glob.glob(f"./*{gp_ext}"): |
This file contains hidden or 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 -o pipefail | |
DEPENDENCIES=(iqtree mafft trimal curl python) | |
if ! $(hash $DEPENDENCIES &> /dev/null); then | |
echo "ERROR! aborting..." | |
echo "The following need to be installed and on the PATH:" | |
for dependency in ${DEPENDENCIES[@]}; do |
This file contains hidden or 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 | |
curl http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucest&rettype=fasta&id=NC_045512.2 > NC_045512.2.fasta |
This file contains hidden or 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
# matplotlib color cycler using Okabe & Ito's palette | |
# https://jfly.uni-koeln.de/color/ | |
# later mentioned by Bang Wong: | |
# https://www.nature.com/articles/nmeth.1618 | |
# re-order colors as desired for the application | |
c = cycler(color=[ | |
(0,0,0), # black | |
(230/255, 159/255, 0/255), # orange | |
(86/255, 180/255, 233/255), # sky blue | |
(0/255, 158/255, 115/255), # blueish green |