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
| #! /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
| #! /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
| 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') |
NewerOlder