diff --git a/404.html b/404.html index 0bdbf59..998ffea 100644 --- a/404.html +++ b/404.html @@ -24,7 +24,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/LICENSE.html b/LICENSE.html index caba527..711c89a 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/articles/geojson.html b/articles/geojson.html index c86a723..d1227b3 100644 --- a/articles/geojson.html +++ b/articles/geojson.html @@ -26,7 +26,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/articles/index.html b/articles/index.html index 8e9a3bb..7b6f4e1 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/articles/smarterapi.html b/articles/smarterapi.html index 1bf5574..9c071bf 100644 --- a/articles/smarterapi.html +++ b/articles/smarterapi.html @@ -26,7 +26,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/articles/variants.html b/articles/variants.html index 788b14e..d0584a6 100644 --- a/articles/variants.html +++ b/articles/variants.html @@ -26,7 +26,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/authors.html b/authors.html index ccaa98b..f225395 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 @@ -65,13 +65,13 @@ Citation Cozzi P (2024). smarterapi: Fetch SMARTER Data Through REST API. -R package version 0.2.0.9000, https://cnr-ibba.github.io/r-smarter-api/. +R package version 0.2.0, https://cnr-ibba.github.io/r-smarter-api/. @Manual{, title = {smarterapi: Fetch SMARTER Data Through REST API}, author = {Paolo Cozzi}, year = {2024}, - note = {R package version 0.2.0.9000}, + note = {R package version 0.2.0}, url = {https://cnr-ibba.github.io/r-smarter-api/}, } diff --git a/index.html b/index.html index f2f3099..363b9c9 100644 --- a/index.html +++ b/index.html @@ -26,7 +26,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/pkgdown.yml b/pkgdown.yml index d76ecf3..1c7b842 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -5,7 +5,7 @@ articles: geojson: geojson.html smarterapi: smarterapi.html variants: variants.html -last_built: 2024-06-28T13:04Z +last_built: 2024-06-28T13:18Z urls: reference: https://cnr-ibba.github.io/r-smarter-api/reference article: https://cnr-ibba.github.io/r-smarter-api/articles diff --git a/reference/get_smarter_breeds.html b/reference/get_smarter_breeds.html index 7584dd8..ef662ce 100644 --- a/reference/get_smarter_breeds.html +++ b/reference/get_smarter_breeds.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_countries.html b/reference/get_smarter_countries.html index 82ff307..6504786 100644 --- a/reference/get_smarter_countries.html +++ b/reference/get_smarter_countries.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_datasets.html b/reference/get_smarter_datasets.html index 7fc8b94..7366c02 100644 --- a/reference/get_smarter_datasets.html +++ b/reference/get_smarter_datasets.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_genotypes.html b/reference/get_smarter_genotypes.html index c4d4685..a8be380 100644 --- a/reference/get_smarter_genotypes.html +++ b/reference/get_smarter_genotypes.html @@ -14,7 +14,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_geojson.html b/reference/get_smarter_geojson.html index 6d75a5e..33e00f8 100644 --- a/reference/get_smarter_geojson.html +++ b/reference/get_smarter_geojson.html @@ -12,7 +12,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_info.html b/reference/get_smarter_info.html index 64e4258..57b72b3 100644 --- a/reference/get_smarter_info.html +++ b/reference/get_smarter_info.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_samples.html b/reference/get_smarter_samples.html index ba53787..7aa2f88 100644 --- a/reference/get_smarter_samples.html +++ b/reference/get_smarter_samples.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_supportedchips.html b/reference/get_smarter_supportedchips.html index 75e36c8..db8b92b 100644 --- a/reference/get_smarter_supportedchips.html +++ b/reference/get_smarter_supportedchips.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/get_smarter_variants.html b/reference/get_smarter_variants.html index 9d44397..4987a5c 100644 --- a/reference/get_smarter_variants.html +++ b/reference/get_smarter_variants.html @@ -14,7 +14,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/reference/index.html b/reference/index.html index 59736eb..c38a46f 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ smarterapi - 0.2.0.9000 + 0.2.0 diff --git a/search.json b/search.json index 7c885e1..af9e3a4 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"get-data-using-parameters","dir":"Articles","previous_headings":"","what":"Get data using parameters","title":"Working with GeoJSON data","text":"can collect GeoJSON data using parameters, like using get_smarter_samples() function. function parse GeoJSON data return Simple Feature object, tibble object geometry column. example, try collect data Sheep hapmap background dataset: preview first rows hapmap_data object: Table continues Table continues ","code":"hapmap_dataset <- get_smarter_datasets(query = list( species = \"Sheep\", type = \"background\", type = \"genotypes\", search = \"hapmap\" )) hapmap_data <- get_smarter_geojson(species = \"Sheep\", query = list( dataset = hapmap_dataset[\"_id.$oid\"][1], country = \"Italy\" ))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"filter-data-using-spatial-queries","dir":"Articles","previous_headings":"","what":"Filter data using spatial queries","title":"Working with GeoJSON data","text":"alternative approach selecting samples exploits spatial queries. example, imported goat dataset geojson file qgis. created two polygons features correspondance samples want collect using GPS coordinates like following picture: exported two polygons shapefile. can spatial query st_intersects() order collect samples correspondance two areas interest: query done using get_smarter_geojson() function providing polygons argument: means can also provide sf object polygon argument. select country, using spatial queries:","code":"polygons_file <- system.file(\"extdata\", \"polygons.shp\", package = \"smarterapi\") polygons <- sf::st_read(polygons_file) goat_data <- get_smarter_geojson(\"Goat\", query = list(type = \"background\")) sel_sgbp <- sf::st_intersects(goat_data, polygons) sel_logical <- lengths(sel_sgbp) > 0 selected_goats <- goat_data[sel_logical, ] selected_goats <- get_smarter_geojson( \"Goat\", query = list(type = \"background\"), polygons = polygons ) italy <- rnaturalearth::ne_countries(scale = \"medium\", returnclass = \"sf\") %>% dplyr::filter(name == \"Italy\") italy_goats <- get_smarter_geojson( \"Goat\", query = list(type = \"background\"), polygons = italy )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"convert-from-multipoints-to-point","dir":"Articles","previous_headings":"","what":"Convert from MULTIPOINTS to POINT","title":"Working with GeoJSON data","text":"get_smarter_geojson() methods returns sf MULTIPOINTS objects since multiple locations collected animal, example transhumant samples. However, simplicity, can focus analyses using one GPS coordinate, transforming MULTIPOINTS object POINT object: warnings see terminal tell considering first coordinate object MULTIPOINT collection.","code":"hapmap_data <- hapmap_data %>% sf::st_cast(\"POINT\", do_split = FALSE) hapmap_data #> Simple feature collection with 92 features and 11 fields #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 9.016667 ymin: 37 xmax: 18.16667 ymax: 40.81667 #> Geodetic CRS: WGS 84 #> # A tibble: 92 × 12 #> breed breed_code chip_name country dataset metadata original_id sex #> #> 1 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT1 NA #> 2 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT23 NA #> 3 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT10 NA #> 4 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT20 NA #> 5 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT21 NA #> 6 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT22 NA #> 7 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT15 NA #> 8 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT8 NA #> 9 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT16 NA #> 10 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT24 NA #> # ℹ 82 more rows #> # ℹ 4 more variables: smarter_id , species , type , #> # geometry "},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"displaying-data-using-ggplot2","dir":"Articles","previous_headings":"Visualize SMARTER GPS data","what":"Displaying data using ggplot2","title":"Working with GeoJSON data","text":"sf data visualized using ggplot2. following examples derive countries rnaturalearth package, zoom plot selected points previous example: See post nice introduction sf ggplot2.","code":"# determine a bounding box around our samples bbox <- sf::st_bbox(hapmap_data) # collect the world countries as sf world <- rnaturalearth::ne_countries(scale = \"medium\", returnclass = \"sf\") # plot the data: use the bounding box to zoom the plot on our samples ggplot2::ggplot() + ggplot2::geom_sf(data = world, fill = \"antiquewhite\") + ggplot2::geom_sf(data = hapmap_data, color = \"blue\", size = 5) + ggspatial::annotation_scale(location = \"bl\", width_hint = 0.5) + ggspatial::annotation_north_arrow( location = \"bl\", which_north = \"true\", pad_x = ggplot2::unit(0.75, \"in\"), pad_y = ggplot2::unit(0.5, \"in\"), style = ggspatial::north_arrow_fancy_orienteering ) + ggspatial::coord_sf( xlim = c(bbox$xmin, bbox$xmax), ylim = c(bbox$ymin, bbox$ymax) ) + ggplot2::theme_bw() + ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5)) + ggplot2::xlab(\"longitude\") + ggplot2::ylab(\"latitude\") + ggplot2::ggtitle(\"Selected samples\")"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"displaying-data-using-leaflet","dir":"Articles","previous_headings":"Visualize SMARTER GPS data","what":"Displaying data using leaflet","title":"Working with GeoJSON data","text":"Data visualized interactive way using R leaflet library: See Leaflet R documentation information.","code":"leaflet::leaflet( data = hapmap_data, options = leaflet::leafletOptions(minZoom = 5, maxZoom = 10) ) %>% leaflet::addTiles() %>% leaflet::addMarkers( clusterOptions = leaflet::markerClusterOptions(), label = ~smarter_id )"},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"derive-elevation-data-using-elevatr","dir":"Articles","previous_headings":"Integrate data with external sources","what":"Derive elevation data using elevatr","title":"Working with GeoJSON data","text":"can collect elevation data using elevatr package. following functions returns input dataframe elevation elev_units additional columns: See elevatr vignette elevatr tutorial rspatialdata documentation information examples.","code":"prj_dd <- \"EPSG:4326\" hapmap_data_elev <- elevatr::get_elev_point( hapmap_data, prj = prj_dd, src = \"aws\" )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"add-worldclim-data-from-rasters","dir":"Articles","previous_headings":"Integrate data with external sources","what":"Add worldclim data from rasters","title":"Working with GeoJSON data","text":"can collect data worldclim database using geodata package: package particular collect raster data different sources (see geodata reference manual information). example, collect raster lowest definition (10min =~ 340km) worldclim bioclimatic variables elevation. Raster images placed tempdir path. using terra::extract calculate values data, converting terra SpatialVectors: See raster extraction geocomputation R information.","code":"worldclim_bio <- geodata::worldclim_global( var = \"bio\", res = 10, path = tempdir() ) bio_data <- terra::extract(worldclim_bio, terra::vect(hapmap_data)) worldclim_elev <- geodata::worldclim_global( var = \"elev\", res = 10, path = tempdir() ) elev_data <- terra::extract(worldclim_elev, terra::vect(hapmap_data)) hapmap_data_worldclim <- cbind(hapmap_data, merge(elev_data, bio_data))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Using smarterapi","text":"Simply import smarterapi like R package:","code":"library(dplyr) library(smarterapi)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-info-about-versions","dir":"Articles","previous_headings":"","what":"Collect info about versions","title":"Using smarterapi","text":"smarter database continuously updated, example receiving new samples, genotypes, metadata something fixed updated, example new assembly added. order ensure reproducibility monitoring changes, genotypes metadata provided using versions: means ensure genotypes dataset metadata referring version. can check database version using get_smarter_info() method: version system specified genotype file dataset can download smarter FTP site: ensure working version, metadata genotypes: , may find samples genotype files referring -dated assembly version. see changelist version, please refer SMARTER-database HISTORY.rst file.","code":"info <- get_smarter_info() info$version #> [1] \"0.4.10\" info$last_updated #> [1] \"2024-05-29 02:41:35 UTC\" $ tree -L 2 SHEEP/ SHEEP/ └── OAR3 ├── archive ├── SMARTER-OA-OAR3-top-0.4.10.md5 └── SMARTER-OA-OAR3-top-0.4.10.zip"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"querying-smarter-api","dir":"Articles","previous_headings":"","what":"Querying SMARTER API","title":"Using smarterapi","text":"smarterapi package structured handle requests/responses SMARTER API backend using R packages like httr jsonlite. general, functions accepts query=list() parameter, pass additional parameter API endpoint order filter results matching query. functions like get_smarter_samples() get_smarter_variants() requires additional parameters like species assembly version. function general return results data.frame: filter data using dplyr standard R methods filter data directly submitting proper query API. Please refer proper documentation understand parameters function expect. See also SMARTER-backend API web interface idea parameter allowed endpoint.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-samples","dir":"Articles","previous_headings":"","what":"Collect samples","title":"Using smarterapi","text":"examples collecting samples. main function required collect sample get_smarter_samples(), helper function allow query /samples/goat /samples/sheep endpoints SMARTER-backend API. use functions better idea values use filter data. Remember parameters see different example can merged restrict query samples looking .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-datasets","dir":"Articles","previous_headings":"Collect samples","what":"Select by datasets","title":"Using smarterapi","text":"Getting samples dataset quite easy, provide proper dataset_id get_smarter_samples() function. However, determine proper dataset_id using get_smarter_dataset() function, model /datasets endpoint. example, extract background genotypes datasets (data generated SMARTER project) pass proper type query argument. Since query argument list, can pass multiple parameters . parameters supports arrays, supply parameter name multiple times: one passed API endpoint Take time explore dataframe columns. two importants fields, first _id.$oid column, dataset_id want provide collect samples belonging dataset. second file column, archive name uploaded smarter database. example, background_goat_genotypes table looks like: collect adaptmap samples, can provide proper dataset_id get_smarter_samples() method. can add additional parameters, like country: previous case quite easy, want one dataset background_goat_genotypes dataframe, can simply paste value get_smarter_samples query. can handle multiple datasets? can transform proper column list renaming : can also use get_smarter_datasets() function reverse selection samples, example get samples one datasets: suppose, example, collect samples isheep datasets: last selection example relies dataset file contents: remember name file submitted dataset, can search datasets content: time two results returned, since one phenotypes dataset, genotypes. select genotypes, simply add type=genotypes query parameter.","code":"# select all genotypes datasets made before SMARTER project background_genotypes <- get_smarter_datasets( query = list(type = \"background\", type = \"genotypes\") ) # same as before, but limiting to goat species background_goat_genotypes <- get_smarter_datasets( query = list( type = \"background\", type = \"genotypes\", species = \"Goat\" ) ) # select the adaptmap id, which is in the first row of the dataframe adatpmap_id <- background_goat_genotypes[\"_id.$oid\"][1, 1] adaptmap_goats <- get_smarter_samples( species = \"Goat\", query = list(dataset = adatpmap_id, country = \"Italy\") ) # get more datasets foreground_goat_genotypes <- get_smarter_datasets( query = list(type = \"genotypes\", type = \"foreground\", species = \"Goat\") ) # construct the query arguments datasets <- as.list(foreground_goat_genotypes$\"_id.$oid\") names(datasets) <- rep(\"dataset\", length(datasets)) breeds <- list(breed_code = \"LNR\", breed_code = \"SKO\", breed_code = \"FSS\") query <- append(datasets, breeds) # select samples: subset by breed code and datasets foreground_goat_samples <- get_smarter_samples(species = \"Goat\", query = query) # collect all foreground datasets having \"isheep\" in their name isheep_datasets <- get_smarter_datasets( query = list( type = \"foreground\", type = \"genotypes\", search = \"isheep\" ) ) # collect ids for isheep datasets isheep_ids <- isheep_datasets$\"_id.$oid\" # collect all foreground samples foreground_samples <- get_smarter_samples( \"Sheep\", query = list(type = \"foreground\") ) # get rid of isheep_samples filtered_samples <- foreground_samples %>% dplyr::filter(!`dataset_id.$oid` %in% isheep_ids) datasets <- get_smarter_datasets(query = list(search = \"adaptmap\"))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-breed","dir":"Articles","previous_headings":"Collect samples","what":"Select by breed","title":"Using smarterapi","text":"can select samples relying breeds names breed codes. Breed names written languages come , order retrieve Île de France Fjällnäs breed samples, specify full breed name use search parameter get_smarter_breeds() model /breeds endpoint: Search breeds can return multiple values, example: Name codes can used select samples passing multiple arguments query: get samples merino breed name:","code":"breeds <- get_smarter_breeds( query = list( species = \"Sheep\", search = \"de france\" ) ) breeds <- get_smarter_breeds( query = list( species = \"Sheep\", search = \"merino\" ) ) selected_samples <- get_smarter_samples(species = \"Sheep\", query = list( breed_code = \"MER\", breed_code = \"AME\" )) # construct the query arguments query <- as.list(breeds$code) names(query) <- rep(\"breed_code\", length(query)) # execute query merino_samples <- get_smarter_samples(species = \"Sheep\", query = query)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-country","dir":"Articles","previous_headings":"Collect samples","what":"Select by country","title":"Using smarterapi","text":"can retrive samples countries. First get list available countries relying country name, extract samples using correct country name:","code":"italy <- get_smarter_countries(query = list(search = \"italy\")) italian_background_sheeps <- get_smarter_samples( species = \"Sheep\", query = list( country = italy$name[1] ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-chip","dir":"Articles","previous_headings":"Collect samples","what":"Select by chip","title":"Using smarterapi","text":"can select samples relying chip sequenced. search multiple chip types, collect samples belongs specified chip. First, collect list available chips certain species: collect samples relying chip name, example:","code":"sheep_chips <- get_smarter_supportedchips(query = list(species = \"Sheep\")) selected_samples <- get_smarter_samples( species = \"Sheep\", query = list( chip_name = \"IlluminaOvineHDSNP\", chip_name = \"AffymetrixAxiomOviCan\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-metadata","dir":"Articles","previous_headings":"Collect samples","what":"Select by metadata","title":"Using smarterapi","text":"Since metadata aren’t formatted way samples, difficult define single query can apply samples. moment, queries can apply metadata restricted presence absence. example, can collect samples GPS coordinates phenotypes (): , filter smarter_goats dataframe order collect samples want.","code":"smarter_goats <- get_smarter_samples( species = \"Goat\", query = list( locations__exists = TRUE, phenotype__exists = TRUE ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"refer-samples-to-their-original-publication","dir":"Articles","previous_headings":"","what":"Refer samples to their original publication","title":"Using smarterapi","text":"Suppose want refer samples original publication come : dataset dataframe doi column publication DOI stored. can use information collect publication information, need merge samples datasets dataframes order refer properly samples publication come . example :","code":"# collect all the genotypes datasets datasets <- get_smarter_datasets( query = list( species = \"Sheep\", type = \"genotypes\" ) ) # collect all the samples samples <- get_smarter_samples( species = \"Sheep\", ) # merge datasets and samples using dplyr samples_with_doi <- dplyr::inner_join( datasets, samples, by = dplyr::join_by(`_id.$oid` == `dataset_id.$oid`) ) %>% dplyr::select(smarter_id, breed_code, breed.y, doi) %>% dplyr::filter(!is.na(doi)) # count how many samples come from each publication samples_with_doi %>% group_by(doi) %>% summarise(counts = n())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-genotypes","dir":"Articles","previous_headings":"","what":"Collect genotypes","title":"Using smarterapi","text":"genotypes can’t retrieved using smarter-api available public FTP. need download files using FTP client like FileZilla lftp extract genotypes using plink. alternative, possible download genotypes using get_smarter_genotypes method package. method download genotypes FTP current releases selected species assembly return destination path downloaded archive: method download genotypes current working directory, directory specified dest_path argument. genotypes stored compressed .zip file, need de-compressed order used plink.","code":"downloaded_archive <- get_smarter_genotypes( \"Sheep\", \"OAR3\" )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"subset-genotypes-relying-samples","dir":"Articles","previous_headings":"","what":"Subset genotypes relying samples","title":"Using smarterapi","text":"identified samples interest, can extract genotypes proper file using plink. First, write TSV file breed_code smarter_id columns. example, using samples selected dplyr: Next, need collect proper plink options order loose information plink file. parameters used generate genotype files tracked info endpoint. example, get parameters Sheep genotypes: finally can call plink providing sample list:","code":"selected_sheeps_ids <- italian_background_sheeps %>% dplyr::select( \"breed_code\", \"smarter_id\" ) write.table( selected_sheeps_ids, file = \"selected_sheeps.txt\", quote = FALSE, sep = \"\\t\", row.names = FALSE, col.names = FALSE ) info <- get_smarter_info() plink_opts <- paste0(info$plink_specie_opt$Sheep, collapse = \" \") plink_opts #> [1] \"--chr-set 26 no-xy no-mt --allow-no-sex\" plink --chr-set 26 no-xy no-mt --allow-no-sex \\ --bfile SMARTER-OA-OAR3-top-0.4.10 \\ --keep selected_sheeps.txt \\ --out selected_sheeps-OAR3-top-0.4.10 \\ --make-bed"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"assembly-versions","dir":"Articles","previous_headings":"","what":"Assembly versions","title":"Working with SNPs","text":"One aim project manage genotypes different assembly version. means collect data different assemblies (due data generated), different sources (Affymetrix, Illumina, WGS) different file formats. Genotypes normalized order consistent accross data sources stored one genotype file specie. Currently four assembly versions managed, two sheep dataset two goat dataset. Information assemblies data sources can retrieved backend info endpoint get_smarter_info() function:","code":"info <- get_smarter_info() assemblies <- as.data.frame(t(as.data.frame(info$working_assemblies))) names(assemblies) <- c(\"name\", \"source\")"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"collect-data-from-an-assembly","dir":"Articles","previous_headings":"","what":"Collect data from an assembly","title":"Working with SNPs","text":"get_smarter_variants() two mandatory parameters, species assembly, accept additional parameters (see one variant endpoints information). example can search variants snp name rs id (latter exists): Table continues Table continues Please, refer get_smarter_info() working_assemblies idea assemblies supported SMARTER-database. Data come SNPchiMp v.3 like Sheep OAR3 assembly, support illumina forward attribute. example following SNP: Table continues Table continues T/C forward strand OAR3: means reversed probe aligned genome (infer bottom illumina strand attribute SNP). Genotypes SMARTER-database converted using illumina top coding convention, find SNP /G SMARTER-database reference sequence ’s T/C.","code":"snp <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list( name = \"snp12965-scaffold1499-3295573\" ) ) snp <- get_smarter_variants( species = \"Sheep\", assembly = \"OAR3\", query = list( rs_id = \"rs10721092\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"fetch-variants-by-region","dir":"Articles","previous_headings":"","what":"Fetch Variants by region","title":"Working with SNPs","text":"Variants endpoint support query regions, using :- format, example: Table continues Table continues ","code":"variants <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list( region = \"1:1-100000\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"fetch-variants-by-chip-name","dir":"Articles","previous_headings":"","what":"Fetch Variants by chip name","title":"Working with SNPs","text":"can download variants certain chip: please consider require lot time memory, since store 600K SNPs smarter database. First, collect available chips SMARTER-database, example Sheep species: collect SNPs certain chip providing SMARTER chip name. Please, consider download 50K SNP chip take lot time","code":"sheep_chips <- get_smarter_supportedchips(query = list(species = \"Sheep\")) variants <- get_smarter_variants( species = \"Sheep\", assembly = \"OAR3\", query = list( chip_name = \"IlluminaOvineSNP50\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Paolo Cozzi. Author, maintainer.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Cozzi P (2024). smarterapi: Fetch SMARTER Data REST API. R package version 0.2.0.9000, https://cnr-ibba.github.io/r-smarter-api/.","code":"@Manual{, title = {smarterapi: Fetch SMARTER Data Through REST API}, author = {Paolo Cozzi}, year = {2024}, note = {R package version 0.2.0.9000}, url = {https://cnr-ibba.github.io/r-smarter-api/}, }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"smarterapi","dir":"","previous_headings":"","what":"Fetch SMARTER Data Through REST API","title":"Fetch SMARTER Data Through REST API","text":"goal smarterapi collect data SMARTER REST API provide user dataframe. Get information online vignette.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Fetch SMARTER Data Through REST API","text":"smarterapi package available GitHub can installed source package alternative using devtools package, example: installation, can load package R session:","code":"# install devtools if needed # install.packages(\"devtools\") devtools::install_github(\"cnr-ibba/r-smarter-api\") # import this library to deal with the SMARTER API library(smarterapi)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"smarter-credentials","dir":"","previous_headings":"","what":"SMARTER credentials","title":"Fetch SMARTER Data Through REST API","text":"public release SMARTER data, ’s need provide credentials access data. used credentials access data, need install latest version smarterapi package.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"querying-the-smarter-backend","dir":"","previous_headings":"","what":"Querying the SMARTER backend","title":"Fetch SMARTER Data Through REST API","text":"smarterapi provides set functions used fetch data SMARTER-backend endpoints described api documentation returning data.frame object. example, get_smarter_datasets lets query Datasets endpoint, get_smarter_samples able query parse Sample endpoints response. smarterapi function documented R can get help function like R functions. two types parameters required fetch data SMARTER-backend: species parameter, can Goat Sheep respectively goat sheep Samples Variants endpoints, query parameter can provided get_smarter_ function. species parameter mandatory order query endpoint specific Goat Sheep, query parameter optional need specified list() object order limit query data particular. example, need foreground genotypes datasets, can collect data like : require background goat samples, can like : full option list available endpoint available SMARTER-backend swagger documentation: option name use name described parameters, description parameter types can give hints exploit endpoint properly. instance, parameters described array objects can specified multiple times:","code":"datasets <- get_smarter_datasets( query = list(type = \"genotypes\", type = \"foreground\")) goat_samples <- get_smarter_samples( species = \"Goat\", query = list(type = \"background\")) > goat_breeds <- get_smarter_breeds(query = list(species=\"Goat\", search=\"land\")) > goat_breeds[c(\"name\",\"code\")] name code 1 Rangeland RAN 2 Landrace LNR 3 Landin LND 4 Icelandic goat ICL > goat_samples <- get_smarter_samples( species = \"Goat\", query = list( breed_code=\"RAN\", breed_code=\"LNR\", breed_code=\"LND\", breed_code=\"ICL\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Fetch SMARTER Data Through REST API","text":"basic example shows collect data SMARTER REST API Italian goats belonging Adaptmap dataset: examples vignettes, example collect data Variants endpoints work geographic coordinates.","code":"# collect the dataset by providing part of the name with the search option: # since we are forcing to collect only background genotypes, only one dataset # will be returned datasets <- get_smarter_datasets( query = list( species = \"Goat\", search = \"adaptmap\", type = \"genotypes\", type = \"background\" ) ) # get the dataset id adatpmap_id <- datasets[\"_id.$oid\"][1] # collect all the italian goats from the adaptmap dataset. Using the dataset id # to filter out all the samples belonging to this dataset and the country option # to filter out only the italian samples for this dataset adaptmap_goats <- get_smarter_samples( species = \"Goat\", query = list( dataset = adatpmap_id, country = \"Italy\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Breeds — get_smarter_breeds","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Fetch SMARTER REST API breeds endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Breeds — get_smarter_breeds","text":"","code":"get_smarter_breeds(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Breeds — get_smarter_breeds","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Returns dataframe selected breeds","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Breeds endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"Sheep\" breeds need provide list(species=\"Sheep\") query parameter. Endpoint supports query breed code name. addition, can search using pattern search parameter. See Swagger Breeds endpoint information breeds endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Breeds — get_smarter_breeds","text":"","code":"selected_breed <- get_smarter_breeds(query = list(code = \"TEX\")) selected_breeds <- get_smarter_breeds(query = list(search = \"mer\")) if (FALSE) { all_breeds <- get_smarter_breeds() sheep_breeds <- get_smarter_breeds(query = list(species = \"Sheep\")) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Countries — get_smarter_countries","title":"Get SMARTER Countries — get_smarter_countries","text":"Fetch SMARTER REST API countries endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Countries — get_smarter_countries","text":"","code":"get_smarter_countries(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Countries — get_smarter_countries","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Countries — get_smarter_countries","text":"Returns dataframe selected countries","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Countries — get_smarter_countries","text":"Contries endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get countries \"Sheeps\" need provide list(species=\"Sheep\") query parameter. Endpoint supports searches two tree ISO codes using alpha_2 alpha3 parameters respectively. addition, can search using pattern search parameter. See Swagger Countries endpoint information breeds endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Countries — get_smarter_countries","text":"","code":"italy <- get_smarter_countries(query = list(name = \"Italy\")) france <- get_smarter_countries(query = list(alpha_2 = \"FR\")) if (FALSE) { # get countries where there are sheeps sheep_countries <- get_smarter_countries(query = list(species = \"Sheep\")) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Datasets — get_smarter_datasets","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Fetch SMARTER REST API datasets endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Datasets — get_smarter_datasets","text":"","code":"get_smarter_datasets(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Datasets — get_smarter_datasets","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Returns dataframe selected datasets","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Datasets endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"Sheep\" datasets need provide list(species=\"Sheep\") query parameter. Endpoint supports query type chip_name. addition, can search using pattern file contents search parameter. See Swagger Datasets endpoint information datasets endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Datasets — get_smarter_datasets","text":"","code":"genotypes_foreground <- get_smarter_datasets( query = list(type = \"foreground\", type = \"genotypes\") ) adaptmap_genotypes <- get_smarter_datasets( query = list(species = \"Goat\", search = \"adaptmap\", type = \"genotypes\") ) if (FALSE) { all_datasets <- get_smarter_datasets() }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Genotypes — get_smarter_genotypes","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"Retrieve genotypes data SMARTER database. information supported assemblies returned (see get_smarter_info information).","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"","code":"get_smarter_genotypes(species, assembly, dest_path = NULL)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"species smarter species (\"Goat\", \"Sheep\") assembly smarter working assembly species dest_path path file downloaded. NULL, file downloaded current working directory","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"character string path downloaded file returned","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"about-smarter-supported-assemblies","dir":"Reference","previous_headings":"","what":"About SMARTER supported assemblies","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"Currently SMARTER supports OAR3 OAR4 assemblies Sheep CHI1 ARS1 assemblies goat. Genotypes provided PLINK binary format, compressed zip file.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"","code":"if (FALSE) { # get genotypes for sheep OAR3 in current directory get_smarter_genotypes(species = \"Sheep\", assembly = \"OAR3\") }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER GeoJSON Samples — get_smarter_geojson","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"Fetch SMARTER REST API samples GPS coordinates return simple features.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"","code":"get_smarter_geojson(species, query = list(), polygons = NULL)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"species smarter species (\"Goat\", \"Sheep\") query list query arguments polygons sf object polygons filter samples","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"sf data object","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"","code":"if (FALSE) { # required to execute pipe operations and draw examples library(dplyr) library(leaflet) # get goat samples with GPS coordinates as sf object goat_data <- get_smarter_geojson( species = \"Goat\", query = list( type = \"background\", country = \"Italy\" ) ) # leaflet doesn't handle MULTIPOINT data (https://github.com/rstudio/leaflet/issues/352) # Cast them into point considering only the first objects # (https://r-spatial.github.io/sf/reference/st_cast.html) goat_data <- goat_data %>% sf::st_cast(\"POINT\", do_split=FALSE) # draw samples in a leaflet map using markerCluser leaflet(data = goat_data) %>% leaflet::addTiles() %>% leaflet::addMarkers( clusterOptions = leaflet::markerClusterOptions(), label = ~smarter_id ) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Info — get_smarter_info","title":"Get SMARTER Info — get_smarter_info","text":"Collect information smarter database status returns values list","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Info — get_smarter_info","text":"","code":"get_smarter_info()"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Info — get_smarter_info","text":"list object SMARTER database information","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"about-smarter-database-info-endpoint","dir":"Reference","previous_headings":"","what":"About SMARTER database info endpoint","title":"Get SMARTER Info — get_smarter_info","text":"info endpoint contains information status database information required understand genotypes updated . example, SMARTER database current version last_updated recent genotype file, retrive information samples included genotype file. case, download recent copy SMARTER database FTP site. plink_specie nested list contains plink species options used generate genotype data. want modify genotype file compatible SMARTER database may want use specie options","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Info — get_smarter_info","text":"","code":"smarter_status <- get_smarter_info() smarter_version <- smarter_status$version"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Samples — get_smarter_samples","title":"Get SMARTER Samples — get_smarter_samples","text":"Fetch SMARTER REST API samples endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Samples — get_smarter_samples","text":"","code":"get_smarter_samples(species, query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Samples — get_smarter_samples","text":"species smarter species (\"Goat\", \"Sheep\") query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Samples — get_smarter_samples","text":"Returns dataframe selected samples","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Samples — get_smarter_samples","text":"Samples endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"foreground\" samples need provide list(type=\"foreground\") query parameter. Endpoint supports lot parameters can provided multiple times See Swagger Samples endpoint information samples endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Samples — get_smarter_samples","text":"","code":"italian_sheeps <- get_smarter_samples( \"Sheep\", query = list(country = \"Italy\") ) merino_sheeps <- get_smarter_samples(\"Sheep\", query = list(breed = \"Merino\")) selected_goats <- get_smarter_samples( \"Goat\", query = list(country = \"Italy\", breed_code = \"ORO\", breed_code = \"GAR\") ) if (FALSE) { foreground_goats <- get_smarter_samples( \"Goat\", query = list(type = \"foreground\") ) all_sheep_samples <- get_smarter_samples(\"Sheep\") }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Supported Chips — get_smarter_supportedchips","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"Collect information chip data currently managed SMARTER database.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"","code":"get_smarter_supportedchips(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"Returns dataframe selected chips","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"","code":"chips <- get_smarter_supportedchips() if (FALSE) { # collect data on chips get_smarter_supportedchips() # retrieve samples relying on chip used samples <- get_smarter_samples( species = \"Sheep\", query = list(chip_name = \"AffymetrixAxiomOviCan\") ) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Variants — get_smarter_variants","title":"Get SMARTER Variants — get_smarter_variants","text":"Retrieve information SMARTER SNPs. information supported assemblies returned (see get_smarter_info information).","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Variants — get_smarter_variants","text":"","code":"get_smarter_variants(species, assembly, query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Variants — get_smarter_variants","text":"species smarter species (\"Goat\", \"Sheep\") assembly smarter working assembly species query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Variants — get_smarter_variants","text":"Returns dataframe selected variants","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"about-smarter-supported-assemblies","dir":"Reference","previous_headings":"","what":"About SMARTER supported assemblies","title":"Get SMARTER Variants — get_smarter_variants","text":"Currently SMARTER supports OAR3 OAR4 assemblies Sheep CHI1 ARS1 assemblies goat. assembly, evidences used create smarter database returned. Retrieving variant certain assembly species require time memory.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Variants — get_smarter_variants","text":"","code":"# get variants by region (chrom:start-end) variants <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list(region = \"1:1-100000\") ) if (FALSE) { # get available assemblies from info endpoint names(get_smarter_info()$working_assemblies) # collect variants from goat ARS1 endpoint (takes a lot of time) ars1_variant <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\" ) }"}] +[{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"get-data-using-parameters","dir":"Articles","previous_headings":"","what":"Get data using parameters","title":"Working with GeoJSON data","text":"can collect GeoJSON data using parameters, like using get_smarter_samples() function. function parse GeoJSON data return Simple Feature object, tibble object geometry column. example, try collect data Sheep hapmap background dataset: preview first rows hapmap_data object: Table continues Table continues ","code":"hapmap_dataset <- get_smarter_datasets(query = list( species = \"Sheep\", type = \"background\", type = \"genotypes\", search = \"hapmap\" )) hapmap_data <- get_smarter_geojson(species = \"Sheep\", query = list( dataset = hapmap_dataset[\"_id.$oid\"][1], country = \"Italy\" ))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"filter-data-using-spatial-queries","dir":"Articles","previous_headings":"","what":"Filter data using spatial queries","title":"Working with GeoJSON data","text":"alternative approach selecting samples exploits spatial queries. example, imported goat dataset geojson file qgis. created two polygons features correspondance samples want collect using GPS coordinates like following picture: exported two polygons shapefile. can spatial query st_intersects() order collect samples correspondance two areas interest: query done using get_smarter_geojson() function providing polygons argument: means can also provide sf object polygon argument. select country, using spatial queries:","code":"polygons_file <- system.file(\"extdata\", \"polygons.shp\", package = \"smarterapi\") polygons <- sf::st_read(polygons_file) goat_data <- get_smarter_geojson(\"Goat\", query = list(type = \"background\")) sel_sgbp <- sf::st_intersects(goat_data, polygons) sel_logical <- lengths(sel_sgbp) > 0 selected_goats <- goat_data[sel_logical, ] selected_goats <- get_smarter_geojson( \"Goat\", query = list(type = \"background\"), polygons = polygons ) italy <- rnaturalearth::ne_countries(scale = \"medium\", returnclass = \"sf\") %>% dplyr::filter(name == \"Italy\") italy_goats <- get_smarter_geojson( \"Goat\", query = list(type = \"background\"), polygons = italy )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"convert-from-multipoints-to-point","dir":"Articles","previous_headings":"","what":"Convert from MULTIPOINTS to POINT","title":"Working with GeoJSON data","text":"get_smarter_geojson() methods returns sf MULTIPOINTS objects since multiple locations collected animal, example transhumant samples. However, simplicity, can focus analyses using one GPS coordinate, transforming MULTIPOINTS object POINT object: warnings see terminal tell considering first coordinate object MULTIPOINT collection.","code":"hapmap_data <- hapmap_data %>% sf::st_cast(\"POINT\", do_split = FALSE) hapmap_data #> Simple feature collection with 92 features and 11 fields #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 9.016667 ymin: 37 xmax: 18.16667 ymax: 40.81667 #> Geodetic CRS: WGS 84 #> # A tibble: 92 × 12 #> breed breed_code chip_name country dataset metadata original_id sex #> #> 1 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT1 NA #> 2 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT23 NA #> 3 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT10 NA #> 4 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT20 NA #> 5 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT21 NA #> 6 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT22 NA #> 7 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT15 NA #> 8 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT8 NA #> 9 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT16 NA #> 10 Altamurana ALT IlluminaOvi… Italy \"{ \\\"$… \"{ \\\"lo… ALT24 NA #> # ℹ 82 more rows #> # ℹ 4 more variables: smarter_id , species , type , #> # geometry "},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"displaying-data-using-ggplot2","dir":"Articles","previous_headings":"Visualize SMARTER GPS data","what":"Displaying data using ggplot2","title":"Working with GeoJSON data","text":"sf data visualized using ggplot2. following examples derive countries rnaturalearth package, zoom plot selected points previous example: See post nice introduction sf ggplot2.","code":"# determine a bounding box around our samples bbox <- sf::st_bbox(hapmap_data) # collect the world countries as sf world <- rnaturalearth::ne_countries(scale = \"medium\", returnclass = \"sf\") # plot the data: use the bounding box to zoom the plot on our samples ggplot2::ggplot() + ggplot2::geom_sf(data = world, fill = \"antiquewhite\") + ggplot2::geom_sf(data = hapmap_data, color = \"blue\", size = 5) + ggspatial::annotation_scale(location = \"bl\", width_hint = 0.5) + ggspatial::annotation_north_arrow( location = \"bl\", which_north = \"true\", pad_x = ggplot2::unit(0.75, \"in\"), pad_y = ggplot2::unit(0.5, \"in\"), style = ggspatial::north_arrow_fancy_orienteering ) + ggspatial::coord_sf( xlim = c(bbox$xmin, bbox$xmax), ylim = c(bbox$ymin, bbox$ymax) ) + ggplot2::theme_bw() + ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5)) + ggplot2::xlab(\"longitude\") + ggplot2::ylab(\"latitude\") + ggplot2::ggtitle(\"Selected samples\")"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"displaying-data-using-leaflet","dir":"Articles","previous_headings":"Visualize SMARTER GPS data","what":"Displaying data using leaflet","title":"Working with GeoJSON data","text":"Data visualized interactive way using R leaflet library: See Leaflet R documentation information.","code":"leaflet::leaflet( data = hapmap_data, options = leaflet::leafletOptions(minZoom = 5, maxZoom = 10) ) %>% leaflet::addTiles() %>% leaflet::addMarkers( clusterOptions = leaflet::markerClusterOptions(), label = ~smarter_id )"},{"path":[]},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"derive-elevation-data-using-elevatr","dir":"Articles","previous_headings":"Integrate data with external sources","what":"Derive elevation data using elevatr","title":"Working with GeoJSON data","text":"can collect elevation data using elevatr package. following functions returns input dataframe elevation elev_units additional columns: See elevatr vignette elevatr tutorial rspatialdata documentation information examples.","code":"prj_dd <- \"EPSG:4326\" hapmap_data_elev <- elevatr::get_elev_point( hapmap_data, prj = prj_dd, src = \"aws\" )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/geojson.html","id":"add-worldclim-data-from-rasters","dir":"Articles","previous_headings":"Integrate data with external sources","what":"Add worldclim data from rasters","title":"Working with GeoJSON data","text":"can collect data worldclim database using geodata package: package particular collect raster data different sources (see geodata reference manual information). example, collect raster lowest definition (10min =~ 340km) worldclim bioclimatic variables elevation. Raster images placed tempdir path. using terra::extract calculate values data, converting terra SpatialVectors: See raster extraction geocomputation R information.","code":"worldclim_bio <- geodata::worldclim_global( var = \"bio\", res = 10, path = tempdir() ) bio_data <- terra::extract(worldclim_bio, terra::vect(hapmap_data)) worldclim_elev <- geodata::worldclim_global( var = \"elev\", res = 10, path = tempdir() ) elev_data <- terra::extract(worldclim_elev, terra::vect(hapmap_data)) hapmap_data_worldclim <- cbind(hapmap_data, merge(elev_data, bio_data))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"getting-started","dir":"Articles","previous_headings":"","what":"Getting started","title":"Using smarterapi","text":"Simply import smarterapi like R package:","code":"library(dplyr) library(smarterapi)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-info-about-versions","dir":"Articles","previous_headings":"","what":"Collect info about versions","title":"Using smarterapi","text":"smarter database continuously updated, example receiving new samples, genotypes, metadata something fixed updated, example new assembly added. order ensure reproducibility monitoring changes, genotypes metadata provided using versions: means ensure genotypes dataset metadata referring version. can check database version using get_smarter_info() method: version system specified genotype file dataset can download smarter FTP site: ensure working version, metadata genotypes: , may find samples genotype files referring -dated assembly version. see changelist version, please refer SMARTER-database HISTORY.rst file.","code":"info <- get_smarter_info() info$version #> [1] \"0.4.10\" info$last_updated #> [1] \"2024-05-29 02:41:35 UTC\" $ tree -L 2 SHEEP/ SHEEP/ └── OAR3 ├── archive ├── SMARTER-OA-OAR3-top-0.4.10.md5 └── SMARTER-OA-OAR3-top-0.4.10.zip"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"querying-smarter-api","dir":"Articles","previous_headings":"","what":"Querying SMARTER API","title":"Using smarterapi","text":"smarterapi package structured handle requests/responses SMARTER API backend using R packages like httr jsonlite. general, functions accepts query=list() parameter, pass additional parameter API endpoint order filter results matching query. functions like get_smarter_samples() get_smarter_variants() requires additional parameters like species assembly version. function general return results data.frame: filter data using dplyr standard R methods filter data directly submitting proper query API. Please refer proper documentation understand parameters function expect. See also SMARTER-backend API web interface idea parameter allowed endpoint.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-samples","dir":"Articles","previous_headings":"","what":"Collect samples","title":"Using smarterapi","text":"examples collecting samples. main function required collect sample get_smarter_samples(), helper function allow query /samples/goat /samples/sheep endpoints SMARTER-backend API. use functions better idea values use filter data. Remember parameters see different example can merged restrict query samples looking .","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-datasets","dir":"Articles","previous_headings":"Collect samples","what":"Select by datasets","title":"Using smarterapi","text":"Getting samples dataset quite easy, provide proper dataset_id get_smarter_samples() function. However, determine proper dataset_id using get_smarter_dataset() function, model /datasets endpoint. example, extract background genotypes datasets (data generated SMARTER project) pass proper type query argument. Since query argument list, can pass multiple parameters . parameters supports arrays, supply parameter name multiple times: one passed API endpoint Take time explore dataframe columns. two importants fields, first _id.$oid column, dataset_id want provide collect samples belonging dataset. second file column, archive name uploaded smarter database. example, background_goat_genotypes table looks like: collect adaptmap samples, can provide proper dataset_id get_smarter_samples() method. can add additional parameters, like country: previous case quite easy, want one dataset background_goat_genotypes dataframe, can simply paste value get_smarter_samples query. can handle multiple datasets? can transform proper column list renaming : can also use get_smarter_datasets() function reverse selection samples, example get samples one datasets: suppose, example, collect samples isheep datasets: last selection example relies dataset file contents: remember name file submitted dataset, can search datasets content: time two results returned, since one phenotypes dataset, genotypes. select genotypes, simply add type=genotypes query parameter.","code":"# select all genotypes datasets made before SMARTER project background_genotypes <- get_smarter_datasets( query = list(type = \"background\", type = \"genotypes\") ) # same as before, but limiting to goat species background_goat_genotypes <- get_smarter_datasets( query = list( type = \"background\", type = \"genotypes\", species = \"Goat\" ) ) # select the adaptmap id, which is in the first row of the dataframe adatpmap_id <- background_goat_genotypes[\"_id.$oid\"][1, 1] adaptmap_goats <- get_smarter_samples( species = \"Goat\", query = list(dataset = adatpmap_id, country = \"Italy\") ) # get more datasets foreground_goat_genotypes <- get_smarter_datasets( query = list(type = \"genotypes\", type = \"foreground\", species = \"Goat\") ) # construct the query arguments datasets <- as.list(foreground_goat_genotypes$\"_id.$oid\") names(datasets) <- rep(\"dataset\", length(datasets)) breeds <- list(breed_code = \"LNR\", breed_code = \"SKO\", breed_code = \"FSS\") query <- append(datasets, breeds) # select samples: subset by breed code and datasets foreground_goat_samples <- get_smarter_samples(species = \"Goat\", query = query) # collect all foreground datasets having \"isheep\" in their name isheep_datasets <- get_smarter_datasets( query = list( type = \"foreground\", type = \"genotypes\", search = \"isheep\" ) ) # collect ids for isheep datasets isheep_ids <- isheep_datasets$\"_id.$oid\" # collect all foreground samples foreground_samples <- get_smarter_samples( \"Sheep\", query = list(type = \"foreground\") ) # get rid of isheep_samples filtered_samples <- foreground_samples %>% dplyr::filter(!`dataset_id.$oid` %in% isheep_ids) datasets <- get_smarter_datasets(query = list(search = \"adaptmap\"))"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-breed","dir":"Articles","previous_headings":"Collect samples","what":"Select by breed","title":"Using smarterapi","text":"can select samples relying breeds names breed codes. Breed names written languages come , order retrieve Île de France Fjällnäs breed samples, specify full breed name use search parameter get_smarter_breeds() model /breeds endpoint: Search breeds can return multiple values, example: Name codes can used select samples passing multiple arguments query: get samples merino breed name:","code":"breeds <- get_smarter_breeds( query = list( species = \"Sheep\", search = \"de france\" ) ) breeds <- get_smarter_breeds( query = list( species = \"Sheep\", search = \"merino\" ) ) selected_samples <- get_smarter_samples(species = \"Sheep\", query = list( breed_code = \"MER\", breed_code = \"AME\" )) # construct the query arguments query <- as.list(breeds$code) names(query) <- rep(\"breed_code\", length(query)) # execute query merino_samples <- get_smarter_samples(species = \"Sheep\", query = query)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-country","dir":"Articles","previous_headings":"Collect samples","what":"Select by country","title":"Using smarterapi","text":"can retrive samples countries. First get list available countries relying country name, extract samples using correct country name:","code":"italy <- get_smarter_countries(query = list(search = \"italy\")) italian_background_sheeps <- get_smarter_samples( species = \"Sheep\", query = list( country = italy$name[1] ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-chip","dir":"Articles","previous_headings":"Collect samples","what":"Select by chip","title":"Using smarterapi","text":"can select samples relying chip sequenced. search multiple chip types, collect samples belongs specified chip. First, collect list available chips certain species: collect samples relying chip name, example:","code":"sheep_chips <- get_smarter_supportedchips(query = list(species = \"Sheep\")) selected_samples <- get_smarter_samples( species = \"Sheep\", query = list( chip_name = \"IlluminaOvineHDSNP\", chip_name = \"AffymetrixAxiomOviCan\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"select-by-metadata","dir":"Articles","previous_headings":"Collect samples","what":"Select by metadata","title":"Using smarterapi","text":"Since metadata aren’t formatted way samples, difficult define single query can apply samples. moment, queries can apply metadata restricted presence absence. example, can collect samples GPS coordinates phenotypes (): , filter smarter_goats dataframe order collect samples want.","code":"smarter_goats <- get_smarter_samples( species = \"Goat\", query = list( locations__exists = TRUE, phenotype__exists = TRUE ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"refer-samples-to-their-original-publication","dir":"Articles","previous_headings":"","what":"Refer samples to their original publication","title":"Using smarterapi","text":"Suppose want refer samples original publication come : dataset dataframe doi column publication DOI stored. can use information collect publication information, need merge samples datasets dataframes order refer properly samples publication come . example :","code":"# collect all the genotypes datasets datasets <- get_smarter_datasets( query = list( species = \"Sheep\", type = \"genotypes\" ) ) # collect all the samples samples <- get_smarter_samples( species = \"Sheep\", ) # merge datasets and samples using dplyr samples_with_doi <- dplyr::inner_join( datasets, samples, by = dplyr::join_by(`_id.$oid` == `dataset_id.$oid`) ) %>% dplyr::select(smarter_id, breed_code, breed.y, doi) %>% dplyr::filter(!is.na(doi)) # count how many samples come from each publication samples_with_doi %>% group_by(doi) %>% summarise(counts = n())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"collect-genotypes","dir":"Articles","previous_headings":"","what":"Collect genotypes","title":"Using smarterapi","text":"genotypes can’t retrieved using smarter-api available public FTP. need download files using FTP client like FileZilla lftp extract genotypes using plink. alternative, possible download genotypes using get_smarter_genotypes method package. method download genotypes FTP current releases selected species assembly return destination path downloaded archive: method download genotypes current working directory, directory specified dest_path argument. genotypes stored compressed .zip file, need de-compressed order used plink.","code":"downloaded_archive <- get_smarter_genotypes( \"Sheep\", \"OAR3\" )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/smarterapi.html","id":"subset-genotypes-relying-samples","dir":"Articles","previous_headings":"","what":"Subset genotypes relying samples","title":"Using smarterapi","text":"identified samples interest, can extract genotypes proper file using plink. First, write TSV file breed_code smarter_id columns. example, using samples selected dplyr: Next, need collect proper plink options order loose information plink file. parameters used generate genotype files tracked info endpoint. example, get parameters Sheep genotypes: finally can call plink providing sample list:","code":"selected_sheeps_ids <- italian_background_sheeps %>% dplyr::select( \"breed_code\", \"smarter_id\" ) write.table( selected_sheeps_ids, file = \"selected_sheeps.txt\", quote = FALSE, sep = \"\\t\", row.names = FALSE, col.names = FALSE ) info <- get_smarter_info() plink_opts <- paste0(info$plink_specie_opt$Sheep, collapse = \" \") plink_opts #> [1] \"--chr-set 26 no-xy no-mt --allow-no-sex\" plink --chr-set 26 no-xy no-mt --allow-no-sex \\ --bfile SMARTER-OA-OAR3-top-0.4.10 \\ --keep selected_sheeps.txt \\ --out selected_sheeps-OAR3-top-0.4.10 \\ --make-bed"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"assembly-versions","dir":"Articles","previous_headings":"","what":"Assembly versions","title":"Working with SNPs","text":"One aim project manage genotypes different assembly version. means collect data different assemblies (due data generated), different sources (Affymetrix, Illumina, WGS) different file formats. Genotypes normalized order consistent accross data sources stored one genotype file specie. Currently four assembly versions managed, two sheep dataset two goat dataset. Information assemblies data sources can retrieved backend info endpoint get_smarter_info() function:","code":"info <- get_smarter_info() assemblies <- as.data.frame(t(as.data.frame(info$working_assemblies))) names(assemblies) <- c(\"name\", \"source\")"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"collect-data-from-an-assembly","dir":"Articles","previous_headings":"","what":"Collect data from an assembly","title":"Working with SNPs","text":"get_smarter_variants() two mandatory parameters, species assembly, accept additional parameters (see one variant endpoints information). example can search variants snp name rs id (latter exists): Table continues Table continues Please, refer get_smarter_info() working_assemblies idea assemblies supported SMARTER-database. Data come SNPchiMp v.3 like Sheep OAR3 assembly, support illumina forward attribute. example following SNP: Table continues Table continues T/C forward strand OAR3: means reversed probe aligned genome (infer bottom illumina strand attribute SNP). Genotypes SMARTER-database converted using illumina top coding convention, find SNP /G SMARTER-database reference sequence ’s T/C.","code":"snp <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list( name = \"snp12965-scaffold1499-3295573\" ) ) snp <- get_smarter_variants( species = \"Sheep\", assembly = \"OAR3\", query = list( rs_id = \"rs10721092\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"fetch-variants-by-region","dir":"Articles","previous_headings":"","what":"Fetch Variants by region","title":"Working with SNPs","text":"Variants endpoint support query regions, using :- format, example: Table continues Table continues ","code":"variants <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list( region = \"1:1-100000\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/articles/variants.html","id":"fetch-variants-by-chip-name","dir":"Articles","previous_headings":"","what":"Fetch Variants by chip name","title":"Working with SNPs","text":"can download variants certain chip: please consider require lot time memory, since store 600K SNPs smarter database. First, collect available chips SMARTER-database, example Sheep species: collect SNPs certain chip providing SMARTER chip name. Please, consider download 50K SNP chip take lot time","code":"sheep_chips <- get_smarter_supportedchips(query = list(species = \"Sheep\")) variants <- get_smarter_variants( species = \"Sheep\", assembly = \"OAR3\", query = list( chip_name = \"IlluminaOvineSNP50\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Paolo Cozzi. Author, maintainer.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Cozzi P (2024). smarterapi: Fetch SMARTER Data REST API. R package version 0.2.0, https://cnr-ibba.github.io/r-smarter-api/.","code":"@Manual{, title = {smarterapi: Fetch SMARTER Data Through REST API}, author = {Paolo Cozzi}, year = {2024}, note = {R package version 0.2.0}, url = {https://cnr-ibba.github.io/r-smarter-api/}, }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"smarterapi","dir":"","previous_headings":"","what":"Fetch SMARTER Data Through REST API","title":"Fetch SMARTER Data Through REST API","text":"goal smarterapi collect data SMARTER REST API provide user dataframe. Get information online vignette.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Fetch SMARTER Data Through REST API","text":"smarterapi package available GitHub can installed source package alternative using devtools package, example: installation, can load package R session:","code":"# install devtools if needed # install.packages(\"devtools\") devtools::install_github(\"cnr-ibba/r-smarter-api\") # import this library to deal with the SMARTER API library(smarterapi)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"smarter-credentials","dir":"","previous_headings":"","what":"SMARTER credentials","title":"Fetch SMARTER Data Through REST API","text":"public release SMARTER data, ’s need provide credentials access data. used credentials access data, need install latest version smarterapi package.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"querying-the-smarter-backend","dir":"","previous_headings":"","what":"Querying the SMARTER backend","title":"Fetch SMARTER Data Through REST API","text":"smarterapi provides set functions used fetch data SMARTER-backend endpoints described api documentation returning data.frame object. example, get_smarter_datasets lets query Datasets endpoint, get_smarter_samples able query parse Sample endpoints response. smarterapi function documented R can get help function like R functions. two types parameters required fetch data SMARTER-backend: species parameter, can Goat Sheep respectively goat sheep Samples Variants endpoints, query parameter can provided get_smarter_ function. species parameter mandatory order query endpoint specific Goat Sheep, query parameter optional need specified list() object order limit query data particular. example, need foreground genotypes datasets, can collect data like : require background goat samples, can like : full option list available endpoint available SMARTER-backend swagger documentation: option name use name described parameters, description parameter types can give hints exploit endpoint properly. instance, parameters described array objects can specified multiple times:","code":"datasets <- get_smarter_datasets( query = list(type = \"genotypes\", type = \"foreground\")) goat_samples <- get_smarter_samples( species = \"Goat\", query = list(type = \"background\")) > goat_breeds <- get_smarter_breeds(query = list(species=\"Goat\", search=\"land\")) > goat_breeds[c(\"name\",\"code\")] name code 1 Rangeland RAN 2 Landrace LNR 3 Landin LND 4 Icelandic goat ICL > goat_samples <- get_smarter_samples( species = \"Goat\", query = list( breed_code=\"RAN\", breed_code=\"LNR\", breed_code=\"LND\", breed_code=\"ICL\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Fetch SMARTER Data Through REST API","text":"basic example shows collect data SMARTER REST API Italian goats belonging Adaptmap dataset: examples vignettes, example collect data Variants endpoints work geographic coordinates.","code":"# collect the dataset by providing part of the name with the search option: # since we are forcing to collect only background genotypes, only one dataset # will be returned datasets <- get_smarter_datasets( query = list( species = \"Goat\", search = \"adaptmap\", type = \"genotypes\", type = \"background\" ) ) # get the dataset id adatpmap_id <- datasets[\"_id.$oid\"][1] # collect all the italian goats from the adaptmap dataset. Using the dataset id # to filter out all the samples belonging to this dataset and the country option # to filter out only the italian samples for this dataset adaptmap_goats <- get_smarter_samples( species = \"Goat\", query = list( dataset = adatpmap_id, country = \"Italy\" ) )"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Breeds — get_smarter_breeds","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Fetch SMARTER REST API breeds endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Breeds — get_smarter_breeds","text":"","code":"get_smarter_breeds(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Breeds — get_smarter_breeds","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Returns dataframe selected breeds","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Breeds — get_smarter_breeds","text":"Breeds endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"Sheep\" breeds need provide list(species=\"Sheep\") query parameter. Endpoint supports query breed code name. addition, can search using pattern search parameter. See Swagger Breeds endpoint information breeds endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_breeds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Breeds — get_smarter_breeds","text":"","code":"selected_breed <- get_smarter_breeds(query = list(code = \"TEX\")) selected_breeds <- get_smarter_breeds(query = list(search = \"mer\")) if (FALSE) { all_breeds <- get_smarter_breeds() sheep_breeds <- get_smarter_breeds(query = list(species = \"Sheep\")) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Countries — get_smarter_countries","title":"Get SMARTER Countries — get_smarter_countries","text":"Fetch SMARTER REST API countries endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Countries — get_smarter_countries","text":"","code":"get_smarter_countries(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Countries — get_smarter_countries","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Countries — get_smarter_countries","text":"Returns dataframe selected countries","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Countries — get_smarter_countries","text":"Contries endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get countries \"Sheeps\" need provide list(species=\"Sheep\") query parameter. Endpoint supports searches two tree ISO codes using alpha_2 alpha3 parameters respectively. addition, can search using pattern search parameter. See Swagger Countries endpoint information breeds endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_countries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Countries — get_smarter_countries","text":"","code":"italy <- get_smarter_countries(query = list(name = \"Italy\")) france <- get_smarter_countries(query = list(alpha_2 = \"FR\")) if (FALSE) { # get countries where there are sheeps sheep_countries <- get_smarter_countries(query = list(species = \"Sheep\")) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Datasets — get_smarter_datasets","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Fetch SMARTER REST API datasets endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Datasets — get_smarter_datasets","text":"","code":"get_smarter_datasets(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Datasets — get_smarter_datasets","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Returns dataframe selected datasets","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Datasets — get_smarter_datasets","text":"Datasets endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"Sheep\" datasets need provide list(species=\"Sheep\") query parameter. Endpoint supports query type chip_name. addition, can search using pattern file contents search parameter. See Swagger Datasets endpoint information datasets endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_datasets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Datasets — get_smarter_datasets","text":"","code":"genotypes_foreground <- get_smarter_datasets( query = list(type = \"foreground\", type = \"genotypes\") ) adaptmap_genotypes <- get_smarter_datasets( query = list(species = \"Goat\", search = \"adaptmap\", type = \"genotypes\") ) if (FALSE) { all_datasets <- get_smarter_datasets() }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Genotypes — get_smarter_genotypes","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"Retrieve genotypes data SMARTER database. information supported assemblies returned (see get_smarter_info information).","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"","code":"get_smarter_genotypes(species, assembly, dest_path = NULL)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"species smarter species (\"Goat\", \"Sheep\") assembly smarter working assembly species dest_path path file downloaded. NULL, file downloaded current working directory","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"character string path downloaded file returned","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"about-smarter-supported-assemblies","dir":"Reference","previous_headings":"","what":"About SMARTER supported assemblies","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"Currently SMARTER supports OAR3 OAR4 assemblies Sheep CHI1 ARS1 assemblies goat. Genotypes provided PLINK binary format, compressed zip file.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_genotypes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Genotypes — get_smarter_genotypes","text":"","code":"if (FALSE) { # get genotypes for sheep OAR3 in current directory get_smarter_genotypes(species = \"Sheep\", assembly = \"OAR3\") }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER GeoJSON Samples — get_smarter_geojson","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"Fetch SMARTER REST API samples GPS coordinates return simple features.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"","code":"get_smarter_geojson(species, query = list(), polygons = NULL)"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"species smarter species (\"Goat\", \"Sheep\") query list query arguments polygons sf object polygons filter samples","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"sf data object","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_geojson.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER GeoJSON Samples — get_smarter_geojson","text":"","code":"if (FALSE) { # required to execute pipe operations and draw examples library(dplyr) library(leaflet) # get goat samples with GPS coordinates as sf object goat_data <- get_smarter_geojson( species = \"Goat\", query = list( type = \"background\", country = \"Italy\" ) ) # leaflet doesn't handle MULTIPOINT data (https://github.com/rstudio/leaflet/issues/352) # Cast them into point considering only the first objects # (https://r-spatial.github.io/sf/reference/st_cast.html) goat_data <- goat_data %>% sf::st_cast(\"POINT\", do_split=FALSE) # draw samples in a leaflet map using markerCluser leaflet(data = goat_data) %>% leaflet::addTiles() %>% leaflet::addMarkers( clusterOptions = leaflet::markerClusterOptions(), label = ~smarter_id ) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Info — get_smarter_info","title":"Get SMARTER Info — get_smarter_info","text":"Collect information smarter database status returns values list","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Info — get_smarter_info","text":"","code":"get_smarter_info()"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Info — get_smarter_info","text":"list object SMARTER database information","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"about-smarter-database-info-endpoint","dir":"Reference","previous_headings":"","what":"About SMARTER database info endpoint","title":"Get SMARTER Info — get_smarter_info","text":"info endpoint contains information status database information required understand genotypes updated . example, SMARTER database current version last_updated recent genotype file, retrive information samples included genotype file. case, download recent copy SMARTER database FTP site. plink_specie nested list contains plink species options used generate genotype data. want modify genotype file compatible SMARTER database may want use specie options","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Info — get_smarter_info","text":"","code":"smarter_status <- get_smarter_info() smarter_version <- smarter_status$version"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Samples — get_smarter_samples","title":"Get SMARTER Samples — get_smarter_samples","text":"Fetch SMARTER REST API samples endpoint returns results dataframe.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Samples — get_smarter_samples","text":"","code":"get_smarter_samples(species, query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Samples — get_smarter_samples","text":"species smarter species (\"Goat\", \"Sheep\") query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Samples — get_smarter_samples","text":"Returns dataframe selected samples","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"passing-additional-parameters","dir":"Reference","previous_headings":"","what":"Passing additional parameters","title":"Get SMARTER Samples — get_smarter_samples","text":"Samples endpoint supports additional parameters making queries. Additional parameters need passed list using query parameter. example, get \"foreground\" samples need provide list(type=\"foreground\") query parameter. Endpoint supports lot parameters can provided multiple times See Swagger Samples endpoint information samples endpoint","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_samples.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Samples — get_smarter_samples","text":"","code":"italian_sheeps <- get_smarter_samples( \"Sheep\", query = list(country = \"Italy\") ) merino_sheeps <- get_smarter_samples(\"Sheep\", query = list(breed = \"Merino\")) selected_goats <- get_smarter_samples( \"Goat\", query = list(country = \"Italy\", breed_code = \"ORO\", breed_code = \"GAR\") ) if (FALSE) { foreground_goats <- get_smarter_samples( \"Goat\", query = list(type = \"foreground\") ) all_sheep_samples <- get_smarter_samples(\"Sheep\") }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Supported Chips — get_smarter_supportedchips","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"Collect information chip data currently managed SMARTER database.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"","code":"get_smarter_supportedchips(query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"Returns dataframe selected chips","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_supportedchips.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Supported Chips — get_smarter_supportedchips","text":"","code":"chips <- get_smarter_supportedchips() if (FALSE) { # collect data on chips get_smarter_supportedchips() # retrieve samples relying on chip used samples <- get_smarter_samples( species = \"Sheep\", query = list(chip_name = \"AffymetrixAxiomOviCan\") ) }"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":null,"dir":"Reference","previous_headings":"","what":"Get SMARTER Variants — get_smarter_variants","title":"Get SMARTER Variants — get_smarter_variants","text":"Retrieve information SMARTER SNPs. information supported assemblies returned (see get_smarter_info information).","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get SMARTER Variants — get_smarter_variants","text":"","code":"get_smarter_variants(species, assembly, query = list())"},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get SMARTER Variants — get_smarter_variants","text":"species smarter species (\"Goat\", \"Sheep\") assembly smarter working assembly species query list query arguments","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get SMARTER Variants — get_smarter_variants","text":"Returns dataframe selected variants","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"about-smarter-supported-assemblies","dir":"Reference","previous_headings":"","what":"About SMARTER supported assemblies","title":"Get SMARTER Variants — get_smarter_variants","text":"Currently SMARTER supports OAR3 OAR4 assemblies Sheep CHI1 ARS1 assemblies goat. assembly, evidences used create smarter database returned. Retrieving variant certain assembly species require time memory.","code":""},{"path":"https://cnr-ibba.github.io/r-smarter-api/reference/get_smarter_variants.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get SMARTER Variants — get_smarter_variants","text":"","code":"# get variants by region (chrom:start-end) variants <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\", query = list(region = \"1:1-100000\") ) if (FALSE) { # get available assemblies from info endpoint names(get_smarter_info()$working_assemblies) # collect variants from goat ARS1 endpoint (takes a lot of time) ars1_variant <- get_smarter_variants( species = \"Goat\", assembly = \"ARS1\" ) }"}]
Cozzi P (2024). smarterapi: Fetch SMARTER Data Through REST API. -R package version 0.2.0.9000, https://cnr-ibba.github.io/r-smarter-api/. +R package version 0.2.0, https://cnr-ibba.github.io/r-smarter-api/.
@Manual{, title = {smarterapi: Fetch SMARTER Data Through REST API}, author = {Paolo Cozzi}, year = {2024}, - note = {R package version 0.2.0.9000}, + note = {R package version 0.2.0}, url = {https://cnr-ibba.github.io/r-smarter-api/}, }