ramiromagno / gwasrapidd

gwasrapidd: an R package to query, download and wrangle GWAS Catalog data
https://rmagno.eu/gwasrapidd/
Other
91 stars 14 forks source link

Error in as.vector(x) : no method for coercing this S4 class to a vector #7

Open ramiromagno opened 4 years ago

ramiromagno commented 4 years ago

Note to self:

library(tidyverse)
library(gwasrapidd)
library(GenomicRanges)
gwasrapidd::get_associations(variant_id = "rs1800629", efo_trait = "cancer")

works seemingly fine.

On the other hand,

library(tidyverse)
library(GenomicRanges)
library(gwasrapidd)
gwasrapidd::get_associations(variant_id = "rs1800629", efo_trait = "cancer")

result in this error:

> gwasrapidd::get_associations(variant_id = "rs1800629", efo_trait = "cancer")
Error in as.vector(x) : no method for coercing this S4 class to a vector

Which is, probably, a symptom of S4 dispatch using the wrong generic.

See this discussion here: https://r.789695.n4.nabble.com/Conflicting-definitions-for-function-redefined-as-S4-generics-td4687570.html.