I am having problems when executing the function select.
ensembl_connection = biomaRt::useEnsembl("snp", dataset = "hsapiens_snp")
ensembl_phenotypes = biomaRt::searchFilterValues(mart = ensembl_connection, filter = "phenotype_description", pattern = "migraine")
phenotype_expression = paste(ensembl_phenotypes, collapse="|")
retrieve_columns = c('refsnp_id', 'chr_name', 'phenotype_description', 'associated_variant_risk_allele', 'allele', 'chrom_start', 'chrom_end', 'associated_gene', 'polyphen_prediction', 'sift_prediction', 'synonym_name')
k<-biomaRt::keys(ensembl_connection, keytype="phenotype_description", pattern = phenotype_expression)
result <- biomaRt::select(ensembl_connection, keys=k, columns=retrieve_columns, keytype='phenotype_description')
Output
<simpleError in UseMethod("filter_"): no applicable method for 'filter_' applied to an object of class "c('tbl_SQLiteConnection', 'tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')">
R session
R version 3.6.3 (2020-02-29) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale: [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C LC_TIME=Spanish_Spain.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.6.3 ulises_0.2.4 tools_3.6.3 bioPROS4Ulises_0.2.9
Thanks. I had to update R and biomaRt. Everything seems to work fine now