Skip to content

Commit dce8683

Browse files
committed
Organization.
1 parent f1d9389 commit dce8683

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

Session5/serenamanara_labexercises/Distance.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ output: html_document
77

88

99
```{r}
10-
source("https://bioconductor.org/biocLite.R")
11-
biocLite()
10+
#source("https://bioconductor.org/biocLite.R")
11+
#biocLite()
1212
library(devtools)
1313
biocLite("genomicsclass/tissuesGeneExpression")
1414
library(tissuesGeneExpression)

projects/getTCGAdata.R

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if( !require(RTCGAToolbox) ){
2-
library(devtools)
3-
install_github("LiNk-NY/RTCGAToolbox")
4-
library(RTCGAToolbox)
2+
library(BiocInstaller)
3+
biocLite("LiNk-NY/RTCGAToolbox")
4+
library(RTCGAToolbox)
55
}
66

77
all.dates <- getFirehoseRunningDates()
@@ -33,6 +33,20 @@ for (i in 1:length(tcga.res)) {
3333
eset = try(extract(tcga.res[[i]], "RNAseq2_Gene_Norm"))
3434
if (is(eset, "try-error"))
3535
next
36-
eset = eset[, substr(sampleNames(eset), 14, 15) %in% c("01", "03", "09")]
36+
eset = eset[, as.integer(substr(sampleNames(eset), 14, 15)) %in% 1:9]
3737
saveRDS(eset, file = paste0(names(tcga.res)[i], "_RNAseq2.rds"))
3838
}
39+
40+
res <- getFirehoseData("SKCM", runDate="20151101", RNAseq2_Gene_Norm=TRUE)
41+
eset = extract(res, "RNAseq2_Gene_Norm")
42+
devtools::session_info()
43+
44+
expdat <- res@RNASeq2GeneNorm
45+
colnames(expdat) <- tolower(substr(colnames(expdat), 1, 12))
46+
clindat <- res@Clinical
47+
rownames(clindat) <- gsub(".", "-", rownames(clindat), fixed=TRUE)
48+
clindat <- clindat[rownames(clindat) %in% colnames(expdat), ]
49+
expdat <- expdat[, match(rownames(clindat), colnames(expdat))]
50+
51+
all.equal(colnames(expdat), rownames(clindat))
52+
eset <- ExpressionSet(assayData=expdat, phenoData=AnnotatedDataFrame(clindat))
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)