(ubuntu 14.04)
Ctrl+PgUp/PgDn
or:
Alt-n, where n is the tab ordinal number. *Does not work with numpad keys*
| #!/usr/bin/env bash | |
| # make_rRNA.sh | |
| # Kamil Slowikowski | |
| # Created: December 12, 2014 | |
| # Original: https://gist.github.com/slowkow/b11c28796508f03cdf4b | |
| # Modified: January 22, 2014 | |
| # António Domingues | |
| # Added arguments - easier to run and choose species | |
| # rRNA coordinates can be in Bed format |
| bedtools bamtofastq -i $bam -fq temp.fq | |
| awk '{if(NR%4==1) {printf(">%s\n",substr($0,2));} else if(NR%4==2) print;}' temp.fq > ${bam/.bam/.fa} | |
| rm temp.fp |
| #!/bin/bash | |
| infile=$1 | |
| if [[ $infile == *.Rmd ]] | |
| then | |
| echo "Knitting Rmd file" | |
| Rscript -e "library(knitr); knit('$infile')"; | |
| name=${infile%.Rmd} | |
| else |
| #install.packages(c("wordcloud","tm"),repos="http://cran.r-project.org") | |
| library("wordcloud") | |
| library("tm") | |
| message <- c( | |
| rep("Good", 10), | |
| rep("Luck", 9), | |
| rep("Eyebrow", 3), | |
| rep("Tatra Tea", 4), | |
| rep("Sächsische Schweiz", 3), |
| swatch <- function(x) { | |
| # x: a vector of colours (hex, numeric, or string) | |
| par(mai=c(0.2, max(strwidth(x, "inch") + 0.4, na.rm = TRUE), 0.2, 0.4)) | |
| barplot(rep(1, length(x)), col=rev(x), space = 0.1, axes=FALSE, | |
| names.arg=rev(x), cex.names=0.8, horiz=T, las=1) | |
| } | |
| # Example: | |
| # swatch(colours()[1:10]) | |
| # swatch(iwanthue(5)) |
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |
| # Multiple plot function | |
| # | |
| # ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) | |
| # - cols: Number of columns in layout | |
| # - layout: A matrix specifying the layout. If present, 'cols' is ignored. | |
| # | |
| # If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), | |
| # then plot 1 will go in the upper left, 2 will go in the upper right, and | |
| # 3 will go all the way across the bottom. | |
| # |
| ### My favourite ggplot2 themes, always accessible ### | |
| ## just source this gist from any project ## | |
| ##################################################################################### | |
| # Noam's default ggplot2 styling ##### | |
| # Source: https://github.com/noamross/noamtools/blob/master/R/theme_nr.R | |
| theme_nr <-theme(text=element_text(family="Helvetica", size=14), | |
| panel.grid.major.x=element_blank(), |
| @SQ SN:chrM LN:16571 | |
| @SQ SN:chr1 LN:249250621 | |
| @SQ SN:chr2 LN:243199373 | |
| @SQ SN:chr3 LN:198022430 | |
| @SQ SN:chr4 LN:191154276 | |
| @SQ SN:chr5 LN:180915260 | |
| @SQ SN:chr6 LN:171115067 | |
| @SQ SN:chr7 LN:159138663 | |
| @SQ SN:chr8 LN:146364022 | |
| @SQ SN:chr9 LN:141213431 |