View source: R/format_BM_from_XML.R
format_BM_from_XML | R Documentation |
Take a text object returned from the XML formatted output at https://parasite.wormbase.org/biomart and return a function call to biomaRt::getBM with the filter names, values, and requested output fields.
format_BM_from_XML(xmltext, printCode = TRUE)
xmltext |
XML text copied from https://parasite.wormbase.org/biomart |
printCode |
TRUE/FALSE Print the R code to the console in addition to returning the call. |
A 'call' object that can be run with runWithMart().
getBM
, runWithMart
# A query that extracts all C. elegans long noncoding RNAs. query = format_BM_from_XML('<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Query> <Query virtualSchemaName = "parasite_mart" formatter = "TSV" header = "0" uniqueRows = "0" count = "" datasetConfigVersion = "0.6" > <Dataset name = "wbps_gene" interface = "default" > <Filter name = "biotype" value = "lincRNA"/> <Filter name = "species_id_1010" value = "caelegprjna13758"/> <Attribute name = "wbps_gene_id" /> </Dataset> </Query>') mart = getParamart() lincs = runWithMart(query, mart) head(lincs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.