Load rgbif
library("rgbif")| x <- data.frame(d=runif(12), g=rep(1:4, each =3)) | |
| my.col <- c("deepskyblue3","darkorange2","darkgray","gold") | |
| spacer <- c(1, 0.1, 0.1, 1, 0.1, 0.1, 1, 0.1, 0.1, 1, 0.1, 0.1) | |
| bw <- 0.8 | |
| xmax <- (sum(spacer) * bw) + (nrow(x) * bw) |
| source("http://bioconductor.org/biocLite.R") | |
| biocLite(c("rhdf5","biom")) | |
| library(rhdf5) | |
| library(biom) | |
| # This generates the matrix columns-wise | |
| generate_matrix <- function(x){ | |
| indptr = x$sample$matrix$indptr+1 | |
| indices = x$sample$matrix$indices+1 | |
| data = x$sample$matrix$data |
| # -q: output in Fastq format | |
| # -Q: ignore BAM quality flags | |
| # -P: paired-end data | |
| bam2fastx -qQP -o clean.fq <(bwa mem contaminants.fasta reads.1.fq reads.2.fq | \ | |
| perl -ne '@v = split(/\t/); print if(m/^@/ or ($v[1] & 4 and $v[1] & 8))' | \ | |
| samtools view -bhS -) |
| source("http://bioconductor.org/biocLite.R") | |
| biocLite("genomes") | |
| library(genomes) | |
| library(ggplot2) | |
| valid <- c("released", "created", "submitted") | |
| data(proks) | |
| update(proks) |
| Wed Jun 10 19:52:40 +0000 2015 | |
| cmake | |
| .. | |
| -DCMAKE_C_FLAGS_RELEASE= | |
| -DCMAKE_CXX_FLAGS_RELEASE= | |
| -DCMAKE_INSTALL_PREFIX=/home/ubuntu/.linuxbrew/Cellar/spades/3.5.0 | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_FIND_FRAMEWORK=LAST | |
| -DCMAKE_VERBOSE_MAKEFILE=ON |
| sed -e '/^>/s/$/@/' -e 's/^>/#/' name.fasta | tr -d '\n' | tr "#" "\n" | tr "@" "\t" | sort -u -t ' ' -f -k 2,2 | sed -e 's/^/>/' -e 's/\t/\n/' |
| # kill all qsub jobs | |
| qselect -u $USER -S -Q | xargs qdel |
SAM and BAM filtering one-liners
@author: David Fredman, [email protected] (sans poly-A tail)
@dependencies: http://sourceforge.net/projects/bamtools/ and http://samtools.sourceforge.net/
Please comment or extend with additional/faster/better solutions.
BWA mapping (using piping for minimal disk I/O)
| sed -r "s/>NODE(_[0-9]+)_(.*)/>${input.name}\1 \2/g" $input > $output |