Skip to content

carpools.hit.overview breaks when stat.wilcox does not have genes in row names #9

@dchiu911

Description

@dchiu911

In carpools.hit.overview, when trying to extract pvalues from the wilcox analysis, if the genes are missing from the rownames, then the following will break because we are assigning numeric(0) to a column of a data frame.

df.plot$wilcox = apply(df.plot, 1, function(x) {
    return(df.wilcox[df.wilcox$genes == x["genes"], "p.value"])
})

Adding the following line just before the final return statements in stat.wilcox seems to fix the issue:

rownames(pvals) <- unique(dataset.combined$genes) # missed rownames
if (sorting) {
  return(pvals[order(pvals$p.value),])
}
else {
  return(pvals)
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions