Skip to content

Match.call prevents the use of variables #10

@reedacartwright

Description

@reedacartwright

Using match.call in functions doesn't evaluate variables so doing something like this fails:

target_taxon="primates"
homology_id("ENSGblah",target_taxon=target_taxon)

However, using ... to pass optional parameters to sub functions works:

ensembl_homology_id = function (id, return_format, ...) {
    end <- paste("homology/id", id, sep = "/")
    header = rensembl:::ensembl_header(return_format, c("json", "orthoxml", "xml"))
    q <- rensembl:::ensembl_body(list(NA,...), c("id","return_format"))
    req <- rensembl:::ensembl_GET(end, header, query = q)
    httr::content(req)
}

With this implemented, ensembl_body can be improved so you don't need an NA in the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions