missmethyl gsameth outputs matrix instead of dataframe
0
0
Entering edit mode
owen.whitley ▴ 10
@owenwhitley-15693
Last seen 5.7 years ago

Hi,

When I use missMethyl's gsameth function, it runs without error but outputs a matrix instead of a dataframe.

Here's the example:

## upreg_site = upregulated sites from an EPIC array
## all_sites = all sites captured by array
## geneset_collection = named list of format geneset_collection[['pathway1']] = c('entrezID1', 'entrezID2', ...), where entrezID is an entrezID
gst_pos <- gsameth(sig.cpg = upreg_sites, all.cpg = all_sites,
    collection = geneset_collection, array.type = "EPIC")

gst_pos <- gst_pos[gst_pos$FDR < pathway_FDR, ]


Error in gst_pos$FDR : $ operator is invalid for atomic vectors
In addition: Warning message:
In alias2SymbolTable(flat$symbol) :
  Multiple symbols ignored for one or more aliases

 

When I look at the output in Rstudio's debugger, this is what I get:

head(gst_pos)
            N DE      P.DE       FDR
GO:0000002 28 15 0.9341043 1.0000000
GO:0000018 73 45 0.7884481 1.0000000
GO:0000027 29 16 0.8355419 1.0000000
GO:0000028 19  7 0.9662549 1.0000000
GO:0000030 25 12 0.9147557 1.0000000
GO:0000038 30 19 0.5327862 0.9415035

class(gst_pos)
[1] "matrix"

While the output essentially looks as advertised by the vignette in the documentation, (?gsameth), it seems that the class returned is not as advertised (i.e. not a dataframe). Should gsameth return matrices by default given the current state of the source code, and if so, will there be some editing needed for the function to match the output specified in the vignette?

Thanks!

 

 

missmethyl gsameth • 1.0k views
ADD COMMENT

Login before adding your answer.

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