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
| testpts <- structure(list(x = c(4.9, 4.2, 4, 4.1, 4.4, 5.8, 5.8, 5.8, 5.8, | |
| 5.5, 4.9, 3.2, 3.2, 3.3, 5.4, 5.4, 5.7, 6.4, 6.7, 6.7, 6, 4.8, | |
| 3.6, 2.8, 3.5, 4.4, 5.1, 4, 3.7, 4.5, 4.9, 5.7), y = c(6.9, 6.2, | |
| 5.3, 4.1, 3.1, 2.9, 2.9, 3.5, 4.2, 4.9, 5.1, 4.9, 4.9, 5.2, 6.9, | |
| 6.9, 5.3, 3.8, 4.2, 5.6, 6.9, 5.8, 1.2, 2.5, 5.3, 6.4, 6.8, 7.6, | |
| 6.9, 5.4, 4.8, 4.4)), .Names = c("x", "y")) | |
| x <- do.call('cbind',testpts) | |
| ch<-chull(x) | |
| plot(x,pch=20) | |
| points(x[ch,],pch=20,col='red') |
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/awk -f | |
| BEGIN { | |
| OFS = FS | |
| } | |
| { | |
| # only one line starting with #CHROM needs to be modified in file | |
| # all others just print out unmoodified | |
| if ( $1 !~ /^#CHROM/ ) { |
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/awk -f | |
| { | |
| count[$1]++ | |
| } | |
| END { | |
| sort = "sort -n" | |
| for(j in count) | |
| print j, count[j] | sort | |
| close(sort) |
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
| import time | |
| import sys | |
| print time.strftime(sys.argv[2], time.strptime(sys.stdin.read().strip(), sys.argv[1])) |
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
| # prints to stderr in red | |
| function error() { >&2 echo -e "\033[31m$*\033[0m"; } | |
| function stop() { error "$*"; exit 1; } | |
| try() { "$@" || stop "cannot $*"; } |
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
| #Which shell? | |
| ps | grep $$ | |
| #Which distro? | |
| cat /etc/issue | |
| #Which connections? | |
| lsof -i | |
| netstat -lptu | |
| cat /proc/xxxx/net/tcp |
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 | |
| f=$1 | |
| extension=${f##*.} | |
| if [[ "$extension" == 'vcf' ]] | |
| then | |
| in=$f | |
| out=${in}.gz | |
| bgzip $in > $out |
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 | |
| set -u | |
| ## | |
| until [ -z "$1" ] | |
| do | |
| # use a case statement to test vars. we always test $1 and shift at the end of the for block. | |
| case $1 in | |
| # parameters to qsub |
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
| seq 1 10 | xargs -I x echo number x |
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
| for x in chr*.gvcf.gz | |
| do | |
| mkdir -p ${x%%.gvcf.gz} | |
| ln -s `pwd`/$x.tbi `pwd`/${x%%.gvcf.gz}/Levine_test.gvcf.gz.tbi | |
| done |
OlderNewer