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 bash | |
## pyprofile: profile Python script | |
## $Revision$ | |
## Copyright 2011 Michael M. Hoffman <[email protected]> | |
## Modified by Tao Liu: Correctly get the command name. | |
set -o nounset | |
set -o pipefail |
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 | |
if [[ $# < 2 ]];then | |
echo 'need two parameters: $0 <interval> <pid>' | |
exit 1; | |
fi | |
INTERVAL=$1 | |
PID=$2 |
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 subprocess | |
import sys | |
import os | |
import time | |
#time_stamp=time.strftime("%y-%m-%d_%H-%M-%S") | |
time_stamp=str(time.time()) |
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 | |
# Time-stamp: <2012-01-10 17:21:24 Tao Liu> | |
# in the wiggle file from MA2C, the 1st column -- position is actually | |
# the center of each probe. Some probes may overlap. In order to | |
# convert them to appropriate bigwig, I need to create bedGraph file | |
# with above two problems fixed. | |
import os | |
import sys |
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
python -c 'import math;import random;n=1000000L;print float( n - reduce( lambda x, y: x//1+y//1, map( lambda x: math.hypot( random.random(), random.random() ), range(n) ) ) )/n*4' |
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 | |
if [ $# -lt 1 ]; then | |
echo `basename $0` "<PET RNAseq SAM filename>" | |
exit | |
fi | |
F=$1 | |
# chromosome length file |
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/perl -w | |
# Time-stamp: <2004-04-02 14:37:41 Tao Liu> | |
use strict; | |
if (@ARGV>0 and $ARGV[0] eq "-h") { | |
print "ediff : compute two sets with \'or diff and\'. \nUsage:\tediff [-h] : help, this info\n\tediff A or B : union of two sets\n\tediff A diff B : elements in | |
A but not in B\n\tediff A and B : intersection of two sets\n"; | |
exit; | |
} |
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 | |
# Time-stamp: <2012-04-12 12:12:53 Tao Liu> | |
import sys | |
import pstats | |
# ------------------------------------ | |
# Main function | |
# ------------------------------------ | |
def main(): | |
if len(sys.argv) < 3: |
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 | |
# check commands: slopBed, bedGraphToBigWig and bedClip | |
which bedtools &>/dev/null || { echo "bedtools not found! Download bedTools: <http://code.google.com/p/bedtools/>"; exit 1; } | |
which bedGraphToBigWig &>/dev/null || { echo "bedGraphToBigWig not found! Download: <http://hgdownload.cse.ucsc.edu/admin/exe/>"; exit 1; } | |
which bedClip &>/dev/null || { echo "bedClip not found! Download: <http://hgdownload.cse.ucsc.edu/admin/exe/>"; exit 1; } | |
# end of checking |
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 | |
# modified from prockmon | |
unset LD_LIBRARY_PATH | |
if [[ $# < 2 ]];then | |
echo 'Check total CPU time and maximum memory usage of a process.' | |
echo 'need two parameters: $0 <interval> <pid>' | |
exit 1; | |
fi |
OlderNewer