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 | |
# Time-stamp: <2013-09-24 15:23:09 Tao Liu> | |
import os | |
import sys | |
# ------------------------------------ | |
# Main function | |
# ------------------------------------ | |
def main(): | |
if len( sys.argv ) < 4: |
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 | |
# Time-stamp: <2013-09-17 17:17:21 Tao Liu> | |
import os | |
import sys | |
# ------------------------------------ | |
# Main function | |
# ------------------------------------ | |
def main(): | |
if len(sys.argv) < 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
perl -ne 'if (/^(\S+\/1)\:([ATCGN]+)\:(\S+)$/){print "@",$1,"\n",$2,"\n","+\n",$3,"\n";}' a.txt > a.fastq |
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 | |
# 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 |
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 | |
# 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 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 | |
# 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 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/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 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 | |
if [ $# -lt 1 ]; then | |
echo `basename $0` "<PET RNAseq SAM filename>" | |
exit | |
fi | |
F=$1 | |
# chromosome length file |
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
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 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 | |
# 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 |