-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.R
3971 lines (3613 loc) · 198 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
######################
### Be-Breeder 2.0 ###
######################
######################################################################################
######################################################################################
### ###
### Be-Breeder 2.0 is a R/Shiny application for statistical analysis and plant ###
### breeding developed by Prof. Dr. Roberto Fritsche Neto, Dr. Filipe Inacio ###
### Matias and PhD candidates Julia Silva Morosini and Fernando Garcia Espolador, ###
### who integrate the Laboratory of Allogamous Plant Breeding group - Department ###
### of Genetics, "Luiz de Queiroz"College of Agriculture, University of Sao Paulo, ###
### Brazil. ###
### ###
### This app is free for online use, just the intellectual property is reserved in ###
### periodicals by scientific citations of Be-Breeder papers. ###
### ###
### ###
### Contact: ###
### ###
### Avenida Padua Dias, 11 - Caixa Postal 83 ###
### CEP: 13418-900 - Piracicaba - Sao Paulo - Brasil ###
### Phone: 55 (19) 3429-4125 Line 45 ###
### ###
### E-mail: [email protected] ###
### [email protected] ###
### [email protected] ###
### ###
### https://twitter.com/Alogamas_ESALQ ###
### http://www.genetica.esalq.usp.br/alogamas/index2.html ###
### ###
######################################################################################
######################################################################################
### Libraries ###
library(shiny)
library(shinydashboard)
library(Matrix)
library(lme4)
library(lmerTest)
library(agricolae)
library(rrBLUP)
library(adegenet)
library(poppr)
library(ape)
library(matrixcalc)
library(data.table)
library(cluster)
library(fpc)
library(stringr)
library(snpReady)
library(corrgram)
library(corrr)
library(tableHTML)
source("NCII.R")
source("diallels.R")
source("gardner.R")
##################
### Shiny - Ui ###
##################
# #####################################################################################################################################################################################
header <- dashboardHeader(title = "Be-Breeder 2.0",
titleWidth = 250)
# #####################################################################################################################################################################################
sidebar <- dashboardSidebar(
tags$head(tags$style(HTML('.main-header .logo {
font-family: "Georgia", Times, "Times New Roman", serif;
font-weight: bold;
font-size: 25px;
}'))),
width = 250,
sidebarUserPanel("User Menu:"),
sidebarMenu(
id = "tabs",
menuItem("Start", tabName = "start",icon = icon("cogs"), badgeLabel = "new", badgeColor = "green"),
menuItem("Learning",icon = icon("graduation-cap"),
menuSubItem("Inbreeding Effect", tabName = "Lear1", icon = icon("angle-double-right")),
menuSubItem("Qualitative x Quantitative", tabName = "Lear3", icon = icon("angle-double-right")),
menuSubItem("Progeny Size", tabName = "Lear4", icon = icon("angle-double-right")),
menuSubItem("Selection Effect (HWE)", tabName = "Lear5", icon = icon("angle-double-right")),
menuSubItem("Genetic Variance Components", tabName = "Lear6", icon = icon("angle-double-right")),
menuSubItem("Synthetic Pop. Construction", tabName = "Lear7", icon = icon("angle-double-right")),
menuItem("Recurrent Selection", icon = icon("angle-double-right"),
menuSubItem("Intrapopulation",tabName = "Lear8", icon = icon("angle-double-right")),
menuSubItem("Reciprocal",tabName = "Lear81", icon = icon("angle-double-right"))),
menuItem("Hybrids (Jenkins)",icon = icon("angle-double-right"),
menuSubItem("Hybrid Prediction", tabName = "Lear91", icon = icon("angle-double-right")),
menuSubItem("Number of Hybrids", tabName = "Lear92", icon = icon("angle-double-right"))),
menuSubItem("Genotype x Environment", tabName = "Lear10", icon = icon("angle-double-right")),
menuSubItem("Heterosis", tabName = "Lear11", icon = icon("angle-double-right")),
menuSubItem("Tester Effect", tabName = "Lear12", icon = icon("angle-double-right")),
menuSubItem("Genetic Drift", tabName = "Lear13", icon = icon("angle-double-right")),
menuSubItem("Indirect Selection", tabName = "Lear14", icon = icon("angle-double-right")),
menuSubItem("Residual Effect on Selection", tabName = "Lear15", icon = icon("angle-double-right")),
menuSubItem("Replicates vs Population size", tabName = "Lear16", icon = icon("angle-double-right")),
menuSubItem("Economics in Plant Breeding", tabName = "Lear17", icon = icon("angle-double-right")),
menuSubItem("Linkage Disequilibrium (LD)", tabName = "Lear18", icon = icon("angle-double-right")),
menuSubItem("Cycles to Reduce LD", tabName = "Lear19", icon = icon("angle-double-right"))),
menuItem("Phenotypic Breeding", icon = icon("leaf"),
menuItem("Experimental Analysis", icon = icon("angle-double-right"),
menuSubItem("", tabName = "subitem11", icon = icon("th")),
menuSubItem("Statistical Model", tabName = "subitem12")),
menuItem("Diallel Analysis", icon = icon("venus-mars"),
menuItem("Griffing Design",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName ="subitem1311"),
menuSubItem("Analysis",tabName ="subitem1312")),
menuItem("Gardner and Eberhart Design",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName ="subitem1321"),
menuSubItem("Analysis",tabName ="subitem1322")),
menuItem("Factorial Design",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName ="subitem1331"),
menuSubItem("Analysis",tabName ="subitem1332"))),
menuItem("Index Selection", icon = icon("angle-double-right"),
menuSubItem("Index File",tabName ="subitem141"),
menuSubItem("Index Analysis",tabName ="subitem142")),
menuItem("Correlation Analysis",icon = icon("angle-double-right"),
menuSubItem("File Input",tabName ="subitem151"),
menuSubItem("Coefficients and graphs",tabName ="subitem152")),
menuItem("Path Analysis",icon = icon("angle-double-right"),
menuSubItem("Trait File",tabName ="subitem161"),
menuSubItem("Path Analysis",tabName ="subitem162")),
menuItem("Biplot Analysis",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName ="subitem171"),
menuSubItem("GE Biplot",tabName ="subitem172"),
menuSubItem("GE Cluster",tabName ="subitem174")),
menuItem("Experiment Designs",icon = icon("angle-double-right"),
menuSubItem("Designs",tabName ="subitem18"))),
menuItem("Molecular Breeding", icon = icon("sitemap"),
menuItem("Genotyping Data",icon = icon("wrench"),
menuItem("Quality Control", icon = icon("angle-double-right"),
menuSubItem("Sample Set",tabName = "mol121", icon = icon("angle-double-right")),
menuSubItem("HapMap",tabName = "mol1212", icon = icon("angle-double-right")),
menuSubItem("Raw Data",tabName = "mol122", icon = icon("angle-double-right"))),
menuItem("Kinship Matrix", icon = icon("angle-double-right"),
menuSubItem("Z Matrix",tabName = "mol11", icon = icon("angle-double-right")),
menuSubItem("Kinship Matrix", tabName = "mol13", icon = icon("angle-double-right")))),
menuItem("Genomic Selection (GS)",icon = icon("angle-double-right"),
menuItem("GS analysis",icon = icon("angle-double-right"),
menuSubItem("Phenotypic file", tabName = "mol21", icon = icon("angle-double-right")),
menuSubItem("Z Matrix", tabName = "mol22", icon = icon("angle-double-right")),
menuSubItem("rrBLUP", tabName = "mol23", icon = icon("angle-double-right"))),
menuItem("Prediction and Selection",icon = icon("angle-double-right"),
menuSubItem("Marker effect", tabName = "mol241", icon = icon("angle-double-right")),
menuSubItem("Z Matrix", tabName = "mol242", icon = icon("angle-double-right")),
menuSubItem("Selection", tabName = "mol243", icon = icon("angle-double-right")))),
menuItem("Genomic Association (GWAS)",icon = icon("angle-double-right"),
menuSubItem("Phenotypic file", tabName = "mol31", icon = icon("angle-double-right")),
menuSubItem("HapMap|t(Z)", tabName = "mol32", icon = icon("angle-double-right")),
menuSubItem("Scores", tabName = "mol33", icon = icon("angle-double-right")),
menuSubItem("Manhattan plot", tabName = "mol34", icon = icon("angle-double-right"))),
menuItem("Diversity Analysis",icon = icon("angle-double-right"),
menuItem("Genetic Diversity",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName = "mol41",icon = icon("angle-double-right")),
menuSubItem("Diversity Summary",tabName = "mol42",icon = icon("angle-double-right")),
menuSubItem("Graphs",tabName = "mol43",icon = icon("angle-double-right"))),
menuItem("Discriminant Analysis",icon = icon("angle-double-right"),
menuSubItem("Dataset",tabName = "mol61",icon = icon("angle-double-right")),
menuSubItem("Graphs",tabName = "mol62",icon = icon("angle-double-right"))),
menuItem("Population Genetics",icon = icon("angle-double-right"),
menuSubItem("Subpopulation Groups",tabName = "mol51",icon = icon("angle-double-right")),
menuSubItem("Z Matrix",tabName = "mol52",icon = icon("angle-double-right")),
menuSubItem("PopGen Analysis",tabName = "mol53",icon = icon("angle-double-right"))))),
menuItem("Information", icon = icon("info-circle"),
menuSubItem("About Be-Breeder 2.0", tabName = "info1", icon = icon("angle-double-right")),
menuSubItem("Please cite us", tabName = "info2", icon = icon("angle-double-right")),
menuSubItem("Team Contact", tabName = "info3", icon = icon("angle-double-right"))),
menuItem(" ",icon = icon("angle-right"), badgeLabel = "Download Manual",badgeColor = "red",href = "http://vencovsky.esalq.usp.br:3838/shiny/manual/Manual_BeBreeder.pdf"),
htmlTemplate("flagC.html",align = "center")
))
# #####################################################################################################################################################################################
body <- dashboardBody(
tabItems(
# #####################################################################################################################################################################################
tabItem("start", box(status = "primary", height = 700, width = 600, align = "center",
fluidRow(
infoBox(hr(), "Home Page",icon=icon("home"), fill = T, color = "aqua",
href = "http://www.genetica.esalq.usp.br/alogamas/index2.html"),
infoBox(hr(), "USP Page",icon=icon("users"), fill = T, color = "aqua",
href = "http://www.en.esalq.usp.br"),
infoBox(hr(), "Twitter Page",icon=icon("twitter"), fill = T, color = "aqua",
href = "https://twitter.com/Alogamas_ESALQ?ref_src=twsrc%5Etfw")),
br(),
tags$style(make_css(list('.box',
c('text-align','font-size', 'font-family', 'color'),
c('top','25px', 'arial', 'red')))),
strong("version 2.0: NEW FEATURES AVAILABLE!"),
br(),
br(),
a(id = "web_button", class = "btn action_button",
href = "http://vencovsky.esalq.usp.br:3838/shiny/manual/Manual_BeBreeder.pdf",
img(src="logobb19.jpg", height = 320, width = 950, align = "center"))
)),
# #####################################################################################################################################################################################
# Learning
# #####################################################################################################################################################################################
tabItem("Lear1",
fluidPage(
titlePanel("Inbreeding Effect"),
h4(em("In here, one can observe the fluctuation in additive and dominance genetic variances between and within populations as a function of the inbreeding coefficient
(Wright's F statistics), and visualize how the genotype frequencies change according to the level of self-generation", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
selectInput("Lear1.1", "Self-Generation:",
choices = c("F1","F2","F3","F4","F5","F6","F7","F8","F9","F.inf"),width = 150),
sliderInput("Lear1.2","Wright's inbreeding coefficient (F)",0,1,0),
tableOutput("cont.Lear.1.0"),
helpText("ABOUT:"),
helpText('The results are given using the following equations:'),
img(src='Lear1.jpg',height = 200, width = 170)),
mainPanel(plotOutput("cont.Lear.1"))))),
# ######################################################################################################################################################################################
tabItem("Lear3",
fluidPage(
titlePanel("Qualitative x Quantitative"),
h4(em("In here, one can simulate the genetic structure of a trait, choosing the number of genes with dominance, partial dominance, and additive effects. The aim is to
observe how the intra-allelic interactions influence the number of phenotypic classes and the frequency of each class in the population", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear3.1", "Number of dominant genes",0,30,15,step =1),
sliderInput("Lear3.2", "Number of partial dominant genes",0,30,10,step =1),
sliderInput("Lear3.3", "Number of additive genes",0,30,15,step =1)),
mainPanel(plotOutput("cont.Lear.3"))))),
# ######################################################################################################################################################################################
tabItem("Lear4",
fluidPage(
titlePanel("Progeny Size"),
h4(em("In here, one can estimate the number of individuals to be evaluated in the progeny in order to obtain a genotype carrying a trait of interest controled by n genes in a
population that has undergone m inbreeding generations, with a certain probability (P)", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
numericInput("Lear4.1","Number of Genes (n)",min = 0,value = 0),
numericInput("Lear4.2","Self-Generation (m)",min = 0,value = 0),
sliderInput("Lear4.3", "Precision (P)",0,1,0.95),
helpText("ABOUT:"),
helpText("Progeny size is given by 'nº', calculated as:"),
img(src='Lear4.jpg',height = 150, width = 160)),
tableOutput("cont.Lear.4")))),
#verbatimTextOutput("cont.Lear.4")))),
# ######################################################################################################################################################################################
tabItem("Lear5",
fluidPage(
titlePanel("Selection Effect (HWE)"),
h4(em("In here, one can simulate different scenarios to understand how a locus with 2 alleles is affected by selection regarding the Hardy-Weinberg equilibrium (HWE) according to
the number of genotypes (original and selected), their correspondent phenotypic value, the inbreeding rate, and the broad-sense heritability", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
numericInput("Lear5.2","Number of AA genotype",min = 0,value = 1),
numericInput("Lear5.3","Number of Aa genotype",min = 0,value = 0),
numericInput("Lear5.4","Number of aa genotype",min = 0,value = 0),
sliderInput("Lear5.41","Rate of Inbreeding",0,1,0),
numericInput("Lear5.5","Yield of AA",min = 0,value = 0),
numericInput("Lear5.6","Yield of Aa",min = 0,value = 0),
numericInput("Lear5.7","Yield of aa",min = 0,value = 0),
sliderInput("Lear5.11", "Heritability",0,1,1),
numericInput("Lear5.8","Number of AA selected",min = 0,value = 0),
numericInput("Lear5.9","Number of Aa selected",min = 0,value = 0),
numericInput("Lear5.10","Number of aa selected",min = 0,value = 0),
helpText("ABOUT:"),
helpText("Results are calculated using the following equations:"),
img(src='Lear5.jpg',height = 160, width = 230),
helpText("DS = selection differential"),
helpText("SG = selection gain (response to selection)")),
mainPanel(
#textOutput("con.Lear.5.01"),
htmlOutput("phr1"),
tableOutput("cont.Lear.5.0"),
htmlOutput("phr2"),
tableOutput("cont.Lear.5.1"),
htmlOutput("phr3"),
tableOutput("cont.Lear.5.2"),
htmlOutput("phr4"),
tableOutput("cont.Lear.5.3"),
htmlOutput("phr5"),
tableOutput("cont.Lear.5.4"),
htmlOutput("phr6"),
tableOutput("cont.Lear.5.5"))))),
#verbatimTextOutput("cont.Lear.5")))),
# ######################################################################################################################################################################################
tabItem("Lear6",
fluidPage(
titlePanel("Genetic Variance Components"),
h4(em("In here, one can set up the additive (a) and dominance (d) effects of a locus with two alleles (p and q) in order to observe how they impact on
the magnitude and relationship among the genetic variance components", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear6.2","Frequency of allele (p)",0,1,0.6),
sliderInput("Lear6.1","Dominance Effect (d)",0,2.5,0.5),
sliderInput("Lear6.3","Additive Effect (a)",0,1,0.3),
#verbatimTextOutput("cont.Lear.6.1")),
helpText("ABOUT:"),
helpText("Results are calculated using the following equations:"),
img(src='Lear6.1.jpg',height = 200, width = 200),
helpText("add = average degree of dominance")),
mainPanel(plotOutput("cont.Lear.6"),
tableOutput("cont.Lear.6.1"))))),
# ######################################################################################################################################################################################
tabItem("Lear7",
fluidPage(
titlePanel("Constructing Synthetic Populations"),
h4(em("In here, the aim is to visualize how the number of alleles of a gene relates to genetic variability due to heterozigosity. The user provides the number of alleles
and their respective initial frequencies in the composition of the population.", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear7.1","Number of alleles",0,10,10,step = 1),
textAreaInput("Lear7.2","Frequency of each allele (Sum = 1.0)",
value = "0.1,\n0.1,\n0.1,\n0.1,\n0.1,\n0.1,\n0.1,\n0.1,\n0.1,\n0.1",
rows = 10, width = 80)),
mainPanel(
tableOutput("cont.Lear.7"),
helpText("ABOUT:"),
helpText("Results are calculated using the following equations:"),
img(src='Lear7.jpg',height = 150, width = 250))
))),
#verbatimTextOutput("cont.Lear.7")))),
# ######################################################################################################################################################################################
tabItem("Lear8",
fluidPage(
titlePanel("Intrapopulation Recurrent Selection"),
h4(em("Considering the IRS breeding scheme, the user can simulate different selection scenarios defining the evaluation and recombination units and derived parameters to obtain
the estimates of response to selection, effective size of the population (Ne), and inbreeding coefficient (Wright'F)", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
radioButtons('Lear8.1', '| Evaluation/Recombination | c | D1 | Ne |',
c("| HS/HS | 1/4 | 0 | 4 |"='MI/MI',
"| HS/S1 | 1/2 | 0 | 1 |"='MI/S1',
"| FS/FS | 1/2 | 0 | 2 |"='IC/IC',
"| FS/S1 | 1/2 | 0 | 1 |"='IC/S1',
"| S1/S1 | 1 |1/2| 1 |"='S1/S1',
"| S2/S2 | 3/2 |5/4| 2/3 |"='S2/S2'),
'MI/MI'),
numericInput("Lear8.2","Number of Progenies Evaluated",min = 0,value = 0),
sliderInput("Lear8.3","Inbreeding Depression",0,1,0),
sliderInput("Lear8.4","Heritability",0,1,0),
sliderInput("Lear8.5","Selection Intensity",0,50,0,step = 1),
sliderInput("Lear8.6","Number of cycles",1,20,1,step = 1),
sliderInput("Lear8.7","Cycle Interval (year)",0.2,7,1,step = 0.1),
helpText("ABOUT:"),
helpText("Results are calculated using the following equation:"),
img(src='Lear8.jpg',width = 250,height = 110)),
mainPanel(tableOutput("cont.Lear.8a1"),
plotOutput("cont.Lear.8g"))))),
# ######################################################################################################################################################################################
tabItem("Lear81",
fluidPage(
titlePanel("Reciprocal Recurrent Selection"),
h4(em("Considering the RRS breeding scheme, the user can simulate different selection scenarios defining the evaluation and recombination units and derived parameters to obtain
the estimates of response to selection, effective size of the population (Ne) for each group, and inbreeding coefficient (Wright'F) for each group", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
radioButtons('Lear81.1', '| Evaluation/Recombination | c | Ne |',
c("| HS/HS | 1/8 | 4 |"='MI/MI',
"| HS/S1 | 1/4 | 1 |"='MI/S1',
"| TC/HS | 1/16| 4 |"='TC/MI',
"| FS/S1 | 1/4 | 1 |"='IC/S1'),
'MI/MI'),
numericInput("Lear81.21","Number of Progenies - Group 1",min = 0,value = 0),
numericInput("Lear81.22","Number of Progenies - Group 2",min = 0,value = 0),
sliderInput("Lear81.41","Heritability - Group 1",0,1,0),
sliderInput("Lear81.42","Heritability - Group 2",0,1,0),
sliderInput("Lear81.51","Selection Intensity (i1)",1,50,1,step = 1),
sliderInput("Lear81.52","Selection Intensity (i2)",1,50,1,step = 1),
sliderInput("Lear81.6","Number of cycles",1,20,1,step = 1),
sliderInput("Lear81.7","Cycle Interval (year)",0.2,7,1,step = 0.1),
helpText("ABOUT:"),
helpText("Results are calculated using the following equation:"),
img(src='Lear8.1.jpg',width = 250,height = 110)),
mainPanel(tableOutput("cont.Lear.8.1"),
plotOutput("cont.Lear.81g"))))),
# ######################################################################################################################################################################################
tabItem("Lear91",
fluidPage(
titlePanel("Hybrid Prediction"),
h4(em("The user can obtain the predicted value for three-way hybrids (TH) and double-cross hybrids (DH) through the input of a .txt file
containing the mean phenotypic values for the single-cross hybrids (SH)", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
fileInput('file.L9', 'Choose File:',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header.L9', 'Header', FALSE),
radioButtons('sep.L9', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote.L9', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
selectInput("Lear91.out", "Look Options:",
choices = c("Table",
"Three-way Cross Hybrids Prediction",
"Double Cross Hybrids Prediction")),
checkboxInput("ex.L.9","Example", FALSE),
helpText("ABOUT:"),
helpText("Results are calculated using the following equation:"),
img(src='Lear9.1.jpg',width = 300,height = 150)),
tableOutput("cont.Lear.9.1")))),
# ######################################################################################################################################################################################
tabItem("Lear92",
fluidPage(
titlePanel("Number of Hybrids"),
h4(em("The user can obtain the potential number of single-cross hybrids (SH), three-way hybrids (TH), and double-cross hybrids (DH), given the number of lines in a
breeding population (either for one or two heterotic groups)", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
selectInput("Lear9.2.1", "Population Structure",
choices = c("One Heterotic Group",
"Two Heterotic Groups")),
# uiOutput("res3.lear92"),
numericInput("Lear9.2.2","Number of Lines", min = 0,value = 0),
numericInput("Lear9.2.3","Number of Lines in Group 1", min = 0,value = 0),
numericInput("Lear9.2.4","Number of Lines in Group 2", min = 0,value = 0),
helpText("ABOUT:"),
helpText("Results are calculated using the following equations:"),
img(src='Lear9.2.jpg',height = 300, width = 220)),
tableOutput("cont.Lear.9.2")))),
# ######################################################################################################################################################################################
tabItem("Lear10",
fluidPage(
titlePanel("Genotype x Environment"),
h4(em("In here, one can simulate different degrees of interaction considering three genotypes and two environments in order to verify how the GxE interaction influences the variances
and the broad-sense heritability", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear10.7","Coefficient of Variation (CV)",5,20,5),
sliderInput("Lear10.8","Number of Repetitions (r)",1,4,1,step = 1),
sliderInput("Lear10.1","Yield of Genotype 1 in Environment 1",0,5,0),
sliderInput("Lear10.2","Yield of Genotype 1 in Environment 2",0,5,0),
sliderInput("Lear10.3","Yield of Genotype 2 in Environment 1",0,5,0),
sliderInput("Lear10.4","Yield of Genotype 2 in Environment 2",0,5,0),
sliderInput("Lear10.5","Yield of Genotype 3 in Environment 1",0,5,0),
sliderInput("Lear10.6","Yield of Genotype 3 in Environment 2",0,5,0),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(htmlOutput("phr10.1"),
tableOutput("cont.Lear.10a.1"),
htmlOutput("phr10.2"),
tableOutput("cont.Lear.10a.2"),
htmlOutput("phr10.3"),
tableOutput("cont.Lear.10a.3"),
plotOutput("cont.Lear.10.2"))))),
# ######################################################################################################################################################################################
tabItem("Lear11",
fluidPage(
titlePanel("Heterosis"),
h4(em("The aim in here is to understand how the heterosis fluctuates according to the number of genes, the dominance deviation, and the genetic divergence between
the parents (lines) for the simulated hybrids", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear11.1","Number of Genes",0,100,0, step = 10),
sliderInput("Lear11.2","Dominance Deviation (d)",0,1,0, step = 0.1),
sliderInput("Lear11.3","Genetic Divergence",0,1,0, step = 0.1),
helpText("ABOUT:"),
helpText("Results are calculated using the following equations:"),
img(src='Lear11.jpg',height = 200, width = 150)),
tableOutput("cont.Lear.11")))),
# #####################################################################################################################################################################################
tabItem("Lear12",
fluidPage(
titlePanel("Tester Effect"),
h4(em("In here, the user can determine the effect of testers in a experimental condition in order to verify their impacts on the genetic variability", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear12.1","Frequency of allele (p)",0,1,0),
sliderInput("Lear12.2","r",0,1,0),
sliderInput("Lear12.3","Additive Effect (a)",0,1,0),
sliderInput("Lear12.4","Dominance Effect (d)",0,2,0, step = 0.1),
sliderInput("Lear12.5","Inbreeding coefficient (F)",0,1,0),
verbatimTextOutput("cont.Lear.12.1"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(plotOutput("cont.Lear.12"))))),
# mainPanel(tableOutput("cont.Lear.12.1"),
# plotOutput("cont.Lear.12"))))),
# #####################################################################################################################################################################################
tabItem("Lear13",
fluidPage(
titlePanel("Genetic Drift"),
h4(em("In here, one can understand how the occurence of genetic drift is influenced by the frequency of the allele 'a' (q) and the selection intensity adopted. From that,
is is possible to estimate how many generations are needed to eliminate this allele", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear13.1","Frequency of allele 'a' (q)",0,1,0),
sliderInput("Lear13.2","Selection Intensity",0,1,0.1),
verbatimTextOutput("cont.Lear.13.1"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(plotOutput("cont.Lear.13"))))),
# #####################################################################################################################################################################################
tabItem("Lear14",
fluidPage(
titlePanel("Indirect Selection"),
h4(em("In here, the user can verify the possibility of selecting a trait based on another, which is called Indirect selection. Providing the values for the parameters
requested, it is possible to calculate the response to the indirect selection", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear14.1","Heritability of trait 'x'",0,1,0),
sliderInput("Lear14.2","Correlation between 'x' and 'y'",0,1,0),
numericInput("Lear14.3","Number of individuals evaluated",min = 0,value = 10),
numericInput("Lear14.4","Number of individuals selected",min = 0,value = 0),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(tableOutput("cont.Lear.14.1"),
plotOutput("cont.Lear.14"))))),
# #####################################################################################################################################################################################
tabItem("Lear15",
fluidPage(
titlePanel("Residual Effect on Selection"),
h4(em("The aim in this tab is to analyze if the selection process in a breeding population is being reliable and capturing the best breeding values. Among other variables,
it is displayed the genetic variability (GV) for each scenario", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
numericInput("Lear15.1","Number of individuals evaluated",min = 0,value = 10),
sliderInput("Lear15.2","Selection Intensity (%)",0,20,0),
sliderInput("Lear15.3","Heritability",0,1,0),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
tableOutput("cont.Lear.15")))),
# #####################################################################################################################################################################################
tabItem("Lear16",
fluidPage(
titlePanel("Replicates vs Population size"),
h4(em("In here, the user here may infer what the impact of the number of replicates on the population size is, and especially, what is the increment of that
on the response to selection (RS), simulating different scenarios in function of the parameters above", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear16.1","Number of replicates",1,5,1),
numericInput("Lear16.2","Number of plots available",min = 0,value = 0),
numericInput("Lear16.3","Number of genotypes selected",min = 0,value = 0),
sliderInput("Lear16.4","Trait Heritability",0,1,0),
verbatimTextOutput("cont.Lear.16.1"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(plotOutput("cont.Lear.16"))))),
# #####################################################################################################################################################################################
tabItem("Lear17",
fluidPage(
titlePanel("Economics in Plant Breeding"),
h4(em("In here, the aim is to provide a broader framework of a breeding process, considering the cost spent per plot, the viability, and the expected genetic gain. By that,
the user can observe the influence of the nature of the trait and the experimental size on the total costs", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
numericInput("Lear17.1","Number of genotypes evaluated",min = 0,value = 10),
numericInput("Lear17.2","Number of genotypes selected",min = 0,value = 0),
sliderInput("Lear17.3","Trait Heritability",0,1,0),
sliderInput("Lear17.4","Number of replicates",1,5,1),
sliderInput("Lear17.5","Time (year/cycle)",0.2,7,0.2),
numericInput("Lear17.6","Cost to evaluate one plot (U$)",min = 0,value = 10),
verbatimTextOutput("cont.Lear.17.1"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(plotOutput("cont.Lear.17"))))),
# ######################################################################################################################################################################################
tabItem("Lear18",
fluidPage(
titlePanel("Linkage Disequilibrium (LD)"),
h4(em("In here, one can simulate different conditions informing the frequencies of the haplotypes AB, Ab, aB, and ab, and the rates of the alleles A, a, B,
and b. The application will then estimate whether the loci are independent", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear18.1","Frequency of haplotype AB",0,1,0),
sliderInput("Lear18.2","Frequency of haplotype Ab",0,1,0),
sliderInput("Lear18.3","Frequency of haplotype aB",0,1,0),
uiOutput('ui.lear18.1'),
sliderInput("Lear18.5","Frequency of A",0,1,0),
uiOutput('ui.lear18.2'),
sliderInput("Lear18.7","Frequency of B",0,1,0),
uiOutput('ui.lear18.3')),
mainPanel(tableOutput("cont.Lear.18"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank")))))),
# ######################################################################################################################################################################################
tabItem("Lear19",
fluidPage(
titlePanel("Cycles to Reduce LD"),
h4(em("In here, combining the loss of linkage disequilibrium (LD) aimed to the recombination ratio between loci in a population, it is possible to compute how many cycles are
needed to dissipate the LD", style = "color:gray")),
br(),
sidebarLayout(
sidebarPanel(
sliderInput("Lear19.1","Loss of LD (%)",0,100,5),
sliderInput("Lear19.2","Recombination fraction between loci",0,0.5,0.05),
verbatimTextOutput("cont.Lear.19.1"),
helpText("ABOUT:"),
helpText("Equations for this tab are detailed on GitHub:", a(href="https://github.com/filipematias23/Be-Breeder/", "https://github.com/filipematias23/Be-Breeder/", target="_blank"))),
mainPanel(plotOutput("cont.Lear.19"))))),
# ######################################################################################################################################################################################
# Phenotypic Breeding
# ######################################################################################################################################################################################
tabItem("subitem11",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose File:',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header', 'Header', FALSE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
selectInput("table.1", "Look Options:",
choices = c("Table","Data Structure","Names"),width = 150),
checkboxInput("info.11",strong(code("HELP")), FALSE),
checkboxInput("ex.11","Example", FALSE)),
verbatimTextOutput("contents11")))),
# #####################################################################################################################################################################################
tabItem("subitem12",
fluidPage(
titlePanel("Statistical Model"),
sidebarLayout(
sidebarPanel(
checkboxInput('res.12.name', 'Sources of Variation', FALSE),
textInput("model","Type the Statistical Model", width = 700,
value = "y~Block+Site+(1|Genotype)+(1|Genotype:Site)"),
checkboxInput('ml', 'ML(Default = REML)', FALSE),
checkboxInput('res.12.fix', 'Genotype as Fixed (Default = Random)', FALSE),
actionButton("res.12.run","run",icon = icon("hand-o-up")),
selectInput("res.12.1", "Choose Results:",
choices = c("Mean",
"Summary",
"ANOVA",
"Analysis of Deviance",
"BLUE","Adjusted Means",
"BLUP","Predicted Means"),width = 200),
sliderInput("res.12.2", "Selection Intensity",0,100,100),
textInput("name.txt.12","Type the File Name"),
downloadButton('downloadData12', 'Download'),
checkboxInput("info.12",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents12")))),
# #####################################################################################################################################################################################
tabItem("subitem1311",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1311', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header1311', 'Header', FALSE),
radioButtons('sep1311', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote1311', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.1311",strong(code("HELP")), FALSE),
checkboxInput("ex.1311","Example", FALSE)),
verbatimTextOutput("contents1311")))),
# #####################################################################################################################################################################################
tabItem("subitem1321",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1321', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header1321', 'Header', FALSE),
radioButtons('sep1321', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote1321', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.1321",strong(code("HELP")), FALSE),
checkboxInput("ex.1321","Example", FALSE)),
verbatimTextOutput("contents1321")))),
# #####################################################################################################################################################################################
tabItem("subitem1331",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1331', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header1331', 'Header', FALSE),
radioButtons('sep1331', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote1331', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.1331",strong(code("HELP")), FALSE),
checkboxInput("ex.1331","Example", FALSE)),
verbatimTextOutput("contents1331")))),
# #####################################################################################################################################################################################
tabItem("subitem1312",
fluidPage(
titlePanel("Griffing Design"),
sidebarLayout(
sidebarPanel(
selectInput("res.1312", "Choose Results:",
choices = c("Output")),
textInput("name.txt.1312","Type the Name File"),
downloadButton('downloadData1312', 'Download'),
checkboxInput("info.1312",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents1312")))),
# #####################################################################################################################################################################################
tabItem("subitem1322",
fluidPage(
titlePanel("Gardner and Eberhart Design"),
sidebarLayout(
sidebarPanel(
selectInput("res.1322", "Choose Results:",
choices = c("Output")),
textInput("name.txt.1322","Type the Name File"),
downloadButton('downloadData1322', 'Download'),
checkboxInput("info.1322",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents1322")))),
# #####################################################################################################################################################################################
tabItem("subitem1332",
fluidPage(
titlePanel("Factorial Design"),
sidebarLayout(
sidebarPanel(
selectInput("res.1332", "Choose Results:",
choices = c("Output")),
textInput("name.txt.1332","Type the Name File"),
downloadButton('downloadData1332', 'Download'),
checkboxInput("info.1332",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents1332")))),
# #####################################################################################################################################################################################
tabItem("subitem141",
fluidPage(
titlePanel("Index Selection"),
sidebarLayout(
sidebarPanel(
fileInput('file14', 'Choose File',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header.14', 'Header', FALSE),
radioButtons('sep.14', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote.14', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.141",strong(code("HELP")), FALSE),
checkboxInput("ex.14","Example", FALSE)),
verbatimTextOutput("contents14.1")))),
# #####################################################################################################################################################################################
tabItem("subitem142",
fluidPage(
titlePanel("Index Analysis"),
sidebarLayout(
sidebarPanel(
checkboxInput('res.14.name', 'Trait Names', FALSE),
textInput("vec.14", "Type a vector with weights (comma delimited)", "0.3,-0.5,0.1,-0.1"),
sliderInput("res.14", "Selection Intensity",0,100,100),
textInput("name.txt.14","Type the File Name"),
downloadButton('downloadData14', 'Download'),
checkboxInput("info.142",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents14.2")))),
# #####################################################################################################################################################################################
tabItem("subitem151",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file15', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header15', 'Header', FALSE),
radioButtons('sep15', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote15', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.151",strong(code("HELP")), FALSE),
checkboxInput("ex.15.0","Example", FALSE)),
verbatimTextOutput("contents151")))),
# #####################################################################################################################################################################################
tabItem("subitem152",
fluidPage(
titlePanel("Correlation Analysis"),
sidebarLayout(
sidebarPanel(
selectInput("res.15.2", "Choose Results:",
choices = c("Genotype Correlation",
"pValue")),
numericInput("res.15.3","Minimum Value of Correlation",min = c(-1),max = 1,value = 0.1,step = 0.01),
textInput("name.txt.15","Type the File Name"),
downloadButton('downloadData15', 'Download'),
checkboxInput("info.152",strong(code("HELP")), FALSE)),
mainPanel(verbatimTextOutput("contents15.2"),
plotOutput("contents15.1"),
plotOutput("contents15.3"))))),
# #####################################################################################################################################################################################
tabItem("subitem161",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file16', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header16', 'Header', FALSE),
radioButtons('sep16', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote16', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),
checkboxInput("info.161",strong(code("HELP")), FALSE),
checkboxInput("ex.16","Example", FALSE)),
verbatimTextOutput("contents161")))),
# #####################################################################################################################################################################################
tabItem("subitem162",
fluidPage(
titlePanel("Path Analysis"),
sidebarLayout(
sidebarPanel(
checkboxInput('res.16.name', 'Trait Names', FALSE),
textInput("name.16", "Main Trait", "trait1"),
selectInput("res.16.2", "Choose Results:",
choices = c("Path Analysis",
"Traits Correlation")),
textInput("name.txt.16","Type the File Name"),
downloadButton('downloadData16', 'Download'),
checkboxInput("info.162",strong(code("HELP")), FALSE)),
verbatimTextOutput("contents16.2")))),
# #####################################################################################################################################################################################
tabItem("subitem171",
fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file17', 'Choose File.txt',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv',".txt")),
tags$hr(),
checkboxInput('header17', 'Header', FALSE),
radioButtons('sep17', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
','),
radioButtons('quote17', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
''),