This is a test version of Biostars. For the public version, visit https://www.biostars.org.
biomaRt::getSequence - Invalid type argument

Hi, all!

I'm trying to download peptide sequence using biomaRt::getSequence() function.

The code I used is like below,

seq = getSequence(id = c("ENSP00000367848"), 
                  type = "ensembl", 
                  seqType = "peptide", 
                  mart = mart)

When I ran it, I got a following error.

Error in getSequence(id = c("ENSP00000367848"), type = "ensembl", seqType = "peptide",  : 
      Invalid type argument.  Use the listFilters function to select a valid type argument.

According to its vignette, "Supported types are hugo, ensembl, embl, entrezgene, refseq, ensemblTrans and unigene."

Why am I getting this error? Can you guys help me?

Thank you!

biomart r

1 answer

The type you need is emsembl_peptide_id. The list of supported types are not valid as exact string values, I think.

Thank you, RamRS!

You are right the list in the vignette doesn't match to actual values.

Where did you find the actual type values?

Like the error message says, you can run listFilters(mart) to get a list of filters (which are also valid values for the type parameter) with their descriptions.

Log in to answer this question.