Created
May 22, 2012 20:42
-
-
Save ohofmann/2771492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Try to de-convolute the array relationships by looking at the SNP | |
| # probes | |
| snpProbes <- grep('rs', fData(lumiData)$TargetID) | |
| betas <- estimateBeta(lumiData) | |
| betasSNP <- exprs(betas)[snpProbes, ] | |
| labels <- paste(pData(lumiData)$Subject, | |
| pData(lumiData)$sampleID, | |
| pData(lumiData)$Tissue, | |
| sep='_') | |
| colnames(betasSNP) <- labels | |
| # Select a subet of sample for pair plot | |
| subject <- c('1', '2') | |
| subjectSamples <- pData(lumiData)$Subject %in% subject | |
| # Plot pair plot with the dots in scatter plot colored based on the color channels | |
| png('subject_1_2_SNP.png', width=1200, height=1200) | |
| pairs(betas[snpProbes, subjectSamples], | |
| main='Pair plot of M-value before normalization') | |
| dev.off() | |
| # Plot overall sample identities | |
| pheatmap(cor(betasSNP), | |
| cellheight=16, | |
| cellwidth=16, | |
| file='heatmap.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment