# print the table (without row numbers and quotes)
write.table(studies,file="cancer_studies.txt",sep="\t",row.names=F,quo
te=F)
# select a cancer study by ID (Column 1 in studies gives you all the IDs)
mycancerstudy = "prad_tcga"
description of all case lists, you’re selecting here the first element of the first column)
mycaselist = getCaseLists(mycgds, mycancerstudy)[1,1]
# tables/matrices are accessed by row and column indices in square brackets
# matrix[2,1] element in the second row and first column
# matrix[1,] all elements in the first row
# matrix[,4] all elements in the fourth column
# matrix[1:3,4:6] elements between row 1 to 3 and columns 4 to 6
# matrix[c(1,3),c(4,6)] elements in row 1 and 3 and columns 4 and 6
# retrieve all genetic profiles for a given study
allProfiles = getGeneticProfiles(mycgds, mycancerstudy)
# select a genetic profile (getGeneticProfiles returns you a table with all genetic profiles
available for your selected study)
mygeneticprofile = "prad_tcga_gistic"
# retrieve the selected genetic profile for input genes
dataCNA = getProfileData(mycgds, c('BRCA1','MYC'), mygeneticprofile,
mycaselist)
# a vector is specified in R by the command c() with elements separated by commas
# vector = c(a,b,c)
# vector[2] = b