{"id":20930753,"url":"https://github.com/intermine/biovalidator","last_synced_at":"2025-10-16T00:24:03.407Z","repository":{"id":136990264,"uuid":"186820553","full_name":"intermine/biovalidator","owner":"intermine","description":"a library to validate biological data formats","archived":false,"fork":false,"pushed_at":"2019-08-21T19:18:35.000Z","size":1793,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T06:51:15.248Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intermine.png","metadata":{"files":{"readme":"README.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-15T12:21:01.000Z","updated_at":"2022-06-09T17:31:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"efc8591f-bc8a-493c-9d9a-3fabd12fbf8c","html_url":"https://github.com/intermine/biovalidator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intermine%2Fbiovalidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intermine%2Fbiovalidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intermine%2Fbiovalidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intermine%2Fbiovalidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intermine","download_url":"https://codeload.github.com/intermine/biovalidator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254013134,"owners_count":21999365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-18T21:36:15.655Z","updated_at":"2025-10-16T00:23:58.369Z","avatar_url":"https://github.com/intermine.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BioValidator ![master build status](https://travis-ci.org/deepakkumar96/biovalidator.svg?branch=master)\n\nBioValidator is a schema validator that validates biological file format like Fasta, GFF, etc.\nCurrently, it supports FASTA, GFF3, and CSV file formats\n\n### Usage\n\nThe most simple way to validate supported file types is to use ValidatorHelper provided by library.\u003cbr/\u003e\nExample: \nArguments in the below validate method \n 1. filename: absolute file path\n 2. validator-type: type of validator\n 3. isStrict: whether to validate in strict mode or permissive \n \n```java\nValidationResult validationResult = ValidatorHelper.validate(\"filepath\", ValidatorType.FASTA, true);\nOR\nValidationResult validationResult = ValidatorHelper.validate(\"filepath\", \"fasta-dna\", true);\nOR\nValidationResult validationResult = ValidatorHelper.validateFasta(\"filepath\");\n```\n\n\nCheck whether file is valid or not:\n```java\nassertTrue(validationResult.isValid());\n```\n\nIf file contain errors or warnings:\n```java\nif (!validationResult.isValid()) {\n    validationResult.getErrorMessages().forEach(System.out::println);\n    validationResult.getWarningMessages().forEach(System.out::println);\n}\n```\n\n### Validation Result Customization\nValidator's behaviour and result and can be easily customize, ValidatorBuilder can be used to customize\nbehaviour and result of the validator.\u003cbr/\u003e\nExample: To validate a file by disabling warnings and continue validation even if error occurred\n\n```java\nValidator validator = ValidatorBuilder.withFile(\"path\", \"fasta-protein\")\n        .disableWarnings()\n        .enableErrors()\n        .disableStopAtFirstError()\n        .build();\n\nassertTrue(validator.validate().isValid());\nOR\nvalidator.validate(result -\u003e {\n    assertTrue(result.isValid());\n})\n```\n\n### Construct a raw validator:\n```java\nString dnaSequence = \"\u003e seqId | header name\\nACTGACTGACTG\";\n\nInputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(dnaSequence.getBytes()));\nValidator validator = new FastaValidator(isr, SequenceType.DNA);\nValidationResult result = validator.validate();\n\nassertTrue(result.isValid());\n```\n\n### Using biovalidator in your application\n\nMaven dependency\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.intermine\u003c/groupId\u003e\n  \u003cartifactId\u003ebiovalidator\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.2\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nGradle dependency\n```groovy\ncompile 'org.intermine:biovalidator:0.1.2'\n```\n\n### Using biovalidator as a command line utility\nStep 1: Get biovalidator Fat-Jar(either build from source or dirctly download from bintray\n* Build from source : $ ./gradlew createFatJar\n    * this will generate a jar named 'biovalidator-fat-x.x.x.jar' in 'build/libs' directory\n\n* Or Download fat-jar version of biovalidator from [bintray](https://bintray.com/intermineorg/biovalidator/biovalidator#files/org%2Fintermine%2Fbiovalidator%2F0.1.0)\n\nSetp 2: run as an executable jar file\n```shell\njava -jar biovalidator-fat-0.1.2.jar --help\n```\n\n### BioValidator Documentation\nDocumentation about BioValidator uses and validation rules: [https://github.com/intermine/biovalidator/wiki](https://github.com/intermine/biovalidator/wiki)\n\n### BioValidator JavaDoc\nJavaDocs link : [http://intermine.org/biovalidator/javadoc](http://intermine.org/biovalidator/javadoc)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintermine%2Fbiovalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintermine%2Fbiovalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintermine%2Fbiovalidator/lists"}