1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//! Known variants (variation) and their recoded identifiers.
use serde_json::json;
use crate::options::RequestOption;
use crate::{Client, Response, Result};
impl Client {
/// Translates a variant identifier, HGVS notation, or genomic SPDI notation to all possible variant IDs.
pub fn get_variation_recoder_by_id(
&self,
species: &str,
id: &str,
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationRecoderById",
&[("species", species), ("id", id)],
None,
opts,
)
}
/// Translates a list of variant identifiers, HGVS notations, or SPDI notations.
pub fn get_variation_recoder_by_multiple_ids(
&self,
species: &str,
ids: &[&str],
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationRecoderByMultipleIds",
&[("species", species)],
Some(&json!({ "ids": ids })),
opts,
)
}
/// Uses a variant identifier (e.g. rsID) to return variation features.
pub fn get_variation_by_id(
&self,
species: &str,
id: &str,
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationById",
&[("species", species), ("id", id)],
None,
opts,
)
}
/// Returns variation features associated with a PMCID.
pub fn get_variation_by_pmcid(
&self,
species: &str,
pmcid: &str,
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationByPMCID",
&[("species", species), ("pmcid", pmcid)],
None,
opts,
)
}
/// Returns variation features associated with a PubMed ID.
pub fn get_variation_by_pmid(
&self,
species: &str,
pmid: &str,
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationByPMID",
&[("species", species), ("pmid", pmid)],
None,
opts,
)
}
/// Uses a list of variant identifiers to return variation features.
pub fn get_variation_by_multiple_ids(
&self,
species: &str,
ids: &[&str],
opts: &[RequestOption<'_>],
) -> Result<Response> {
self.call(
"getVariationByMultipleIds",
&[("species", species)],
Some(&json!({ "ids": ids })),
opts,
)
}
}