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
# This script will calculate Shannon entropy from a MSA. | |
# Dependencies: | |
# Biopython, Matplotlib [optionally], Math | |
""" | |
Shannon's entropy equation (latex format): | |
H=-\sum_{i=1}^{M} P_i\,log_2\,P_i | |
Entropy is a measure of the uncertainty of a probability distribution (p1, ..... , pM) |
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/python | |
# This script is designed to take a genbank file and 'slice out'/'subset' | |
# regions (genes/operons etc.) and produce a separate file. This can be | |
# done explicitly by telling the script which base sites to use, or can | |
# 'decide' for itself by blasting a fasta of the sequence you're inter- | |
# ed in against the Genbank you want to slice a record out of. | |
# Note, the script (obviously) does not preseve the index number of the | |
# bases from the original |
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
# -*- coding: utf-8 -*- | |
""" | |
This script takes the .hhr files output by HHSuite and | |
turns the quite verbose file in to a fully tabulated | |
version with all the fields separated one, one line per | |
file. Thus, the file can be viewed simply in Excel etc. | |
It requires the non-standard pandas module. | |
""" |
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
# Extract fasta files by their descriptors stored in a separate file. | |
# Requires biopython | |
from Bio import SeqIO | |
import sys | |
import argparse | |
def getKeys(args): | |
"""Turns the input key file into a list. May be memory intensive.""" |
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 | |
ethernet=$(ifconfig en0 | awk '/ether/{print $2}') | |
wifi=$(ifconfig en1 | awk '/ether/{print $2}') | |
echo "Ethernet MAC Address: $ethernet" | |
echo "Wifi MAC Address: $wifi" |
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 | |
# Script to retrieve PDBs via the command line from the PDB HTTP/FTP | |
# Capture inputs | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options |
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
# Getting python logging info output in a colour coded and customised manner. | |
# Stolen from M. Galardini and https://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output/2532931#2532931 | |
import logging | |
import sys | |
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8) | |
COLORS = { | |
'WARNING' : YELLOW, |
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 | |
#### Print out all fastas ending in a certain string. #### | |
# Change *"$string" to *"$string"* to find containing, | |
# or "$string"* to find starts with. | |
file="$1" | |
string="$2" |
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
""" | |
This script pulls in homologs of proteins from PDB | |
as determined by HHSuite. It then employs pychimera and | |
UCSF Chimera to structurally match them and get an | |
indication of how well they score (RMSD) in order | |
to pick the best simulation. | |
""" | |
import os | |
import subprocess | |
import sys |
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 Rscript | |
# Plotting surface plots via ggplot2/plotly | |
# Usage: | |
# $ Rscript CDmeltplot.R -i data.csv -o filename | |
############################################################ | |
# General purpose heatmap plotting script for consistency. # | |
# This script can be slow as it was designed to be pretty # |
OlderNewer