This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to annotate positions using biomaRt R package?

I have some genome positions and I want to annotate these positions (find Ensembl gene ID, the features like exonic, intronic, ...) using biomaRt R package.

part of my data

chr start stop strand
chr10 100572320 100572373 - 
chr10 100572649 100572658 + 
r biomart

What do these regions represent? Doing what you suggest with biomaRt is possible, but it is going to be very tedious. Perhaps there is another tool that is a better fit, but we need to know a little more detail before suggesting.

There Polyadenylation sites and I want to know if they are intronic (annotate for introns)

Does this have to be done using biomaRt as part of a pipeline? If not you could look into the ChIPseeker package for straight-forward annotation.

No, just I need annotation base on Ensembl

This package need specific input format that I don't have

The input is a bedfile that can be read in by using the readPeakFile function, followed by the annotatePeak function. That should give you what you're looking for.

The example you've shown is basically a bedfile, so I'm not sure what the problem is.

Thanks, I face to this error

Error in file.exists(peak) : invalid 'file' argument

1 answer

Something like:

gene_list <-getBM(
              attributes=c(
                     'ensembl_gene_id',
                     'ensembl_transcript_id'
                     ),
              filters='chromosomal_region',
              values="10:100572320:100572373:-1,10:100572649:100572658:1",
              mart = ensembl
              )

Thanks but for find intronic or exonic which attributes should be used?

biomaRt can't work at that level of detail.

Log in to answer this question.