SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
Genomic Selection with
Bayesian Generalized Linear
Regression model using R
by Avjinder Kaler
Avjinder Singh Kaler
University of Arkansas, Fayetteville, AR
avjindersingh@gmail.com
This tutorial is used to perform a genomic prediction.
Anyone can use and learn about genomic prediction using
BGLR R package and if you have question related to
genomic prediction and other models, you can contact me
using above email.
Download and Install software.
1. R program
https://cran.r-project.org/bin/windows/base/
2. R Studio
https://www.rstudio.com/products/rstudio/download/
Steps in Genomic Prediction
Step 1: Data Formatting
Format the genotype and phenotype data files needed for BGLR package.
Three types of files are required; genotype file in numeric form, phenotype
file, and kinship matrix.
Format your files like this.
Genotype file: Markers in Columns and Lines in Rows
Kinship Matrix file: You can third party software to estimate kinship matrix
like TASSEL, GAPIT.
Need Line ID in Columns, not in Rows.
Phenotype file: You can put 10/20/30 % data missing to predict those missing
values and check accuracy of model by checking correlation between actual
phenotypic value and predictive values. High correlation means high
accuracy.
First Column is Line ID and Second column is Trait. You can have more
traits in rest of columns.
Step 2: R code for Genomic Prediction
install.packages("bigmemory")
install.packages("biganalytics")
install.packages(“BGLR”)
library("bigmemory")
library("biganalytics")
library(“BGLR”)
Step 3: Set working directory and import data
Set your working directory where you have your data files.
# Read all files
#Phenotype file loading
Y <- read.table("AAE.txt", head = TRUE)
y<-Y[,2]
#Genotype file loading
X <- read.table("g3.txt", head = TRUE)
#Kinship matrix file loading
A<- read.table("k3.txt", head = TRUE)
# Check the dimensions for all files, need to be same dimension for Lines
dim(y)
dim(X)
dim(A)
#Computing the genomic relationship matrix
X<-scale(X,center=TRUE,scale=TRUE)
G<-tcrossprod(X)/ncol(X)
#Computing the eigen-value decomposition of G
EVD <-eigen(G)
#Setting the linear predictor
ETA<-list(list(K=A, model='RKHS'),
list(V=EVD$vectors,d=EVD$values, model='RKHS')
)
#Fitting the model
fm<-BGLR(y=y, ETA=ETA, nIter=12000, burnIn=2000,saveAt='PGBLUP_')
save(fm,file='fmPG_BLUP.rda')
#Predictions
yHat<-fm$yHat
tmp<-range(c(y,yHat))
plot(yHat~y,xlab='Observed',ylab='Predicted',col=2,
xlim=tmp,ylim=tmp); abline(a=0,b=1,col=4,lwd=2)
#Exporting your Genomic prediction values
write.table(yHat, "C:/Folder/file. xt", sep="t")
#Godness of fit and related statistics
fm$fit
fm$varE # compare to var(y)
#Variance components associated with the genomic and pedigree
fm$ETA[[1]]$varU
fm$ETA[[2]]$varU
# Residual variance
varE<-scan('PGBLUP_varE.dat')
plot(varE,type='o',col=2,cex=.5);
Note:
# Check results in your folder and correlate predictive values with
actual phenotypic values, see how accurate is your model.
For other Tutorials, you can visit here:
http://www.slideshare.net/AvjinderSingh

Mais conteúdo relacionado

Mais procurados

Whole Genome Selection
Whole Genome SelectionWhole Genome Selection
Whole Genome SelectionRaghav N.R
 
Introduction to association mapping and tutorial using tassel
Introduction to association mapping and tutorial using tasselIntroduction to association mapping and tutorial using tassel
Introduction to association mapping and tutorial using tasselAwais Khan
 
Association mapping for improvement of agronomic traits in rice
Association mapping  for improvement of agronomic traits in riceAssociation mapping  for improvement of agronomic traits in rice
Association mapping for improvement of agronomic traits in riceSopan Zuge
 
Association mapping, GWAS, Mapping, natural population mapping
Association mapping, GWAS, Mapping, natural population mappingAssociation mapping, GWAS, Mapping, natural population mapping
Association mapping, GWAS, Mapping, natural population mappingMahesh Biradar
 
Omics in plant breeding
Omics in plant breedingOmics in plant breeding
Omics in plant breedingpoornimakn04
 
Stability parameters for comparing varieties (eberhart and russell 1966)
Stability parameters for comparing varieties (eberhart and russell 1966)Stability parameters for comparing varieties (eberhart and russell 1966)
Stability parameters for comparing varieties (eberhart and russell 1966)Dhanuja Kumar
 
Nature and components of variability
Nature and components of variabilityNature and components of variability
Nature and components of variabilitysudha2555
 
Stability analysis and G*E interactions in plants
Stability analysis and G*E interactions in plantsStability analysis and G*E interactions in plants
Stability analysis and G*E interactions in plantsRachana Bagudam
 
Parental Lines improvement by new approaches
Parental Lines improvement by new approachesParental Lines improvement by new approaches
Parental Lines improvement by new approachesBalaji Thorat
 
Genomic aided selection for crop improvement
Genomic aided selection for crop improvementGenomic aided selection for crop improvement
Genomic aided selection for crop improvementtanvic2
 
Molecular Breeding in Plants is an introduction to the fundamental techniques...
Molecular Breeding in Plants is an introduction to the fundamental techniques...Molecular Breeding in Plants is an introduction to the fundamental techniques...
Molecular Breeding in Plants is an introduction to the fundamental techniques...UNIVERSITI MALAYSIA SABAH
 
1 gpb 621 quantitative genetics introduction
1 gpb 621 quantitative genetics   introduction1 gpb 621 quantitative genetics   introduction
1 gpb 621 quantitative genetics introductionSaravananK153
 
Recent approaches in quantitative genetics
Recent approaches in  quantitative geneticsRecent approaches in  quantitative genetics
Recent approaches in quantitative geneticsAlex Harley
 
Molecular Marker-assisted Breeding in Rice
Molecular Marker-assisted Breeding in RiceMolecular Marker-assisted Breeding in Rice
Molecular Marker-assisted Breeding in RiceFOODCROPS
 
Comparative genomics
Comparative genomicsComparative genomics
Comparative genomicsAmol Kunde
 
Omics for crop improvement (new)
Omics for crop improvement (new)Omics for crop improvement (new)
Omics for crop improvement (new)Gokul Dhana
 
Correlation and Path analysis in breeding experiments
Correlation and Path analysis in breeding experimentsCorrelation and Path analysis in breeding experiments
Correlation and Path analysis in breeding experimentsankit dhillon
 
Concepts of Correlation and Path Analysis
Concepts of Correlation and Path AnalysisConcepts of Correlation and Path Analysis
Concepts of Correlation and Path AnalysisGauravrajsinh Vaghela
 

Mais procurados (20)

Whole Genome Selection
Whole Genome SelectionWhole Genome Selection
Whole Genome Selection
 
Introduction to association mapping and tutorial using tassel
Introduction to association mapping and tutorial using tasselIntroduction to association mapping and tutorial using tassel
Introduction to association mapping and tutorial using tassel
 
Association mapping for improvement of agronomic traits in rice
Association mapping  for improvement of agronomic traits in riceAssociation mapping  for improvement of agronomic traits in rice
Association mapping for improvement of agronomic traits in rice
 
Association mapping, GWAS, Mapping, natural population mapping
Association mapping, GWAS, Mapping, natural population mappingAssociation mapping, GWAS, Mapping, natural population mapping
Association mapping, GWAS, Mapping, natural population mapping
 
Omics in plant breeding
Omics in plant breedingOmics in plant breeding
Omics in plant breeding
 
Stability parameters for comparing varieties (eberhart and russell 1966)
Stability parameters for comparing varieties (eberhart and russell 1966)Stability parameters for comparing varieties (eberhart and russell 1966)
Stability parameters for comparing varieties (eberhart and russell 1966)
 
D-Square statistic
D-Square statisticD-Square statistic
D-Square statistic
 
Mating designs..
Mating designs..Mating designs..
Mating designs..
 
Nature and components of variability
Nature and components of variabilityNature and components of variability
Nature and components of variability
 
Stability analysis and G*E interactions in plants
Stability analysis and G*E interactions in plantsStability analysis and G*E interactions in plants
Stability analysis and G*E interactions in plants
 
Parental Lines improvement by new approaches
Parental Lines improvement by new approachesParental Lines improvement by new approaches
Parental Lines improvement by new approaches
 
Genomic aided selection for crop improvement
Genomic aided selection for crop improvementGenomic aided selection for crop improvement
Genomic aided selection for crop improvement
 
Molecular Breeding in Plants is an introduction to the fundamental techniques...
Molecular Breeding in Plants is an introduction to the fundamental techniques...Molecular Breeding in Plants is an introduction to the fundamental techniques...
Molecular Breeding in Plants is an introduction to the fundamental techniques...
 
1 gpb 621 quantitative genetics introduction
1 gpb 621 quantitative genetics   introduction1 gpb 621 quantitative genetics   introduction
1 gpb 621 quantitative genetics introduction
 
Recent approaches in quantitative genetics
Recent approaches in  quantitative geneticsRecent approaches in  quantitative genetics
Recent approaches in quantitative genetics
 
Molecular Marker-assisted Breeding in Rice
Molecular Marker-assisted Breeding in RiceMolecular Marker-assisted Breeding in Rice
Molecular Marker-assisted Breeding in Rice
 
Comparative genomics
Comparative genomicsComparative genomics
Comparative genomics
 
Omics for crop improvement (new)
Omics for crop improvement (new)Omics for crop improvement (new)
Omics for crop improvement (new)
 
Correlation and Path analysis in breeding experiments
Correlation and Path analysis in breeding experimentsCorrelation and Path analysis in breeding experiments
Correlation and Path analysis in breeding experiments
 
Concepts of Correlation and Path Analysis
Concepts of Correlation and Path AnalysisConcepts of Correlation and Path Analysis
Concepts of Correlation and Path Analysis
 

Destaque

Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...Avjinder (Avi) Kaler
 
SAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsSAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsAvjinder (Avi) Kaler
 
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...Avjinder (Avi) Kaler
 
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypesGenome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypesAvjinder (Avi) Kaler
 
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...Avjinder (Avi) Kaler
 
SAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsSAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsAvjinder (Avi) Kaler
 
Seed rate calculation for experiment
Seed rate calculation for experimentSeed rate calculation for experiment
Seed rate calculation for experimentAvjinder (Avi) Kaler
 
R code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder KalerR code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder KalerAvjinder (Avi) Kaler
 

Destaque (11)

Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...
 
R code for data manipulation
R code for data manipulationR code for data manipulation
R code for data manipulation
 
SAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsSAS and R Code for Basic Statistics
SAS and R Code for Basic Statistics
 
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
 
R code for data manipulation
R code for data manipulationR code for data manipulation
R code for data manipulation
 
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypesGenome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
 
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
 
SAS and R Code for Basic Statistics
SAS and R Code for Basic StatisticsSAS and R Code for Basic Statistics
SAS and R Code for Basic Statistics
 
Seed rate calculation for experiment
Seed rate calculation for experimentSeed rate calculation for experiment
Seed rate calculation for experiment
 
R Code for EM Algorithm
R Code for EM AlgorithmR Code for EM Algorithm
R Code for EM Algorithm
 
R code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder KalerR code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder Kaler
 

Semelhante a Genomic Selection with Bayesian Generalized Linear Regression model using R

1st KeyStone Summer School - Hackathon Challenge
1st KeyStone Summer School - Hackathon Challenge1st KeyStone Summer School - Hackathon Challenge
1st KeyStone Summer School - Hackathon ChallengeJoel Azzopardi
 
Working with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfWorking with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfadvancesystem
 
Biomart Update
Biomart UpdateBiomart Update
Biomart Updatebosc
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.docbutest
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.docbutest
 
IRJET- Sentiment Analysis of Election Result based on Twitter Data using R
IRJET- Sentiment Analysis of Election Result based on Twitter Data using RIRJET- Sentiment Analysis of Election Result based on Twitter Data using R
IRJET- Sentiment Analysis of Election Result based on Twitter Data using RIRJET Journal
 
Bio-protocol4446.GO_KEGG_RICE.pdf
Bio-protocol4446.GO_KEGG_RICE.pdfBio-protocol4446.GO_KEGG_RICE.pdf
Bio-protocol4446.GO_KEGG_RICE.pdfssuserb500f8
 
Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...methodsecolevol
 
Ggplot2 work
Ggplot2 workGgplot2 work
Ggplot2 workARUN DN
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSOUMIQUE AHAMED
 
Through the firewall with miniCRAN
Through the firewall with miniCRANThrough the firewall with miniCRAN
Through the firewall with miniCRANRevolution Analytics
 
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...Paul Richards
 
Cool Informatics Tools and Services for Biomedical Research
Cool Informatics Tools and Services for Biomedical ResearchCool Informatics Tools and Services for Biomedical Research
Cool Informatics Tools and Services for Biomedical ResearchDavid Ruau
 
Paper-Allstate-Claim-Severity
Paper-Allstate-Claim-SeverityPaper-Allstate-Claim-Severity
Paper-Allstate-Claim-SeverityGon-soo Moon
 

Semelhante a Genomic Selection with Bayesian Generalized Linear Regression model using R (20)

PheWAS-package.pdf
PheWAS-package.pdfPheWAS-package.pdf
PheWAS-package.pdf
 
1st KeyStone Summer School - Hackathon Challenge
1st KeyStone Summer School - Hackathon Challenge1st KeyStone Summer School - Hackathon Challenge
1st KeyStone Summer School - Hackathon Challenge
 
Working with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfWorking with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdf
 
Biomart Update
Biomart UpdateBiomart Update
Biomart Update
 
I0704047054
I0704047054I0704047054
I0704047054
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
 
cs348-06-lab3.doc
cs348-06-lab3.doccs348-06-lab3.doc
cs348-06-lab3.doc
 
IRJET- Sentiment Analysis of Election Result based on Twitter Data using R
IRJET- Sentiment Analysis of Election Result based on Twitter Data using RIRJET- Sentiment Analysis of Election Result based on Twitter Data using R
IRJET- Sentiment Analysis of Election Result based on Twitter Data using R
 
Bio-protocol4446.GO_KEGG_RICE.pdf
Bio-protocol4446.GO_KEGG_RICE.pdfBio-protocol4446.GO_KEGG_RICE.pdf
Bio-protocol4446.GO_KEGG_RICE.pdf
 
Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...Accounting for uncertainty in species delineation during the analysis of envi...
Accounting for uncertainty in species delineation during the analysis of envi...
 
Ggplot2 work
Ggplot2 workGgplot2 work
Ggplot2 work
 
R Introduction
R IntroductionR Introduction
R Introduction
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
 
Through the firewall with miniCRAN
Through the firewall with miniCRANThrough the firewall with miniCRAN
Through the firewall with miniCRAN
 
The steps of R code Master.pptx
The steps of R code Master.pptxThe steps of R code Master.pptx
The steps of R code Master.pptx
 
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...
Preparing and submitting a package to CRAN - June Sanderson, Sheffield R User...
 
Cool Informatics Tools and Services for Biomedical Research
Cool Informatics Tools and Services for Biomedical ResearchCool Informatics Tools and Services for Biomedical Research
Cool Informatics Tools and Services for Biomedical Research
 
Bio Linux
Bio LinuxBio Linux
Bio Linux
 
Paper-Allstate-Claim-Severity
Paper-Allstate-Claim-SeverityPaper-Allstate-Claim-Severity
Paper-Allstate-Claim-Severity
 
Google's BigTable
Google's BigTableGoogle's BigTable
Google's BigTable
 

Mais de Avjinder (Avi) Kaler

Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerUnleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerAvjinder (Avi) Kaler
 
Tutorial for Deep Learning Project with Keras
Tutorial for Deep Learning Project  with KerasTutorial for Deep Learning Project  with Keras
Tutorial for Deep Learning Project with KerasAvjinder (Avi) Kaler
 
Tutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine LearningTutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine LearningAvjinder (Avi) Kaler
 
Python Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdfPython Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdfAvjinder (Avi) Kaler
 
Sql tutorial for select, where, order by, null, insert functions
Sql tutorial for select, where, order by, null, insert functionsSql tutorial for select, where, order by, null, insert functions
Sql tutorial for select, where, order by, null, insert functionsAvjinder (Avi) Kaler
 
Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...Avjinder (Avi) Kaler
 
Normal and standard normal distribution
Normal and standard normal distributionNormal and standard normal distribution
Normal and standard normal distributionAvjinder (Avi) Kaler
 

Mais de Avjinder (Avi) Kaler (19)

Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerUnleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
 
Tutorial for Deep Learning Project with Keras
Tutorial for Deep Learning Project  with KerasTutorial for Deep Learning Project  with Keras
Tutorial for Deep Learning Project with Keras
 
Tutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine LearningTutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine Learning
 
Python Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdfPython Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdf
 
Sql tutorial for select, where, order by, null, insert functions
Sql tutorial for select, where, order by, null, insert functionsSql tutorial for select, where, order by, null, insert functions
Sql tutorial for select, where, order by, null, insert functions
 
Kaler et al 2018 euphytica
Kaler et al 2018 euphyticaKaler et al 2018 euphytica
Kaler et al 2018 euphytica
 
Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...
 
Genome wide association mapping
Genome wide association mappingGenome wide association mapping
Genome wide association mapping
 
Population genetics
Population geneticsPopulation genetics
Population genetics
 
Quantitative genetics
Quantitative geneticsQuantitative genetics
Quantitative genetics
 
Abiotic stresses in plant
Abiotic stresses in plantAbiotic stresses in plant
Abiotic stresses in plant
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Correlation in Statistics
Correlation in StatisticsCorrelation in Statistics
Correlation in Statistics
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)
 
Population and sample mean
Population and sample meanPopulation and sample mean
Population and sample mean
 
Descriptive statistics and graphs
Descriptive statistics and graphsDescriptive statistics and graphs
Descriptive statistics and graphs
 
Hypothesis and Test
Hypothesis and TestHypothesis and Test
Hypothesis and Test
 
Normal and standard normal distribution
Normal and standard normal distributionNormal and standard normal distribution
Normal and standard normal distribution
 

Último

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 

Último (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 

Genomic Selection with Bayesian Generalized Linear Regression model using R

  • 1. Genomic Selection with Bayesian Generalized Linear Regression model using R by Avjinder Kaler Avjinder Singh Kaler University of Arkansas, Fayetteville, AR avjindersingh@gmail.com This tutorial is used to perform a genomic prediction. Anyone can use and learn about genomic prediction using BGLR R package and if you have question related to genomic prediction and other models, you can contact me using above email. Download and Install software. 1. R program https://cran.r-project.org/bin/windows/base/ 2. R Studio https://www.rstudio.com/products/rstudio/download/
  • 2. Steps in Genomic Prediction Step 1: Data Formatting Format the genotype and phenotype data files needed for BGLR package. Three types of files are required; genotype file in numeric form, phenotype file, and kinship matrix. Format your files like this. Genotype file: Markers in Columns and Lines in Rows Kinship Matrix file: You can third party software to estimate kinship matrix like TASSEL, GAPIT. Need Line ID in Columns, not in Rows.
  • 3. Phenotype file: You can put 10/20/30 % data missing to predict those missing values and check accuracy of model by checking correlation between actual phenotypic value and predictive values. High correlation means high accuracy. First Column is Line ID and Second column is Trait. You can have more traits in rest of columns. Step 2: R code for Genomic Prediction install.packages("bigmemory") install.packages("biganalytics") install.packages(“BGLR”) library("bigmemory") library("biganalytics") library(“BGLR”)
  • 4. Step 3: Set working directory and import data Set your working directory where you have your data files. # Read all files #Phenotype file loading Y <- read.table("AAE.txt", head = TRUE) y<-Y[,2] #Genotype file loading X <- read.table("g3.txt", head = TRUE) #Kinship matrix file loading A<- read.table("k3.txt", head = TRUE) # Check the dimensions for all files, need to be same dimension for Lines dim(y) dim(X) dim(A) #Computing the genomic relationship matrix X<-scale(X,center=TRUE,scale=TRUE) G<-tcrossprod(X)/ncol(X) #Computing the eigen-value decomposition of G EVD <-eigen(G) #Setting the linear predictor ETA<-list(list(K=A, model='RKHS'), list(V=EVD$vectors,d=EVD$values, model='RKHS') ) #Fitting the model fm<-BGLR(y=y, ETA=ETA, nIter=12000, burnIn=2000,saveAt='PGBLUP_')
  • 5. save(fm,file='fmPG_BLUP.rda') #Predictions yHat<-fm$yHat tmp<-range(c(y,yHat)) plot(yHat~y,xlab='Observed',ylab='Predicted',col=2, xlim=tmp,ylim=tmp); abline(a=0,b=1,col=4,lwd=2) #Exporting your Genomic prediction values write.table(yHat, "C:/Folder/file. xt", sep="t") #Godness of fit and related statistics fm$fit fm$varE # compare to var(y) #Variance components associated with the genomic and pedigree fm$ETA[[1]]$varU fm$ETA[[2]]$varU # Residual variance varE<-scan('PGBLUP_varE.dat') plot(varE,type='o',col=2,cex=.5); Note: # Check results in your folder and correlate predictive values with actual phenotypic values, see how accurate is your model. For other Tutorials, you can visit here: http://www.slideshare.net/AvjinderSingh