summary(df_spikes)
## genotype rep number spikelet floret
## brompton: 763 1:2354 Min. : 1.00 Min. : 1.00 Min. :1.000
## claire : 750 2:2309 1st Qu.: 20.00 1st Qu.: 7.00 1st Qu.:1.000
## rialto : 749 3:2264 Median : 39.00 Median :11.00 Median :2.000
## hereward: 732 Mean : 39.67 Mean :11.59 Mean :2.341
## charger : 717 3rd Qu.: 58.00 3rd Qu.:16.00 3rd Qu.:3.000
## alchemy : 674 Max. :105.00 Max. :28.00 Max. :6.000
## (Other) :2542
## area width heigth block
## Min. :0.0000 Min. :0.0000 Min. :0.0000 1:2407
## 1st Qu.:0.1610 1st Qu.:0.3450 1st Qu.:0.6920 2:2324
## Median :0.1960 Median :0.3860 Median :0.7390 3:2196
## Mean :0.1845 Mean :0.3657 Mean :0.7087
## 3rd Qu.:0.2200 3rd Qu.:0.4110 3rd Qu.:0.7750
## Max. :0.2910 Max. :0.6120 Max. :0.9870
##
ggscatter(
df_spikes, x = "spikelet", y = "heigth",
color = "block", facet.by = "genotype", size = 2.5, alpha = 0.6,conf.int=TRUE)
ggscatter(
df_spikes, x = "spikelet", y = "width",
color = "block", facet.by = "genotype", size = 2.5, alpha = 0.6,conf.int=TRUE)
ggscatter(
df_spikes, x = "spikelet", y = "area",
color = "block", facet.by = "genotype", size = 2.5, alpha = 0.6,conf.int=TRUE)
F4 <- subset(df_spikes, select = c("genotype", "floret", "spikelet", "block","rep"))
maxi <- ddply(F4, .(genotype, spikelet,block,rep),summarize, grains = (max(floret)))
ggscatter(
maxi, x = "spikelet", y = "grains",
color = "block", size = 2.5, alpha = 0.6,
add = c("loess"), facet.by = "genotype")
Area, width and heigth (ie length) of grains are all correlated (sanitiy check)
ggscatter(
df_A6, x= "basal_area", y = "basal_width",
color = "basal_heigth", size = 2.5, alpha = 0.6,conf.int=TRUE)
summary(df_A6)
## genotype block rep basal_area basal_width
## alchemy : 9 1:30 Min. :1 Min. :0.000 Min. :0.000
## brompton: 9 2:30 1st Qu.:1 1st Qu.:1.518 1st Qu.:1.669
## cadenza : 9 3:30 Median :2 Median :2.487 Median :2.606
## charger : 9 Mean :2 Mean :2.431 Mean :2.535
## claire : 9 3rd Qu.:3 3rd Qu.:3.286 3rd Qu.:3.478
## hereward: 9 Max. :3 Max. :4.778 Max. :5.143
## (Other) :36
## basal_heigth central_area central_width central_heigth
## Min. :0.000 Min. :4.481 Min. :4.314 Min. :4.343
## 1st Qu.:1.570 1st Qu.:5.482 1st Qu.:5.354 1st Qu.:5.292
## Median :2.483 Median :6.020 Median :5.851 Median :5.632
## Mean :2.484 Mean :6.016 Mean :5.818 Mean :5.715
## 3rd Qu.:3.428 3rd Qu.:6.431 3rd Qu.:6.259 3rd Qu.:6.110
## Max. :4.990 Max. :8.685 Max. :8.619 Max. :8.392
##
## percentage_area_S1 percentage_width_S1 percentage_heigth_S1
## Min. :0.0000 Min. :0.0000 Min. :0.0000
## 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.0000
## Median :0.0000 Median :0.0000 Median :0.0000
## Mean :0.8149 Mean :0.9125 Mean :0.8149
## 3rd Qu.:1.9497 3rd Qu.:2.1074 3rd Qu.:1.9497
## Max. :3.6472 Max. :4.5118 Max. :3.6472
##
## percentage_area_S2 percentage_width_S2 percentage_heigth_S2
## Min. :0.0000 Min. :0.0000 Min. :0.0000
## 1st Qu.:0.1745 1st Qu.:0.2605 1st Qu.:0.1745
## Median :2.6773 Median :2.8658 Median :2.6773
## Mean :2.3970 Mean :2.5172 Mean :2.3970
## 3rd Qu.:3.5905 3rd Qu.:3.8109 3rd Qu.:3.5905
## Max. :5.5358 Max. :6.0532 Max. :5.5358
##
## percentage_area_S3 percentage_width_S3 percentage_heigth_S3
## Min. :0.000 Min. :0.000 Min. :0.000
## 1st Qu.:3.370 1st Qu.:3.538 1st Qu.:3.370
## Median :4.299 Median :4.344 Median :4.299
## Mean :4.081 Mean :4.175 Mean :4.081
## 3rd Qu.:4.860 3rd Qu.:4.924 3rd Qu.:4.860
## Max. :6.286 Max. :6.510 Max. :6.286
##
## basal_grain_number central_grain_number raw_area_central
## Min. :1.000 Min. :3.000 Min. :0.1310
## 1st Qu.:1.667 1st Qu.:4.000 1st Qu.:0.1980
## Median :2.333 Median :4.000 Median :0.2091
## Mean :2.311 Mean :4.200 Mean :0.2068
## 3rd Qu.:3.000 3rd Qu.:4.667 3rd Qu.:0.2204
## Max. :4.000 Max. :5.333 Max. :0.2474
##
## raw_heigth_central raw_width_central raw_area_basal raw_width_basal
## Min. :0.5931 Min. :0.3141 Min. :0.0000 Min. :0.0000
## 1st Qu.:0.7353 1st Qu.:0.3872 1st Qu.:0.1123 1st Qu.:0.2430
## Median :0.7582 Median :0.3989 Median :0.1518 Median :0.3152
## Mean :0.7546 Mean :0.3963 Mean :0.1439 Mean :0.2976
## 3rd Qu.:0.7772 3rd Qu.:0.4088 3rd Qu.:0.1804 3rd Qu.:0.3673
## Max. :0.8481 Max. :0.4401 Max. :0.2143 Max. :0.4223
##
## raw_heigth_basal percentage_var
## Min. :0.0000 Min. :0.8878
## 1st Qu.:0.4506 1st Qu.:2.5896
## Median :0.5968 Median :3.4024
## Mean :0.5653 Mean :3.5845
## 3rd Qu.:0.6929 3rd Qu.:4.4716
## Max. :0.7786 Max. :8.6845
##
basal_area/width/heigth = Sum of the percentage area/width/heigth of the three basal spikelets central_* = Sum of the percentage * of the 9, 10 and 11th spikelet Percentage_ * _S* = Sum of grain area/width/heigth in the given spikelet (S) as percentage of the overall spike area/width/heigth basal_grain__number = Average number of grains in the 3 basal spikelets central_grain_number = Same but for spikelet 9-11
raw_* = Sum of the area/width/heigth (cm) of 3 basal or central spikelets percentage_var = Difference between the basal and central spikelet percentage area filling
Sum of area of all grains in the three basal spikelets
ggplot(data = df_A6, mapping = aes(x = genotype, y = raw_area_basal)) + theme_classic()+
geom_jitter(size=5,alpha = 1, aes(colour = block),width = 0.1) + geom_boxplot(alpha = 0)
statistical analysis of data above
model = lm(raw_area_basal ~ genotype + block,
data = df_A6)
summary(model)
##
## Call:
## lm(formula = raw_area_basal ~ genotype + block, data = df_A6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.11184 -0.02166 0.00222 0.02252 0.07340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.167820 0.013382 12.540 <2e-16 ***
## genotypebrompton 0.029932 0.017277 1.733 0.0871 .
## genotypecadenza 0.035579 0.017277 2.059 0.0428 *
## genotypecharger -0.027095 0.017277 -1.568 0.1209
## genotypeclaire 0.002209 0.017277 0.128 0.8986
## genotypehereward -0.021937 0.017277 -1.270 0.2080
## genotyperialto -0.013140 0.017277 -0.761 0.4492
## genotyperobigus -0.010103 0.017277 -0.585 0.5604
## genotypesoissons -0.031326 0.017277 -1.813 0.0736 .
## genotypexi19 -0.045367 0.017277 -2.626 0.0104 *
## block2 -0.022611 0.009463 -2.389 0.0193 *
## block3 -0.024652 0.009463 -2.605 0.0110 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03665 on 78 degrees of freedom
## Multiple R-squared: 0.3849, Adjusted R-squared: 0.2981
## F-statistic: 4.437 on 11 and 78 DF, p-value: 3.614e-05
Anova(model,type = "II")
## Anova Table (Type II tests)
##
## Response: raw_area_basal
## Sum Sq Df F value Pr(>F)
## genotype 0.054325 9 4.4939 9.01e-05 ***
## block 0.011231 2 4.1808 0.01884 *
## Residuals 0.104767 78
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
marginal = lsmeans(model, ~ genotype)
CLD = cld(marginal,
alpha = 0.05,
Letters = letters,
adjust = "Tukey") ###
CLD
## genotype lsmean SE df lower.CL upper.CL .group
## xi19 0.107 0.0122 78 0.0715 0.142 a
## soissons 0.121 0.0122 78 0.0855 0.156 a
## charger 0.125 0.0122 78 0.0898 0.160 a
## hereward 0.130 0.0122 78 0.0949 0.165 ab
## rialto 0.139 0.0122 78 0.1037 0.174 abc
## robigus 0.142 0.0122 78 0.1068 0.177 abc
## alchemy 0.152 0.0122 78 0.1169 0.187 abc
## claire 0.154 0.0122 78 0.1191 0.189 abc
## brompton 0.182 0.0122 78 0.1468 0.217 bc
## cadenza 0.188 0.0122 78 0.1524 0.223 c
##
## Results are averaged over the levels of: block
## Confidence level used: 0.95
## Conf-level adjustment: sidak method for 10 estimates
## P value adjustment: tukey method for comparing a family of 10 estimates
## significance level used: alpha = 0.05
ggplot(data = df_A6, mapping = aes(x = genotype, y = basal_area)) + theme_classic()+
geom_jitter(size=5,alpha = 1, aes(colour = block),width = 0.1) + geom_boxplot(alpha = 0)
statistics
model = lm(basal_area ~ genotype + block,
data = df_A6)
summary(model)
##
## Call:
## lm(formula = basal_area ~ genotype + block, data = df_A6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.92925 -0.61221 0.03546 0.66423 1.56795
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.14874 0.32653 9.643 6.14e-15 ***
## genotypebrompton 0.68339 0.42155 1.621 0.109023
## genotypecadenza 0.75839 0.42155 1.799 0.075879 .
## genotypecharger -0.61983 0.42155 -1.470 0.145485
## genotypeclaire -0.07353 0.42155 -0.174 0.861980
## genotypehereward -0.02721 0.42155 -0.065 0.948706
## genotyperialto -0.58501 0.42155 -1.388 0.169158
## genotyperobigus -0.00693 0.42155 -0.016 0.986926
## genotypesoissons -0.34754 0.42155 -0.824 0.412202
## genotypexi19 -1.31859 0.42155 -3.128 0.002475 **
## block2 -0.81984 0.23089 -3.551 0.000655 ***
## block3 -0.87195 0.23089 -3.776 0.000309 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8942 on 78 degrees of freedom
## Multiple R-squared: 0.4187, Adjusted R-squared: 0.3368
## F-statistic: 5.108 on 11 and 78 DF, p-value: 5.661e-06
Anova(model,type = "II")
## Anova Table (Type II tests)
##
## Response: basal_area
## Sum Sq Df F value Pr(>F)
## genotype 30.583 9 4.2494 0.0001661 ***
## block 14.351 2 8.9734 0.0003108 ***
## Residuals 62.374 78
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
marginal = lsmeans(model, ~ genotype)
CLD = cld(marginal,
alpha = 0.05,
Letters = letters,
adjust = "Tukey") ###
CLD
## genotype lsmean SE df lower.CL upper.CL .group
## xi19 1.27 0.298 78 0.407 2.13 a
## charger 1.96 0.298 78 1.106 2.82 ab
## rialto 2.00 0.298 78 1.141 2.86 abc
## soissons 2.24 0.298 78 1.378 3.10 abc
## claire 2.51 0.298 78 1.652 3.37 abc
## hereward 2.56 0.298 78 1.699 3.42 abc
## robigus 2.58 0.298 78 1.719 3.44 abc
## alchemy 2.58 0.298 78 1.726 3.44 abc
## brompton 3.27 0.298 78 2.409 4.13 bc
## cadenza 3.34 0.298 78 2.484 4.20 c
##
## Results are averaged over the levels of: block
## Confidence level used: 0.95
## Conf-level adjustment: sidak method for 10 estimates
## P value adjustment: tukey method for comparing a family of 10 estimates
## significance level used: alpha = 0.05
ggplot(data = df_A6, mapping = aes(x = genotype, y = percentage_var)) + theme_classic()+
geom_jitter(size=5,alpha = 1, aes(colour = block),width = 0.1) + geom_boxplot(alpha = 0)
Statistics
model = lm(percentage_var ~ genotype + block,
data = df_A6)
summary(model)
##
## Call:
## lm(formula = percentage_var ~ genotype + block, data = df_A6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1941 -0.8547 -0.1447 0.6780 3.7227
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.72561 0.43657 6.243 2.08e-08 ***
## genotypebrompton -0.53714 0.56361 -0.953 0.34352
## genotypecadenza -0.35329 0.56361 -0.627 0.53260
## genotypecharger 1.37404 0.56361 2.438 0.01705 *
## genotypeclaire -0.42781 0.56361 -0.759 0.45011
## genotypehereward -0.03311 0.56361 -0.059 0.95331
## genotyperialto 0.25166 0.56361 0.447 0.65647
## genotyperobigus 0.24304 0.56361 0.431 0.66750
## genotypesoissons 1.19645 0.56361 2.123 0.03694 *
## genotypexi19 1.28106 0.56361 2.273 0.02578 *
## block2 0.63854 0.30870 2.068 0.04191 *
## block3 1.03980 0.30870 3.368 0.00118 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.196 on 78 degrees of freedom
## Multiple R-squared: 0.3481, Adjusted R-squared: 0.2562
## F-statistic: 3.787 on 11 and 78 DF, p-value: 0.0002287
Anova(model,type = "II")
## Anova Table (Type II tests)
##
## Response: percentage_var
## Sum Sq Df F value Pr(>F)
## genotype 43.051 9 3.3463 0.001649 **
## block 16.499 2 5.7711 0.004598 **
## Residuals 111.499 78
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
marginal = lsmeans(model, ~ genotype)
CLD = cld(marginal,
alpha = 0.05,
Letters = letters,
adjust = "Tukey") ###
CLD
## genotype lsmean SE df lower.CL upper.CL .group
## brompton 2.75 0.399 78 1.60 3.90 a
## claire 2.86 0.399 78 1.71 4.01 ab
## cadenza 2.93 0.399 78 1.78 4.08 ab
## hereward 3.25 0.399 78 2.10 4.40 ab
## alchemy 3.29 0.399 78 2.14 4.43 ab
## robigus 3.53 0.399 78 2.38 4.68 ab
## rialto 3.54 0.399 78 2.39 4.68 ab
## soissons 4.48 0.399 78 3.33 5.63 ab
## xi19 4.57 0.399 78 3.42 5.71 ab
## charger 4.66 0.399 78 3.51 5.81 b
##
## Results are averaged over the levels of: block
## Confidence level used: 0.95
## Conf-level adjustment: sidak method for 10 estimates
## P value adjustment: tukey method for comparing a family of 10 estimates
## significance level used: alpha = 0.05
ggplot(
df_A7, aes(x=spikelet, y=area, fill=area)) +
geom_bar(stat="identity") + coord_flip() + facet_grid(.~genotype) + scale_fill_gradient(low = "white", high = "blue")
ggplot(
df_A8, aes(x=spikelet, y=area, fill=area)) +
geom_bar(stat="identity") + coord_flip() + facet_grid(.~genotype) + scale_fill_gradient(low = "white", high = "brown")
ggplot(
df_A9, aes(x=spikelet, y=area, fill=area)) +
geom_bar(stat="identity") + coord_flip() + facet_grid(.~genotype) + scale_fill_gradient(low = "white", high = "green4")