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 | |
| # Usage: interleave_fastq.sh f.fastq r.fastq > interleaved.fastq | |
| # | |
| # Interleaves the reads of two FASTQ files specified on the | |
| # command line and outputs a single FASTQ file of STDOUT. | |
| # | |
| # Can interleave 100 million paired reads (200 million total | |
| # reads; a 2 x 22Gbyte files), in memory (/dev/shm), in 6m54s (414s) | |
| # | |
| # Latest code: https://gist.github.com/4544979 |
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 | |
| # Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress] | |
| # | |
| # Deinterleaves a FASTQ file of paired reads into two FASTQ | |
| # files specified on the command line. Optionally GZip compresses the output | |
| # FASTQ files using pigz if the 3rd command line argument is the word "compress" | |
| # | |
| # Can deinterleave 100 million paired reads (200 million total | |
| # reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s) | |
| # |
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
| ############Here's a function that calculates Hill number diversity using a phylogeny from the Leinster and Cobbold (2012) paper | |
| #Requires a phylogeny with tip labels and a community matrix (rows = samples, columns = species) | |
| Phylo.Z <- function(phy,samp){ | |
| #packages required for this to work: | |
| require(reshape) | |
| require(picante) | |
| require(ape) | |
| require(gtools) |