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 | |
# installs plenv, perl, carton, cpanminus, sets up environment in .bash_profile or .profile | |
# from https://github.com/tokuhirom/plenv#readme | |
MY_PROFILE_FILE="$HOME/.profile" | |
if [[ -n "$PERL_MB_OPT" ]]; then | |
echo "You must unset your local::lib environment variables first" | |
echo "Edit your ~/.bash_profile or ~/.bashrc and remove any references" | |
echo "to local::lib or export PERL*..." |
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 -v | |
# Define these according to the run | |
N=5000 | |
NCPUS=4 | |
# Use wildcards or specify an exact input fasta filename below (should be in your current working directory) | |
INPUT_FASTA="input.fasta" | |
DATE=`date +%d_%m_%Y` | |
REFDB="nt" | |
#CMD=`printf "hmmscan --cpu %s --domtblout \%s/\%s.pfam.domtblout ~/.hmmer-3.1/Pfam/Pfam-A.hmm \%s > \%s/\%s_pfam.log",$NCPUS` |
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
$path = $args[0] | |
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms"); | |
$i = new-object System.Drawing.Bitmap $path | |
$i.RotateFlip("Rotate90FlipNone") | |
$i.Save($args[1],"png") |
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
#' call primer3 for a given set of DNAstringSet object | |
#' Forked from https://gist.github.com/al2na/8540391 | |
#' TODO: Add support for target amplicon region (Maybe as [] in the fasta input) | |
#' @param seq: DNA template as a character string (required) | |
#' @param fw_primer: optional forward (left) primer, if provided Primer3 will assess it and will try to find a suitable reverse primer. Default: NULL | |
#' @param rv_primer: optional reverse (right) primer (must be reverse-complemented to the template), if provided Primer3 will assess it and will try to find a suitable forward primer. Default: NULL | |
#' @param size_range: a string with space separated list of desired amplicon size ranges. Default: '151-500' | |
#' @param Tm: range of melting temprature parameters as a numerical vector containing (min,optimal,max). default: c(55,57,58) | |
#' @param name: name of the amplicon in 'chr_start_end' format | |
#' @param sequence_target: a string containing space separated list of target pairs: 'starting_position,target_length starting_p |
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
# Load GO and DE data to R | |
## @knitr prep_data | |
# Install missing CRAN packages if needed | |
# git.packages <- c("docopt/docopt.R") | |
# github.packages <- c("argparser") | |
install.deps <- function(p, repo="cran"){ | |
call_install <- switch(repo,cran=c("install.packages(package, repos=\"http://cloud.r-project.org/\""), |
NewerOlder