Noi/NOTES/2012-5-12: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Noi
No edit summary
>Noi
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
* [[http://genome-tech.ucsd.edu/LabNotes/index.php/noi:DMR220k_LabNotes '''Link to calendar''']]
* [[http://genome-tech.ucsd.edu/LabNotes/index.php/noi:DMR220k_LabNotes '''Link to calendar''']]
== Regression analysis of UCLA SZ data, applying LDA function ==
== Regression analysis of UCLA SZ data, applying LDA function ==
* Continued from: http://genome-tech.ucsd.edu/LabNotes/index.php/Noi/NOTES/2012-4-30
* Links
* Links
** http://stat.ethz.ch/education/semesters/ss2012/ams/Rscript/scriptV6.1.R
** http://stat.ethz.ch/education/semesters/ss2012/ams/Rscript/scriptV6.1.R
Line 6: Line 7:
* I repeated regression analysis again by changing some criteria to select the candidate significant CpG sites, based on FDR or with raw p-value cutoff. For regression on status, I will not apply multiple test correction since I didn't get any significant signals. However with minimum t statistic of 2.5 (p-value ~0.014) from the previous analysis I could separate out the normal and affected samples. Dr. Zhang suggested that this should be fine. In addition, I will change the color of the control samples in PCA analysis plots. LDA will be used then the number of samples in the two groups classified by the line will be counted.
* I repeated regression analysis again by changing some criteria to select the candidate significant CpG sites, based on FDR or with raw p-value cutoff. For regression on status, I will not apply multiple test correction since I didn't get any significant signals. However with minimum t statistic of 2.5 (p-value ~0.014) from the previous analysis I could separate out the normal and affected samples. Dr. Zhang suggested that this should be fine. In addition, I will change the color of the control samples in PCA analysis plots. LDA will be used then the number of samples in the two groups classified by the line will be counted.
=== PCA analysis, plot the data in scatter plot ===
=== PCA analysis, plot the data in scatter plot ===
* [[Media:plot_age_10FDR-2.txt| plot_age_10FDR-2.R]], [[Media:plot_sex_10FDR-2.txt| plot_sex_10FDR-2.R]], [[Media:plot_status_p0.015-2.txt| plot_status_p0.015-2.R]]
'''Scripts'''
[[File:UCLA-GA_age_10FDR_pcaplot1.png| 600px]]  [[File:UCLA-GA_age_10FDR_pcaplot2.png| 600px]]  [[File:UCLA-GA_sex_10FDR_pcaplot1.png]]  [[File:UCLA-GA_sex_10FDR_pcaplot2.png]]  [[File:UCLA-GA_status_pval0.015_pcaplot1.png]]  [[File:UCLA-GA_status_pval0.015_pcaplot2.png]]
[[Media:plot_age_10FDR-2.txt| plot_age_10FDR-2.R]]  
[[Media:plot_sex_10FDR-2.txt| plot_sex_10FDR-2.R]]
[[Media:plot_status_p0.015-2.txt| plot_status_p0.015-2.R]]
'''Plots'''
[[Media:UCLA-GA_age_10FDR_pcaplot1.pdf | UCLA-GA_age_10FDR_pcaplot1]]
  [[Media:UCLA-GA_age_10FDR_pcaplot2.pdf | UCLA-GA_age_10FDR_pcaplot2]]
  [[Media:UCLA-GA_sex_10FDR_pcaplot1.pdf | UCLA-GA_sex_10FDR_pcaplot1]]
  [[Media:UCLA-GA_sex_10FDR_pcaplot2.pdf | UCLA-GA_sex_10FDR_pcaplot2]]
  [[Media:UCLA-GA_status_pval0.015_pcaplot1.pdf | UCLA-GA_status_pval0.015_pcaplot1]]
  [[Media:UCLA-GA_status_pval0.015_pcaplot2.pdf | UCLA-GA_status_pval0.015_pcaplot2]]
* I generate PC score (PC1-PC3). The reason is that the three components seem to contribute to largest variance and the slope change in the scree plot occurs at component 3 (age)  as the picture below. Actually, I should try to analyze with different number of component and see if the classification change or not. Note the plot of status seem to be different from age because the slope change occur at component4 or 5.  
* I generate PC score (PC1-PC3). The reason is that the three components seem to contribute to largest variance and the slope change in the scree plot occurs at component 3 (age)  as the picture below. Actually, I should try to analyze with different number of component and see if the classification change or not. Note the plot of status seem to be different from age because the slope change occur at component4 or 5.  
[[File:age_pca_var.png| 200px]]
[[File:age_pca_var.png| 200px]]
Line 25: Line 35:
  3  6.3925767  0.5246122  0.9405213 young adult
  3  6.3925767  0.5246122  0.9405213 young adult
  4  6.0525615  2.0565664  4.4626373 young adult
  4  6.0525615  2.0565664  4.4626373 young adult
* [[Media:lda_age_10FDR.txt| lda_age_10FDR.R]], [[Media:lda_sex_10FDR.txt| lda_sex_10FDR.R]], [[Media:lda_status_10FDR.txt| lda_status_10FDR.R]]
'''Scripts'''
[[Media:lda_age_10FDR.txt| lda_age_10FDR.R]]  
[[Media:lda_sex_10FDR.txt| lda_sex_10FDR.R]]
[[Media:lda_status_10FDR.txt| lda_status_10FDR.R]]
'''Plots'''
[[Media:plot_LD1_age_10FDR.pdf | plot_LD1_age_10FDR]]
[[Media:plot_LD1_sex_10FDR.pdf | plot_LD1_sex_10FDR]]
[[Media:plot_LD1_status_p.015.pdf | plot_LD1_status_p.015]]

Latest revision as of 05:39, 14 May 2012

Regression analysis of UCLA SZ data, applying LDA function[edit]

PCA analysis, plot the data in scatter plot[edit]

Scripts 
 plot_age_10FDR-2.R 
 plot_sex_10FDR-2.R
 plot_status_p0.015-2.R
Plots
 UCLA-GA_age_10FDR_pcaplot1
 UCLA-GA_age_10FDR_pcaplot2
 UCLA-GA_sex_10FDR_pcaplot1
 UCLA-GA_sex_10FDR_pcaplot2
 UCLA-GA_status_pval0.015_pcaplot1
 UCLA-GA_status_pval0.015_pcaplot2
  • I generate PC score (PC1-PC3). The reason is that the three components seem to contribute to largest variance and the slope change in the scree plot occurs at component 3 (age) as the picture below. Actually, I should try to analyze with different number of component and see if the classification change or not. Note the plot of status seem to be different from age because the slope change occur at component4 or 5.

File:Age pca var.png

A=read.table("10%FDR_UCLA-GA_age_methylMatrix.txt",header=TRUE,row.names=1)
B=na.omit(A)
B$STDEV=NULL
B$min_RD=NULL
B$mean_RD=NULL
pca1 <- prcomp(t(B), scale=TRUE)
summary(pca1)
v<-data.frame(pca1$x[,1],pca1$x[,2],pca1$x[,3])
names(v)<-c("PC1","PC2","PC3")
  • Then add the labels (age, sex or disease status) to each sample in the last column and used this data as the input for LDA
          V1         V2         V3          V4
1  0.8641308  3.1103773 -1.2768520       adult
2 -7.3738694 -3.7825118  2.4297650       adult
3  6.3925767  0.5246122  0.9405213 young adult
4  6.0525615  2.0565664  4.4626373 young adult
Scripts
 lda_age_10FDR.R 
 lda_sex_10FDR.R
 lda_status_10FDR.R
Plots
 plot_LD1_age_10FDR
 plot_LD1_sex_10FDR
 plot_LD1_status_p.015