Absolute Grids


ggplot(ngs, aes(x = reorder(Gene, log10(Prot), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = rescale(log10(Prot), c(-1, 1)))) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "yellow", 
    high = "darkgreen") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), legend.position = NaN, axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Absolute Protein Abundance", x = "Genes ordered by mean Protein Level")

plot of chunk unnamed-chunk-1


ggplot(ngs, aes(x = reorder(Gene, log10(RNA), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = rescale(log10(RNA), c(-1, 1)))) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "yellow", 
    high = "darkgreen") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), legend.position = NaN, axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Absolute RNA Abundance", x = "Genes ordered by mean RNA Level")

plot of chunk unnamed-chunk-1


ggplot(ngs, aes(x = reorder(Gene, log10(Trans), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = rescale(log10(RNA), c(-1, 1)))) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "yellow", 
    high = "darkgreen") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), legend.position = NaN, axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Absolute Translation Efficiency", x = "Genes ordered by mean Translation Efficiency")

plot of chunk unnamed-chunk-1

Log2 Fold Change from Average Grids



ggplot(ngs, aes(x = reorder(Gene, log10(Prot), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = Prot.FoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in Protein Abundance from Average Codon Variant", 
        x = "Genes ordered by mean Protein Level")

plot of chunk unnamed-chunk-2


ggplot(ngs, aes(x = reorder(Gene, log10(RNA), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = RNA.FoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in RNA Abundance from Average Codon Variant", 
        x = "Genes ordered by mean RNA Level")

plot of chunk unnamed-chunk-2


ggplot(ngs, aes(x = reorder(Gene, log10(Trans), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = Trans.FoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in Translation Efficiency from Average Codon Variant", 
        x = "Genes ordered by mean Translation Efficiency")

plot of chunk unnamed-chunk-2

Log2 Fold Change from WT Grids


ngs <- ddply(ngs, c("Gene", "RBS", "Promoter"), transform, RNA.WTFoldChange.Codons = log2(RNA) - 
    log2(RNA[which(CDS.type == "WT")]), DNA.WTFoldChange.Codons = log2(Count.DNA) - 
    log2(Count.DNA[which(CDS.type == "WT")]), Prot.WTFoldChange.Codons = log2(Prot) - 
    log2(Prot[which(CDS.type == "WT")]), Fitness.Read_Ratio.WTFoldChange.Codons = log2(Fitness.Read_Ratio) - 
    log2(Fitness.Read_Ratio[which(CDS.type == "WT")]), Trans.WTFoldChange.Codons = log2(Trans) - 
    log2(Trans[which(CDS.type == "WT")]))

ggplot(ngs, aes(x = reorder(Gene, log10(Prot), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = Prot.WTFoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in Protein Abundance from WT Codon Usage", 
        x = "Genes ordered by mean Protein Abundance")

plot of chunk unnamed-chunk-3


ggplot(ngs, aes(x = reorder(Gene, log10(RNA), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = RNA.WTFoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in RNA Abundance from  WT Codon Usage", x = "Genes ordered by mean RNA Level")

plot of chunk unnamed-chunk-3


ggplot(ngs, aes(x = reorder(Gene, log10(Trans), mean, na.rm = T), y = CDS.type)) + 
    geom_tile(aes(fill = Trans.WTFoldChange.Codons)) + opts(panel.background = theme_rect(fill = "gray80"), 
    axis.ticks = theme_blank()) + scale_fill_gradient2(low = "darkred", mid = "white", 
    high = "darkblue") + facet_grid(RBS ~ Promoter) + theme(plot.title = theme_text(size = 14, 
    lineheight = 0.8, face = "bold"), axis.text.x = theme_text(angle = -90)) + 
    labs(title = "Log2 Fold Change in Translation Efficiency from  WT Codon Usage", 
        x = "Genes ordered by mean Translation Efficiency")

plot of chunk unnamed-chunk-3