Filters Overview
Overview
You can use BioSamples filters are to filter resources based on their characteristics.
BioSamples filters are generally composed by a type, a field and a value combined as <type>:<field>:<value>
Note that if a value is not provided, the filter will check for existence of the provided field.
You can use search filters in both sample and accession search endpoints.
Type of filter
Attribute
Filter based on samples' attributes and attribute’s value
| Field | Value | Notes |
|---|---|---|
|
|
|
|
Attribute name |
Case sensitive, encoded |
|
Attribute value |
Case sensitive, encoded |
Date range
Range filter based on samples' update date or release date
| Field | Value | Notes |
|---|---|---|
|
|
|
|
release | update |
Case sensitive |
|
Date range in the format of |
Dates should be formatted using ISO8601; timezone is UTC by default; |
Accession
Filter based on samples' accession
| Field | Value | Notes |
|---|---|---|
|
|
|
|
|
The field is predefined |
|
Sample accession |
Examples
-
filter=acc:SAMN.*(Get only NCBI samples) -
filter=acc:SAMD.*(Get only DDBJ accessions)
Relationship
Filter based on samples relationship source
| Field | Value | Notes |
|---|---|---|
|
|
|
|
relation type |
Case sensitive, encoded |
|
relation target |
An accession |
Reverse Relationship
Filter based on samples' relationship target
| Field | Value | Notes |
|---|---|---|
|
|
|
|
relation type |
Case sensitive, encoded |
|
relation target |
Usually an accession |
Domain
Filter based on samples' submission domain
| Field | Value | Notes |
|---|---|---|
|
|
|
|
|
The field is predefined |
|
domain |
The domain need to include the |
Name
Filter based on samples' name
| Field | Value | Notes |
|---|---|---|
|
|
|
|
|
The field is predefined |
|
A sample name |
Case sensitive, encoded |
External Reference Data
Filter based on sample’s link with external data
| Field | Value | Notes |
|---|---|---|
|
|
|
|
External reference name |
e.g. ENA, ArrayExpress, etc. |
|
Externnal data id |