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 |
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)
# A quick function to save a PBM (http://en.wikipedia.org/wiki/Netpbm_format) | |
# visualize *a lot* of missing data pretty quickly (outside of R). | |
writeMissingPBM <- function(x, file) { | |
dims <- dim(x) | |
x[] <- as.integer(is.na(x)) | |
con <- file(file, open="wt") | |
writeLines(sprintf("P1\n%d %d", ncol(x), nrow(x)), con) | |
write.table(x, file=con, sep=" ", col.names=FALSE, row.names=FALSE, quote=FALSE) | |
close(con) |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
M <- matrix(c(1, 0, 0, 1), byrow = 1, nrow = 2) | |
df <- data.frame(A = 1) | |
df$B <- list(M) | |
df | |
# A B | |
# 1 1, 0, 0, 1 |