Gene filtering returns NULL dimensions
0
0
Entering edit mode
3.0 years ago
purestdata • 0

Hi, I'm using R and bioconductor in order to conduct some gene analysis but I'm having trouble at filtering genes. I'm trying to create a dataset called small.eset by filtering my dataset but small.eset returns NULL dimensions. I was wondering if I'm doing some obvious mistake?

The dataset I'm using is #redacted and I'm sharing my condensed code (without plots and quality checks).

# Library and Data Imports ------------------------------------------------
library(affy)
library(affyPLM)
library(simpleaffy)
library(limma)
library(RColorBrewer)
library(genefilter) 
setwd("/Users/Documents/R Scripts/biostat_geo/data")
Data <- ReadAffy() #read all CEL files in working directory

# log2 transformation -----------------------------------------------------

ex <- exprs(Data)
qx <- as.numeric(quantile(ex, c(0., 0.25, 0.5, 0.75, 0.99, 1.0), na.rm=T))
LogC <- (qx[5] > 100) ||
  (qx[6]-qx[1] > 50 && qx[2] > 0)
if (LogC) { ex[which(ex <= 0)] <- NaN
exprs(Data) <- log2(ex) }

#background correction

eset <- expresso(Data, bgcorrect.method = "mas",
                 normalize.method = "loess", 
                 pmcorrect.method = "pmonly",
                 summary.method = "mas")

# filtering

esetunlog <- 2^exprs(eset)
ffun <- filterfun(pOverA(0.20,10))
t.fil <- genefilter(esetunlog,ffun)
small.eset <- (log2(esetunlog[t.fil,]))
R filtering affymetrix genefilter CEL • 799 views
ADD COMMENT
0
Entering edit mode

Try debugging each filter step by running head for each result variable.

head(esetunlog)
head(ffun)
head(t.fil)
ADD REPLY
0
Entering edit mode
ffun <- filterfun(pOverA(p=0.20,A=100))

If I use 5 instead of 100 for A argument in pOverA;

ffun <- filterfun(pOverA(p=0.20,A=5)) 

it starts to populate numbers in the small.eset.

I'm reading the help page for pOverA and it states A is the number to be exceeded for gene selection. What is the proper way of defining this number?

In addition to that, it seems like I am able to produce a small dataset if I use nsFilter(). Are these two functions interchangeable?

Thanks for your time in advance!

ADD REPLY
0
Entering edit mode

I'm not familiar with the package you're using. I was merely guiding you on the debugging process. Someone familiar with the package might be able to help you with the specifics.

ADD REPLY

Login before adding your answer.

Traffic: 2394 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