Skip to content

Commit

Permalink
Merge branch 'figuredata'
Browse files Browse the repository at this point in the history
  • Loading branch information
surh committed Dec 20, 2017
2 parents ab7591f + 32bbbe5 commit 3ff2b24
Show file tree
Hide file tree
Showing 18 changed files with 408 additions and 287 deletions.
279 changes: 262 additions & 17 deletions DATASETS.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: wheelP
Type: Package
Title: Phosphate modulation by bacterial consortia (Title Case)
Version: 0.0.2
Title: Designing synthetic bacterial communities for predictable plant phenotypes
Version: 0.1.0
Author: Sur Herrera Paredes
Maintainer: Sur Herrera Paredes <sur00mx@gmail.com>
Description: Code and data for analysis of the effect of bacterial blocks on plant
phosphate accumulation and other related plant phenotypes.
Description: Code and data for designing synthetic bacterial communities
for predictable plant phenotypes.
Imports:
AMOR (>= 0.0-15),
reshape2,
Expand Down
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,38 @@ You will require the devtools package. Once that package is installed just type:
devtools::install_github("surh/wheelP")
```

# Data

The raw sequence data is available in the appropriate academic repositories. RNA-seq data is at
NCBI GEO database under accession [GSE102248](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE102248).
Microbial 16S gene sequencing is available at the EBI SRA under accession [PRJEB22060](https://www.ebi.ac.uk/ena/data/view/PRJEB22060).

All other experimental data and numeric values underlying figures in the associated manuscript
is made available here as R package data. It can be accessed after installation using
`data(<DATASETNAME>)` in the R console. A full description of all the available
datasets can be found at the [DATASETS.md](DATASETS.md) file.

# Scripts

The [scripts directory](inst/scripts/) contains scripts used for analysis in the associated manuscript.
The scripts follow a naming convention in which a prefix is used to indicate the general set of
data that they analyze, and they are numbered to indicate they way in which they were run. In some
cases, scripts with higher numbers are dependent on output from scripts with lower numbers. The prefixes
are as follow:
* *gc\_* corresponds to the analysis of *in vitro* bacterial growth curves.
* *binP\_* corresponds to the analysis of plant phenotypes in plant-bacterium binary interaction assays.
* *syncom\_* corresponds to the analysis of plant phenotypes in bacterial synthetic community assays.
* *colonization\_* corresponds to the analysis of bacterial abundances in synthetic community assays.
* *rna\_* corresponds to the analysis of plant transcriptomes in synthetic community assays.

# Referencing

If using the code of data, please reference this repository's URL, as well as the following:
If using the code or data, please reference this repository's URL, as well as the following:

Herrera Paredes S, Gao T, Law TF, Finkel OM, Mucyn T, Texeira PJPL, Salas González I,
Feltcher ME, Powers MJ, Shank EA, Jones CD, Jojic V, Dangl JL & Castrillo G. "A simplified
framework for dissecting complex host-microbiota interactions" (2017). *In revision*.
\*Herrera Paredes S, \*Gao T, Law TF, Finkel OM, Mucyn T, Texeira PJPL, Salas González I,
Feltcher ME, Powers MJ, Shank EA, Jones CD, Jojic V, Dangl JL & Castrillo G. "Design of
synthetic bacterial communities for predicable plant phenotypes" (2017). *In revision*.
\*Co-first authors.

# Copyright & license

Expand Down
Binary file added data/group.colonization.rda
Binary file not shown.
Binary file added data/mds.colonization.rda
Binary file not shown.
Binary file added data/phen.additivity.rda
Binary file not shown.
Binary file added data/phen.presence.abundance.rda
Binary file not shown.
Binary file added data/pi.phi.cfu.rda
Binary file not shown.
Binary file added data/pre.treatments.rda
Binary file not shown.
57 changes: 54 additions & 3 deletions inst/scripts/colonization_3.phylograms.r
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

library(AMOR)
library(wheelP)
# setwd("~/rhizogenomics/experiments/2017/today3/")
# setwd("~/rhizogenomics/experiments/2017/today11/")

data(wheelP.mapsplit)
Dat <- wheelP.mapsplit
Expand All @@ -30,7 +30,7 @@ Dat <- clean(Dat)
Dat <- subset(Dat, !(Experiment %in% c("Validation1","Validation2")),
drop = TRUE, clean = TRUE)

Dat.ord <- collapse_by_taxonomy(Dat,level = 5, sepchar = ";",FUN = sum)
Dat.ord <- collapse_by_taxonomy(Dat,level = 5, sepchar = ";",FUN = sum, Group = NULL)

temp <- subset(Dat.ord, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -47,6 +47,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("plusP_100uM.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.plusP100.root <- p1$data
save(figS6B.plusP100.root, file = "figuredata/figS6B.plusP100.root.rda")

temp <- subset(Dat.ord, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -63,6 +66,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("plusP_100uM.phylogram.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.plusP100.agar <- p1$data
save(figS6B.plusP100.agar, file = "figuredata/figS6B.plusP100.agar.rda")

temp <- subset(Dat.ord, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -79,6 +85,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("plusP_30uM.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.plusP30.root <- p1$data
save(figS6B.plusP30.root, file = "figuredata/figS6B.plusP30.root.rda")

temp <- subset(Dat.ord, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -95,6 +104,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("plusP_30uM.phylogram.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.plusP30.agar <- p1$data
save(figS6B.plusP30.agar, file = "figuredata/figS6B.plusP30.agar.rda")

temp <- subset(Dat.ord, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -111,6 +123,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("minusP_100uM.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.minusP100.root <- p1$data
save(figS6B.minusP100.root, file = "figuredata/figS6B.minusP100.root.rda")

temp <- subset(Dat.ord, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -127,6 +142,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("minusP_100uM.phylogram.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.minusP100.agar <- p1$data
save(figS6B.minusP100.agar, file = "figuredata/figS6B.minusP100.agar.rda")

temp <- subset(Dat.ord, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -143,6 +161,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8,space = "fixed") +
strip.background = element_blank())
p1
ggsave("minusP_30uM.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.minusP30.root <- p1$data
save(figS6B.minusP30.root, file = "figuredata/figS6B.minusP30.root.rda")

temp <- subset(Dat.ord, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -159,6 +180,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8,space = "fixed") +
strip.background = element_blank())
p1
ggsave("minusP_30uM.phylogram.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.minusP30.agar <- p1$data
save(figS6B.minusP30.agar, file = "figuredata/figS6B.minusP30.agar.rda")

rm(Dat.ord, p1, temp)

Expand All @@ -184,7 +208,7 @@ Theo <- create_dataset(Tab = Tab,
levels = levels(Dat$Map$Bacteria)),
row.names = syncoms),
Tax = Tax)
Theo.ord <- collapse_by_taxonomy(Theo,level = 5, sepchar = ";",FUN = sum)
Theo.ord <- collapse_by_taxonomy(Theo,level = 5, sepchar = ";",FUN = sum, Group = NULL)

p1 <- phylogram(Theo.ord,facet = ~ Bacteria,nrow.legend = 8) +
scale_fill_brewer(palette = "Paired") +
Expand All @@ -198,6 +222,9 @@ p1 <- phylogram(Theo.ord,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("theoretical.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6B.theoretical <- p1$data
save(figS6B.theoretical, file = "figuredata/figS6B.theoretical.rda")

rm(Tab,Tax,Tax.colonization,b1,b2,p1,syncom,syncoms,Theo,Theo.ord)

Expand All @@ -223,6 +250,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("plusP_100uM.phylogram.blocks.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.plusP100.root <- p1$data
save(figS6C.plusP100.root, file = "figuredata/figS6C.plusP100.root.rda")

temp <- subset(Blocks, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -239,6 +269,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("plusP_100uM.phylogram.blocks.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.plusP100.agar <- p1$data
save(figS6C.plusP100.agar, file = "figuredata/figS6C.plusP100.agar.rda")

temp <- subset(Blocks, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -255,6 +288,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("plusP_30uM.phylogram.blocks.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.plusP30.root <- p1$data
save(figS6C.plusP30.root, file = "figuredata/figS6C.plusP30.root.rda")

temp <- subset(Blocks, Pre.Pi == "+Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -271,6 +307,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("plusP_30uM.phylogram.blocks.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.plusP30.agar <- p1$data
save(figS6C.plusP30.agar, file = "figuredata/figS6C.plusP30.agar.rda")

temp <- subset(Blocks, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -287,6 +326,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("minusP_100uM.phylogram.blocks.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.minusP100.root <- p1$data
save(figS6C.minusP100.root, file = "figuredata/figS6C.minusP100.root.rda")

temp <- subset(Blocks, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "100 uM,0%Suc" &
Expand All @@ -303,6 +345,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("minusP_100uM.phylogram.blocks.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.minusP100.agar <- p1$data
save(figS6C.minusP100.agar, file = "figuredata/figS6C.minusP100.agar.rda")

temp <- subset(Blocks, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -319,6 +364,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("minusP_30uM.phylogram.blocks.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.minusP30.root <- p1$data
save(figS6C.minusP30.root, file = "figuredata/figS6C.minusP30.root.rda")

temp <- subset(Blocks, Pre.Pi == "-Pi,0.5%Suc" &
Pos.Pi == "30 uM,0%Suc" &
Expand All @@ -335,5 +383,8 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("minusP_30uM.phylogram.blocks.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS6C.minusP30.agar <- p1$data
save(figS6C.minusP30.agar, file = "figuredata/figS6C.minusP30.agar.rda")

rm(p1,Blocks,temp)
21 changes: 19 additions & 2 deletions inst/scripts/colonization_4.validation_phylograms.r
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Dat <- subset(Dat, (Experiment %in% c("Validation1","Validation2")),
Dat <- subset(Dat, Fraction != "T0Agar",
drop = TRUE, clean = TRUE)

Dat.ord <- collapse_by_taxonomy(Dat,level = 5, sepchar = ";",FUN = sum)
Dat.ord <- collapse_by_taxonomy(Dat,level = 5, sepchar = ";",FUN = sum, Group = NULL)

temp <- subset(Dat.ord, Fraction == "Root")
p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
Expand All @@ -47,6 +47,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.order.root <- p1$data
save(figS12.order.root, file = "figuredata/figS12.order.root.rda")

temp <- subset(Dat.ord, Fraction == "Agar")
p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
Expand All @@ -61,6 +64,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.order.agar <- p1$data
save(figS12.order.agar, file = "figuredata/figS12.order.agar.rda")

temp <- subset(Dat.ord, Fraction == "Inoculum")
p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
Expand All @@ -75,10 +81,12 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 8) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.inoculum.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.order.inoc <- p1$data
save(figS12.order.inoc, file = "figuredata/figS12.order.inoc.rda")

rm(Dat.ord, p1, temp)


#### Blocks
Blocks <- create_dataset(Tab = collapse_matrix(Dat$Tab,
groups = Dat$Tax$Block,
Expand All @@ -100,6 +108,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.blocks.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.block.root <- p1$data
save(figS12.block.root, file = "figuredata/figS12.block.root.rda")

temp <- subset(Blocks, Fraction == "Agar")
p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
Expand All @@ -114,6 +125,9 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.blocks.agar.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.block.agar <- p1$data
save(figS12.block.agar, file = "figuredata/figS12.block.agar.rda")

temp <- subset(Blocks, Fraction == "Inoculum")
p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
Expand All @@ -128,3 +142,6 @@ p1 <- phylogram(temp,facet = ~ Bacteria,nrow.legend = 9) +
strip.background = element_blank())
p1
ggsave("validation.phylogram.blocks.inoculum.svg",p1, width = 14, height = 4)
dir.create("figuredata/")
figS12.block.inoc <- p1$data
save(figS12.block.inoc, file = "figuredata/figS12.block.inoc.rda")
3 changes: 3 additions & 0 deletions inst/scripts/colonization_5.ordination.r
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ p1 <- ggplot(Dat$Map, aes(x = MDS1, y = MDS2, col = Fraction, fill = Fraction))

p1
ggsave("colonization_mds_conditioned.svg",p1, width = 4, height = 4)
dir.create("figuredata/")
figS6A <- p1$data
save(figS6A, file = "figuredata/figS6A.rda")

8 changes: 7 additions & 1 deletion inst/scripts/rna_2.cores_previous.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library(AMOR)
library(wheelP)
library(edgeR)

setwd("~/rhizogenomics/experiments/2017/today7/corepi_picontent/")
# setwd("~/rhizogenomics/experiments/2017/today11")
# devtools::document("~/rhizogenomics/src/trunk/phosphate_code/wheelP/")

data(wheelP.rna)
Expand Down Expand Up @@ -180,6 +180,9 @@ p1 <- ggplot(Res.sc,aes(x = Measured, y = Predicted)) +
size = 22))
p1
ggsave('corepi.additivity.svg',p1,width = 7, height = 7)
dir.create("figuredata/")
fig5B <- p1$data
save(fig5B, file = "figuredata/fig5B.rda")


########## Core pi vs pi content
Expand Down Expand Up @@ -238,6 +241,9 @@ p1 <- ggplot(subset(dat, EndP == '30 uM,0%Suc'),aes(x = Pi_content, y = core.ind
theme_classic()
p1
ggsave('corepi_vs_pi.svg', p1, width = 4, height = 5)
dir.create("figuredata/")
figS8 <- p1$data
save(figS8, file = "figuredata/figS8.rda")

#### THE FOLLOWING SECTION IS INCORRECT!!
#### IT CALCULATES GOODNESS OF FIT OF ADDITIVE ONLY MODEL
Expand Down
Loading

0 comments on commit 3ff2b24

Please sign in to comment.