Skip to content

Instantly share code, notes, and snippets.

@padpadpadpad
Last active December 17, 2017 12:02
Show Gist options
  • Save padpadpadpad/49e8b104d3c510221e147d24f13fb8a7 to your computer and use it in GitHub Desktop.
Save padpadpadpad/49e8b104d3c510221e147d24f13fb8a7 to your computer and use it in GitHub Desktop.
# Mothur PCoA Dirk sequencing
library(ggplot2)
library(dplyr)
library(tidyr)
# replace metadata with new metadata
meta_new <- read.csv('~/Desktop/Work/dirk_sequencing/data/metadata.csv', stringsAsFactors = FALSE) %>%
mutate(., time = as.character(time))
# read in data
d <- read.table('~/Desktop/dirk.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.opti_mcc.unique_list.braycurtis.0.03.lt.pcoa.axes', header = TRUE, stringsAsFactors = FALSE) %>%
mutate(group = tolower(group)) %>%
rename(SampleID = group) %>%
merge(., meta_new, by = 'SampleID')
ggplot(d) +
geom_point(aes(axis1*-1, axis2*-1, col = time, shape = treat))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment