OK. That's almost there. When I run that it gives me lots of output to the console but seems to write it as an xml document e.g.
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE Query><Query virtualSchemaName = 'default' uniqueRows = '1' count = '0' datasetConfigVersion = '0.6' header='0' requestid= 'biomaRt'> <Dataset name = 'hsapiens_gene_ensembl'><Attribute name = 'entrezgene'/><Attribute name = 'chromosome_name'/><Attribute name = 'transcript_start'/><Attribute name = 'transcript_end'/><Filter name = 'chromosome_name' value = 'chr1,chr1,chr1,chr1,chr1,chr1
I thought the output should be a dataframe but when I do .....
mylovelylist = getBM(
attributes=c('entrezgene', 'chromosome_name', 'transcript_start', 'transcript_end'),
filters = c('chromosome_name', 'start', 'end' ),
values = with(BED.df, list(as.character(seqnames), start, end)),
mart = ensembl,
verbose=T
)
I get no error, but when I try to get the output from mylovelylist I get
[1] entrezgene chromosome_name transcript_start transcript_end
<0 rows> (or 0-length row.names).
So how do I convert this xml output to a dataframe? How come it doesn't output as a dataframe by default. I tried adding output= "data.frame" and it just gives my the error: (output = "data.frame")