mildpiggy / DEP2

An r package for proteomics data Analysis, developed from DEP.
Other
18 stars 4 forks source link

Get significant protein using pvalue instead p.adj #5

Closed enriiquee closed 6 months ago

enriiquee commented 7 months ago

Hi! First of all thanks for this amazing package. It was really helpfull.

I would like to ask you if there's any way to get the significant protein using only pvalue instead of p.adj.

mildpiggy commented 7 months ago

One way is to replace the p.adj cols by p.val. Then using get_signicant to extract the significant list.

# Copy a new object
dep2 = dep
rd = rowData(dep)
#  Replace p.adj by p.val
rd[,grep("_p.adj$",colnames(rd))] = rd[,grep("_p.val$",colnames(rd))]
rowData(dep2) = rd

# Re-extracting the significant list by setting a threshold
get_signicant(dep2,thresholdmethod = "intersect", alpha = 0.001, diff = 1)
get_signicant(dep,thresholdmethod = "intersect", alpha = 0.001, diff = 1)

## If giving threshold parameters, get_signicant extracts the significant based on p.adj and diff cols.
## Else get_signicant  extract results based on significant rows