{"id":30019813,"url":"https://github.com/veupathdb/lib-jvm-blast","last_synced_at":"2026-05-18T19:47:48.618Z","repository":{"id":42467606,"uuid":"362472079","full_name":"VEuPathDB/lib-jvm-blast","owner":"VEuPathDB","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-09T16:04:31.000Z","size":1946,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-08-06T09:50:42.406Z","etag":null,"topics":["blast","cli","json","kotlin","library","serialization"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VEuPathDB.png","metadata":{"files":{"readme":"readme.adoc","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-04-28T13:11:31.000Z","updated_at":"2022-10-12T13:57:00.000Z","dependencies_parsed_at":"2023-11-09T16:54:17.171Z","dependency_job_id":null,"html_url":"https://github.com/VEuPathDB/lib-jvm-blast","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/VEuPathDB/lib-jvm-blast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEuPathDB%2Flib-jvm-blast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEuPathDB%2Flib-jvm-blast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEuPathDB%2Flib-jvm-blast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEuPathDB%2Flib-jvm-blast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VEuPathDB","download_url":"https://codeload.github.com/VEuPathDB/lib-jvm-blast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VEuPathDB%2Flib-jvm-blast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33189278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blast","cli","json","kotlin","library","serialization"],"created_at":"2025-08-06T01:21:35.694Z","updated_at":"2026-05-18T19:47:48.612Z","avatar_url":"https://github.com/VEuPathDB.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"= lib-jvm-blast\n:source-highlighter: highlightjs\n:toc: macro\n\nimage:https://img.shields.io/badge/docs-dokka-green[link=\"https://veupathdb.github.io/lib-jvm-blast/dokka/\"]\nimage:https://img.shields.io/badge/docs-javadoc-blue[link=\"https://veupathdb.github.io/lib-jvm-blast/javadoc/\"]\n\n[WARNING]\n====\nThis repository has been migrated into the link:https://github.com/VEuPathDB/service-multi-blast[MultiBlast Monorepo]\n\nMaven packages will continue to be published to this repository as per GitHub's\nrules, however all future code updates will be published to the MultiBlast\nMonorepo.\n====\n\ntoc::[]\n\nLibrary for parsing, serializing, and validating JSON BLAST+ cli configs.\n\nConfigs may be constructed or parsed from JSON and written out to several\nformats including a CLI call string.\n\nSupports ncbi/blast 2.11.0, 2.12.0, and 2.13.0\n\nRequires Java 16+.\n\n\n== Usage\n\n.Building a CLI Command\n[source, kotlin]\n----\nval config = Blast.blastn()\n\nconfig.task      = BlastNTaskType.DiscontiguousMegablast\nconfig.queryFile = \"my-query.txt\"\nconfig.dbFile    = \"my-blast-db\"\n\nconfig.toCliString() == \"blastn -task 'dc-megablast' -query 'my-query.txt' -db 'my-blast-db'\"\n----\n\n\n.Serializing to JSON\n[source, kotlin]\n----\nval config = Blast.blastp()\n\nconfig.task      = BlastPTaskType.BlastPFast\nconfig.queryFile = \"my-query.txt\"\nconfig.dbFile    = \"my-blast-db\"\n\nconfig.toJson() == \"\"\"\n{\n  \"tool\"   : \"blastp\",\n  \"-task\"  : \"blastp-fast\",\n  \"-query\" : \"my-query.txt\"\n  \"-db\"    : \"my-blast-db\"\n}\n\"\"\"\n----\n\n\n.Deserializing from JSON\n[source, kotlin]\n----\nval inputJson = \"\"\"\n{\n  \"tool\"   : \"blastx\",\n  \"-task\"  : \"blastx-fast\"\n  \"-query\" : \"my-query.txt\"\n  \"-db\"    : \"my-blast-db\"\n}\n\"\"\"\n\nval config = Blast.blastx(inputJson) // or Blast.of(inputJson) if the tool is unknown.\n\nassert(config.task == BlastXTaskType.BlastXFast)\nassert(config.queryFile == \"my-query.txt\")\nassert(config.dbFile == \"my-blast-db\")\n----\n\n== Default Values\n\nThis library knows all the documented default values for all  flags for each\nBLAST+ tool, and will omit those values from serialized forms.  This is done to\nkeep the serialized form of each config down to the bare minimum as the BLAST+\ntools have a large number of flags and options.\n\n\n.Setting Default Values\n[source, kotlin]\n----\nval config = Blast.deltablast()\n\nconfig.seg            = SegDelta.no()\nconfig.gapTrigger     = 22.0\nconfig.compBasedStats = CompBasedStatsDeltaValue.CompBasedStats\n\nconfig.toCliString() == \"deltablast\"\n\nconfig.toJson() == \"\"\"\n{\n  \"tool\" : \"deltablast\"\n}\n\"\"\"\n----\n\n\n== Validation\n\n\n=== Field Level Validation\n\nEach field that has a documented set or range of valid values validates the set\nvalue on construction, preventing an invalid flag being used when building a\nBLAST+ tool configuration.\n\nIf an invalid value is used when constructing a field, an\n`IllegalArgumentException` will be thrown.\n\n\n[source, kotlin]\n----\nval field = LineLength(-1) // Throws an exception\n----\n\n\n=== Config Level Validation\n\nIn addition to the field level validation, whole configs come with a `validate`\nmethod that builds a list of errors for flags that are incompatible with one\nanother or require an additional flag that is missing.\n\nThis validation method returns a `Map` of all the errors encountered keyed on\nthe name of the relevant flag.\n\n[source, kotlin]\n----\nval config = Blast.blastFormatter()\n\nconfig.archive = \"some-archive\"\nconfig.rid     = \"some-request-id\"\n\nval errors = config.validate()\n\nerrors.toJson() == \"\"\"\n{\n  \"-archive\" : [ \"Incompatible with -rid\" ],\n  \"-rid\"     : [ \"Incompatible with -archive\" ]\n}\n\"\"\"\n\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveupathdb%2Flib-jvm-blast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveupathdb%2Flib-jvm-blast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveupathdb%2Flib-jvm-blast/lists"}