Unable to use biomaRt getSequence() query to get sequences using genomic coordinates
1
1
Entering edit mode
9.1 years ago
eromasko ▴ 120

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.

biomaRt bioconductor R • 3.9k views
ADD COMMENT
2
Entering edit mode

Can you post the code you are using and error message?

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode
9.1 years ago

You need to put "genomic" in quotes:

seqs<-getSequence(id=geneIDs, chromosome=chr, start=startpos, end=endpos, seqType="genomic", mart=ensembl
ADD COMMENT
0
Entering edit mode

Hi Sean. I tried that and got this as the output:

Please specify the type of sequence that needs to be retrieved when using biomaRt in web service mode. Choose either gene_exon, transcript_exon, transcript_exon_intron, gene_exon_intron, cdna, coding, coding_transcript_flank, coding_gene_flank, transcript_flank, gene_flank, peptide, 3utr or 5utr

ADD REPLY

Login before adding your answer.

Traffic: 2412 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6