Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
cat name.fasta |\ # identify file name | |
awk '/^>/ { if(i>0) printf("\n"); i++; printf("%s\t",$0); next;} {printf("%s",$0);} END { printf("\n");}' |\ # read data | |
perl -MList::Util -e 'print List::Util::shuffle <>' |\ # random sample of sequences with shuffle | |
head -n 50000 |\ # break fasta file into sections of 50000 sequences in length | |
awk '{printf("%s\n%s\n",$1,$2)}' > name_1.fasta # write sequence output |
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U |
awk ‘/^>/{$0=”>”++i}1′ test.fna > test1.fna |
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 |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
Here's the error I am getting with khmer install on Mac OSX Mavericks (OS X 10.9.4 (13E28)) install | |
``` | |
./setup.py build_ext --inplace | |
running build_ext | |
bash -c cd third-party/zlib && ( test Makefile -nt configure || bash ./configure --static ) && make -f Makefile.pic PIC | |
make[1]: Nothing to be done for `PIC'. | |
bash -c cd third-party/bzip2 && make -f Makefile-libbz2_so all | |
#gcc -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o | |
#gcc -fpic -fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -o bzip2-shared bzip2.c libbz2.so.1.0.6 |
# 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) |
Last login: Fri Oct 10 13:26:02 on ttys000 | |
➜ ~ brew install gcc48 -dv | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/gcc48.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/gmp4.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/libmpc08.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/mpfr2.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/cloog018.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/pkg-config.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/isl011.rb | |
/usr/local/Library/Homebrew/build.rb (Formul |
sed -r "s/>NODE(_[0-9]+)_(.*)/>${input.name}\1 \2/g" $input > $output |
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)