#Dependencies
GeneValidatorApp and GeneValidator have a number of dependencies (including Ruby, Mafft & BLAST) that need to be installed first.
##Ruby (>= 2.0.0)
- Install Ruby Version Manager
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
#Dependencies
GeneValidatorApp and GeneValidator have a number of dependencies (including Ruby, Mafft & BLAST) that need to be installed first.
##Ruby (>= 2.0.0)
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
require 'bio' | |
def analyse_input_file(input_file) | |
overall_results = [] | |
biofastafile = Bio::FlatFile.open(Bio::FastaFormat, input_file) | |
biofastafile.each_entry do |entry| | |
overall_results << analyse_orfs(entry.entry_id, entry.naseq) | |
end | |
overall_results | |
end |
require 'bio' # you have to install bioruby - gem install bio | |
require 'fileutils' | |
# Run by running: | |
## ruby split_fasta.rb FASTA_FILE MIN MAX OUTPUT_DIR | |
fasta = ARGV[0] | |
min = ARGV[1] |
function cd_dir_history() | |
{ | |
OLDPWD="$PWD" | |
echo "# $(date) $USER -> $@" >> "$HISTFILE" | |
command cd "$@" | |
# If this directory is writable then write to directory-based history file | |
# otherwise write history in the usual home-based history file. | |
touch "$PWD/.dir_bash_history" 2>/dev/null \ |
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# |
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
require 'rubygems' | |
require 'sinatra' | |
require 'omniauth/oauth' | |
set :sessions, true | |
set :layout, true | |
use OmniAuth::Builder do | |
provider :twitter, 'key', 'secret' | |
end |
Jekyll is a great tool for building static sites, however, I often see many projects that are including a lot of unused CSS. Since Jekyll generates an entire working site in the _site
directory, we can use it to run uncss
. Below outlines an example project using uncss
and a build.js
script.
Note: this assumes you have node
and npm
installed.
Firstly, let's set up the project.
jekyll new uncss-example && cd uncss-example
suppressMessages(library("GEOquery")) | |
gse <- getGEO('GDS6', GSEMatrix = TRUE) | |
eset <- GDS2eSet(gse, do.log2 = FALSE) | |
X <- exprs(eset) # Get Expression Data | |
X <- X[rowSums(is.na(X)) != ncol(X),] # remove rows with missing data | |
knnImputation(X, scale=F) |
# A really really cool method that does extremely important stuff (Careful, don't break it or the world might fall apart) | |
# x has to be larger than 2) | |
random <- function(x) { | |
n <- sample(1:x, 3) # get 3 random numbers between 1 and x | |
results <- list(num1 = n[1], | |
num2 = n[2], | |
num3 = n[3]) | |
return(results) | |
} |