<p>getSequence has only been enabled for the main Ensembl (vertebrates) biomaRt. This is all at the Bioconductor end. You'll need to use a getBM instead, for example:</p>

<pre><code>os_genes &lt;- getBM(attributes =c("ensembl_transcript_id", "peptide"), filters = "ensembl_transcript_id", values = osj_id, mart = osj)
</code></pre>

CC BY-SA 3.0
2017-11-07T09:05:16.167Z
2017-11-07T22:49:21.010Z
2017-11-07T22:49:21.010Z
Emily_Ensembl
<p>Biomart seems to be down most of the time so i think you can parse the ensemble ID and names from the annotation file which i did as i was having similar problem .</p>

<p>You can use this to make a file with ensemble ID and gene names for you use </p>

<pre><code>awk '{                                
    for (i = 1; i &lt;= NF; i++) {
        if ($i ~ /gene_id|gene_name/) {
            printf "%s ", $(i+1)
        }
    }
    print ""
}' Homo_sapiens.GRCh37.70.gtf | sed -e 's/"//g' -e 's/;//g' -e 's/ /\t/' | sort -k1,1 | uniq &gt; Homo_sapiens.GRCh37.70.txt
</code></pre>

CC BY-SA 3.0
2017-11-08T18:17:44.650Z
2017-11-08T18:17:44.650Z
kcm
<p>I am experiencing an error while using getSequence() in biomaRt.</p>

<p>The code is given below:</p>

<pre><code>library("biomaRt")
ensemblp &lt;- useMart(biomart="plants_mart",host="plants.ensembl.org")
osj = useDataset("osativa_eg_gene", mart = ensemblp)
genes &lt;- read.csv("osj.csv")
osj_id &lt;- genes$ensembl_transcript_id

os_genes &lt;- getSequence(id = osj_id, type = "ensembl_transcript_id", seqType = "peptide", mart = ensemblp)
</code></pre>

<p>The error message I am getting is :</p>

<pre><code>Error in martCheck(mart, c("ensembl", "ENSEMBL_MART_ENSEMBL")) :   
This function only works when used with the ensembl BioMart.This
function only works when used with the ENSEMBL_MART_ENSEMBL BioMart.
</code></pre>

<p>Did I make any mistake in code? Please help me fix the error. I tried asking this in <a href="https://support.bioconductor.org/p/102570/" rel="noreferrer">Bioconductor support</a>, but no one responded yet.</p>

CC BY-SA 3.0
2017-11-07T07:58:56.083Z
It doesn't seem to be a mistake in the code, but simply what you try to do isn't working in that BioMart
llrs
CC BY-SA 3.0
2017-11-07T20:05:24.247Z
Did you find and review this post on bioconductor?  Does it help you? https://support.bioconductor.org/p/74761/
Bioathlete
<r><biomart>
BiomaRt error: Error in martCheck
# BiomaRt error: Error in martCheck

(Asked by: username_0 on 2017-11-07)

I am experiencing an error while using getSequence() in biomaRt.
The code is given below:
library("biomaRt")
ensemblp <- useMart(biomart="plants_mart",host="plants.ensembl.org")
osj = useDataset("osativa_eg_gene", mart = ensemblp)
genes <- read.csv("osj.csv")
osj_id <- genes$ensembl_transcript_id

os_genes <- getSequence(id = osj_id, type = "ensembl_transcript_id", seqType = "peptide", mart = ensemblp)

The error message I am getting is :
Error in martCheck(mart, c("ensembl", "ENSEMBL_MART_ENSEMBL")) :   
This function only works when used with the ensembl BioMart.This
function only works when used with the ENSEMBL_MART_ENSEMBL BioMart.

Did I make any mistake in code? Please help me fix the error. I tried asking this in Bioconductor support, but no one responded yet.

**Tags:** r, biomart
> **Comments:**
> **username_1**: It doesn't seem to be a mistake in the code, but simply what you try to do isn't working in that BioMart  
> **username_2**: Did you find and review this post on bioconductor?  Does it help you? https://support.bioconductor.org/p/74761/  

---

## 2 answers

### Answer by username_3 on 2017-11-07. Score: 9

getSequence has only been enabled for the main Ensembl (vertebrates) biomaRt. This is all at the Bioconductor end. You'll need to use a getBM instead, for example:
os_genes <- getBM(attributes =c("ensembl_transcript_id", "peptide"), filters = "ensembl_transcript_id", values = osj_id, mart = osj)


---

### Answer by username_4 on 2017-11-08. Score: 1

Biomart seems to be down most of the time so i think you can parse the ensemble ID and names from the annotation file which i did as i was having similar problem .
You can use this to make a file with ensemble ID and gene names for you use 
awk '{                                
    for (i = 1; i <= NF; i++) {
        if ($i ~ /gene_id|gene_name/) {
            printf "%s ", $(i+1)
        }
    }
    print ""
}' Homo_sapiens.GRCh37.70.gtf | sed -e 's/"//g' -e 's/;//g' -e 's/ /\t/' | sort -k1,1 | uniq > Homo_sapiens.GRCh37.70.txt


---

