After trying to download sequences through biomaRt using the getSequence()
query with MGI IDs with some problems of duplicate IDs (please see: biomaRt duplicates some unique IDs during getSequence() query but not others) for additional information), I am trying a different approach where I strictly use genomic coordinates of the sequences I would like to download and ultimately export them in FASTA format for motif analyses.
However, I am now running into issues where I can not use seqType=genomic, even though the biomaRt package (http://www.bioconductor.org/packages/release/bioc/manuals/biomaRt/man/biomaRt.pdf) reference guide lists it as a possible parameter. I am working with vectors containing: chromosomes, start positions, end positions, and IDs I would like to use as FASTA headers. After trying getSequence with MGI IDs before, and now direct genomic coordinates, can anyone help me to find an approach that might work?
Thanks in advance.
Can you post the code you are using and error message?
library("biomaRt")
ensembl<-useMart("ensembl",dataset="mmusculus_gene_ensembl")
filters<-listFilters(ensembl)
attributes<-listAttributes(ensembl)
geneIDs<-readLines(“/home/ed/RWD/germ_cell/TXT/IDs.txt”)
chr<-readLines(“/home/ed/RWD/germ_cell/TXT/chr.txt”)
startpos<-readLines(“/home/ed/RWD/germ_cell/TXT/start.txt”)
endpos<-readLines(“/home/ed/RWD/germ_cell/TXT/end.txt”)
seqs<-getSequence(id=geneIDs, chromosome=chr, start=startpos, end=endpos, seqType=genomic, mart=ensembl)
Error in match(x, table, nomatch = 0L) : object 'genomic' not found