GET functional_profiles filtered_results
curl --request GET \
--url https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"n_mapped": 1,
"n_reads": 1,
"table": [
{
"id": "<string>",
"value": 123,
"name": "<string>",
"taxon_id": "<string>",
"taxon_name": "<string>"
}
]
}Functional Profiles
Functional Profile Filtered Results
GET
/
api
/
v1
/
functional_profiles
/
{id}
/
filtered_results
GET functional_profiles filtered_results
curl --request GET \
--url https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.onecodex.com/api/v1/functional_profiles/{id}/filtered_results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"n_mapped": 1,
"n_reads": 1,
"table": [
{
"id": "<string>",
"value": 123,
"name": "<string>",
"taxon_id": "<string>",
"taxon_name": "<string>"
}
]
}Return filtered functional profile results as JSON. The returned JSON is similar in structure to the
results returned by the functional profile results
route. However, this route returns a simplified and filtered version of the results, which only includes a
specified functional group, metric, and taxa stratification option. All ambiguous results, such as
unmapped or ungrouped entries, are filtered out.
The
| Property | Description |
|---|---|
| n_mapped integer | The number of reads that were successfully mapped to a gene family or pathway. |
| n_reads integer | The number of reads present in the sample. |
| table array | An array of objects consisting of individual functional groups (format below). |
table array contains results for a single functional group and metric, and also includes taxonomic information.
Each object in the array has the following fields:
| Property | Description |
|---|---|
| id string | A group-specific unique ID, e.g., GO:0006096, PF16874, COG0148. |
| name string | The name of the function. |
| value number | Gene family or pathway abundance in the specified metric. |
| taxon_id string | The NCBI taxonomy ID for the organism associated with this function. |
| taxon_name string | The name of the organism. |
Warning: The above JSON format is specific to the current version of the functional analysis job. This format is stable and guaranteed to remain stable for this version of the job. However, future versions of the functional analysis job may alter the format or introduce new changes. Please use caution and include fallbacks when writing non-exploratory code using the above route. Please also feel free to reach out if you’d like to discuss this format and any forthcoming changes with us.
Authorizations
Path Parameters
Query Parameters
Available options:
pathways, metacyc, eggnog, go, ko, ec, pfam, reaction Available options:
rpk, cpm, abundance, coverage, complete_abundance ⌘I

