Searching for Epitopes with Specific AA at Position

Is it possible to search for all epitopes that have particular amino acids in particular positions? A motif like having S or T at position 2 and W at position 9?

Hi Lindy,

Yes, it is possible to use regular expressions to search for sequences containing specific patterns. For your particular example, the query would look something like:

https://query-api.iedb.org/epitope_search?linear_sequence=match.^\w{1}[ST]\w{6}W&select=structure_id,linear_sequence

In this example, we use the PosgREST match operator and provide a POSIX regular expression (regex). The regex that we composed can be broken down as:

  • ^\w{1} - Match any single character at the start of the sequence
  • [ST] - Match S or T at the second position
  • \w{6} - Match any six characters
  • W - Match a W at position 9

Any sequences matching this pattern will be returned. If we want to limit this to sequences that are exactly length 9, we would add a $ to denote the end of the sequence, e.g.:

https://query-api.iedb.org/epitope_search?linear_sequence=match.^\w{1}[ST]\w{6}W$&select=structure_id,linear_sequence

In this example, I’ve used the match operator, which allows for more expressive syntax than the like operator. Both are covered in the PostgREST documentation, with details on pattern matching in the Postgres documentation. Here are the relevant links:

Finally, although this is possible in the IQ-API, performance will vary by regex complexity and by field. If responses are slow, please try to be patient and wait for the system to return the request or an error message. Resubmitting the same request will duplicate the load on the server and may impact performance for all users. Let us know about any issues with performance and we will take steps to accommodate reasonable requests.

Thanks,

J

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.