1 / 13

Statistical Genomics

Statistical Genomics. Lecture 2: Programming in R. Zhiwu Zhang Washington State University. Current and future needs. "By 2018, the US alone could face a shortage of 1.5 million managers and analysts with the know-how to investigate big data to make effective decisions"

zeal
Download Presentation

Statistical Genomics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Statistical Genomics Lecture 2: Programming in R Zhiwu Zhang Washington State University

  2. Current and future needs "By 2018, the US alone could face a shortage of 1.5 million managers and analysts with the know-how to investigate big data to make effective decisions" -McKinsey Global Institute, 2014 report

  3. R You Ready for R? http://www.analyticsvidhya.com/blog/2014/03/sas-vs-vs-python-tool-learn/

  4. R You Ready for R? http://www.analyticsvidhya.com/blog/2014/03/sas-vs-vs-python-tool-learn/

  5. Robert Gentleman and Ross Ihaka Start with S in 1996 Open source Open packages

  6. IF if(distribution=="norm") {addeffect=rnorm(NQTN,0,1) }else {addeffect=alpha^(1:NQTN)}

  7. Function phenoSimu=function(X,h2,alpha,NQTN,distibution,seed){ Define function here }

  8. List return(list(addeffect = addeffect, y=y, add = effect, residual = residual, QTN.position=QTN.position, SNPQ=SNPQ))

  9. Loop myNQTL=c(3,10,20,50,100,200) for(i in 1:length(myNQTL)) { myv=validation(n=n,m=m,y=myps$y,X=X,residual=myps$residual,effect=myps$add,QTN.position=myps$QTN.position,addeffect=myps$addeffect,NQTL=myNQTL[i]) print(c(i,myNQTL[i],myv$fit,myv$accuracy)) }

  10. Demonstration

  11. Highlight • File input and output • R objects • numeric vs. character • vector, matrix, and data.frame, list • myF$p • IF and Loop • Apply • Graph • Function

More Related