Question: function meaning(on.index <- which(filter$on == 1))
gravatar for ed_isfahani
9 weeks ago by
ed_isfahani0 wrote:


what is the meaning of this function " on.index <- which(filter$on == 1)"?

it is a part of metaRNAseq for filter data:

## Filter using Jaccard index for each study

filter <- HTSFilter(cds, plot=FALSE)
+ cds.filter <- filter$filteredData
+ on.index <- which(filter$on == 1)
+ cat("# genes passing filter", studyname, ":", dim(cds.filter)[1], "\n")
+ res <-, nrow = nrow(cds), ncol=ncol(cds)))
+ nbT <- nbinomTest(cds.filter, cond1totest, cond2totest)
+ colnames(res) <- colnames(nbT)
+ res[on.index,] <- nbT


ADD COMMENTlink modified 9 weeks ago by andrea.rau50 • written 9 weeks ago by ed_isfahani0
gravatar for andrea.rau
9 weeks ago by
INRA / Jouy en Josas, France
andrea.rau50 wrote:

In this code, the HTSFilter package is being used to filter the data (contained in the cds object) to remove genes with relatively low counts across samples using a data-driven filtering threshold. The HTSFilter function returns both the filtered data themselves (contained in filter$filteredData, which will have a number of rows less than or equal to the number of rows in cds) as well as a binary vector (contained in filter$on) of the same length as the number of rows in cds indicating whether a gene was retained after the filtering (1) or not (0). So on.index will just provide the indices of genes retained after filtering -- as you can see, above it is used to fill in the appropriate rows of the res data.frame with the results from the DESeq function nbinomTest.

ADD COMMENTlink written 9 weeks ago by andrea.rau50
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 347 users visited in the last hour