Skip to content

Instantly share code, notes, and snippets.

View cldotdev's full-sized avatar

Chienlung Huang cldotdev

View GitHub Profile
@cldotdev
cldotdev / fixname.py
Created April 17, 2013 06:21
fixname - Fix hit name in the blastlist (standalone)
#!/usr/bin/env python3
#
# fixname - Fix hit name in the blastlist
#
# Copyright (C) 2013, Jian-Long Huang
# Licensed under The MIT License
# http://opensource.org/licenses/MIT
#
# Author: Jian-Long Huang (jianlong@ntu.edu.tw)
# Version: 0.1
@cldotdev
cldotdev / DSSPData.py
Created March 17, 2013 14:50
A python script created to allow easy parsing of DSSP files.
# http://openwetware.org/wiki/Wilke:ParseDSSP
import re
class DSSPData:
def __init__(self):
self.num = []
self.resnum = []
self.moltyp = []
@cldotdev
cldotdev / mtmpfs
Last active December 14, 2015 04:39
Mounting the temperary directories to DRAM. This can reduce writes to SSD.
# Copy these snippets to /etc/fstab
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /home/XXX/.cache tmpfs defaults,noatime,mode=0775,uid=YYY,gid=ZZZ 0 0
# XXX = user name
# Get YYY and ZZZ (eg. uid=1000, gid=1000) by typing the command:
# $ id [user name]
# in your bash shell
###########################################################################################
## Compute N50 values for Assembly Results and Plot their Cumulative Length Distribution ##
###########################################################################################
## Author: Thomas Girke
## Last update: January 28, 2010
## Utilities: Compute N50 and plot cumulative length distribution.
## More details can be found here: http://manuals.bioinformatics.ucr.edu/home/ht-seq#TOC-Analyzing-Assembly-Results
## Overview:
## The N50 is a weighted median statistic such that 50% of the entire assembly
function showLineNumbers() {
/************************************
* Written by Andreas Papadopoulos *
* http://akomaenablog.blogspot.com *
* akoma1blog@yahoo.com *
************************************/
var isIE = navigator.appName.indexOf('Microsoft') != -1;
var preElems = document.getElementsByTagName('pre');
if (preElems.length == 0) return;