Tutorial:From Genefiltering to Results storgae in Microarray Analysis using in R (Part II) - FARMS
0
0
Entering edit mode
7.9 years ago
majuang66 ▴ 140
# Start From Data import to Normalization in Microarray Analysis using in R (Part II) - FARMS
# biocLite ("farms")
# library (farms)
# mydata_GSE4536_farms <- qFarms(mydata_GSE4536)
# Genefiltering
INIs<-INIcalls(mydata_GSE4536_farms)

summary (INIs)
Informative probe sets:42.1%
non-informative probe sets:57.9%

# Get the results from INIs
I_data <- getI_Esets(INIs)

I_data
assyData:23,019 features, 101samples

#Save the above file
write.table(I_data,file="mydata_GSE4536_FARMS.txt",sep="\t",qoute=FALSE,row.names=TRUE,col.names=TRUE)

# Genefiltering using standard deviation
biocLite("genefilter")

library(genefilter)

# Genefilter use the format, matrix, not data.frame
# You can check your data format using class (I_data)
# I_data format is the ExpressionSet, so you convert the ExpressionSet to the matrix
I_data_1<-as.data.frame(I_data)
I_data_2<-as.matrix(I_data_1)
# transpose row to column
I_data_3<-t(I_data_3)
# Standard Deviation for row (features) more than 2
rsd <- rowSds(I_data_3)
i<-rsd>=2
summary(i)

mode - logical, FALSE-22979 genes, TRUE-41 genes, NA's - 0 genes
# Save the above file
GSE4536_qFarms_SD_filter <- I_data_3[i,]

write.table(GSE4536_qFarms_SD_filter, file="GSE4536_qFarms_SD_filter.txt",sep="\t",quote=FALSE,row.names=TRUE,col.names=TRUE)
# Standard Deviation for row (features) more than 1.5
rsd <- rowSds(I_data_3)
i_1<-rsd>=1.5

summary(i_1) 

mode - logical, FALSE-22808 genes, TRUE-212 genes, NA's - 0 genes
# Save the above file
GSE4536_qFarms_SD_filter_1 <- I_data_3[i_1,]

write.table(GSE4536_qFarms_SD_filter_1, file="GSE4536_qFarms_SD_filter_1.txt",sep="\t",quote=FALSE,row.names=TRUE,col.names=TRUE)
gene R • 2.2k views
ADD COMMENT
0
Entering edit mode

FYI, there's a "tutorial" section. I've put your code in a code block and retagged this and your other recent post as tutorials. Thanks for contributing them!

ADD REPLY

Login before adding your answer.

Traffic: 1785 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6