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
| end_dist=30000 | |
| chrom_I=15072434 | |
| chrom_II=15279421 | |
| chrom_III=13783801 | |
| chrom_IV=17493829 | |
| chrom_V=20924180 | |
| chrom_X=17718942 | |
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/local/bin/perl | |
| # | |
| # | |
| # Perl script find_closest_worm_paralogs4.pl | |
| # Written by Avril Coghlan (alc@sanger.ac.uk) | |
| # 16-Feb-09. | |
| # | |
| # This perl script finds the bootstrap value for the | |
| # clade containing a pair of C. elegans paralogs in a family (where | |
| # there is no other gene in that clade, ie. they are each other's |
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
| # Special thanks for insights from flowingdata.com regarding this. | |
| library(plotKML) | |
| library(plyr) | |
| library(dplyr) | |
| library(fpc) | |
| num_locations <- 5 | |
| # Usage: Place this script in the directory containing your runkeeper data. You can run from terminal using 'Rscript map_runkeeper.R', or |
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
| # https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
| brew install coreutils | |
| brew install binutils | |
| brew install diffutils | |
| brew install ed --with-default-names | |
| brew install findutils --with-default-names | |
| brew install gawk | |
| brew install gnu-indent --with-default-names | |
| brew install gnu-sed --with-default-names |
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
| """ | |
| Reads a FastQ file from stdin and writes a file with unique records to sdout | |
| usage: | |
| %s < in.fastq > out.unique.fastq | |
| see: http://hackmap.blogspot.com/2010/10/bloom-filter-ing-repeated-reads.html | |
| """ | |
| from bloomfaster import Elf | |
| import collections | |
| import sys |
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
| ##################### | |
| # R function for downloading plain-text data from GitHub | |
| # Christopher Gandrud | |
| # 7 January 2013 | |
| ##################### | |
| # source_GitHubData is directly based on source_url from the Hadley Wickham's devtools package | |
| source_GitHubData <-function(url, sep = ",", header = TRUE) | |
| { |
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
| rows <- function(tab, idx=TRUE) { | |
| # Set idx to attach an index column | |
| if (is.na(tab) || is.null(tab) || nrow(tab) == 0) { | |
| return(list()) | |
| } | |
| lapply(seq_len(nrow(tab)), | |
| function(i) { | |
| row <- unclass(tab[i,,drop=F]) | |
| if (idx) { | |
| row$idx <- i |
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
| # Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
| $ sudo chown -R `whoami` /usr/local/texlive | |
| $ tlmgr update --self | |
| $ tlmgr install ucs | |
| $ tlmgr install etoolbox | |
| # Install pandoc view homebrew |
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 numpy as np | |
| import itertools | |
| def rle(x): | |
| where = np.flatnonzero | |
| x = np.asarray(x) | |
| n = len(x) | |
| if n == 0: | |
| return np.array([], dtype=int) | |
| starts = np.r_[0, where(~np.isclose(x[1:], x[:-1], equal_nan=True)) + 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
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
OlderNewer