Skip to content

Instantly share code, notes, and snippets.

View shandley's full-sized avatar

Scott Handley shandley

View GitHub Profile
@shandley
shandley / gist:87b0017ca593c58561a8b76b98985477
Created May 10, 2018 16:19
Convert Phyloseq to AmpVis2 format in R
```{r phyloseq-ampvis2}
library("ampvis2")
# Load data into ampvis
otu.table <- t(otu_table(ps1, taxa_are_rows = FALSE))
otu.table <- as.data.frame(otu.table)
otu.table <- rownames_to_column(otu.table, var = "OTU")
head(rownames(otu.table))
head(colnames(otu.table))
nrow(otu.table)
@shandley
shandley / centos_microbiome_setup.txt
Last active July 25, 2017 21:41
Setting up R for microbiome analysis on a new Cent OS server
## For CentOS
sudo yum install libcurl-devel
## For R
# Make R package path permissions usable
# Identify the path using ...
installed.packages()[, "LibPath"]
... and then update according to your server user permissions