Code Monkey home page Code Monkey logo

libsbolj's Introduction

libSBOLj: SBOL Java library

libSBOLj provides the core Java interfaces and their implementation for the Synthetic Biology Open Language (SBOL). The library provides an API to work with SBOL objects, the functionality to read and write SBOL documents as XML/RDF files, and a validator to check the correctness of SBOL models.

Getting the libSBOLj source

  1. Create a GitHub account. link

  2. Download and set up Git. link

  3. Fork the libSBOLj repository and clone it to your machine. link

  4. Download and set up Maven. link

  5. Change to your libSBOLj directory via the command line and execute the following command:

    mvn package

This will create the libSBOLj JAR file (libSBOLj-core2-2.0.0-SNAPSHOT-withDependencies.jar) and place it into the core2/target subdirectory. link

Using libSBOLj

libSBOLj command line

libSBOLj comes with a command-line interface (CLI) that can be used to validate SBOL files. After you build the libSBOLj-core2-2.0.0-SNAPSHOT-withDependencies.jar as described above, you can use it to validate files as follows after changing to the core2/target subdirectory:

cd core2/target/
java -jar libSBOLj-core2-2.0.0-SNAPSHOT-withDependencies.jar <inputFile>

If validation is successful, the program will print the contents of the SBOL document. You can also output the result to a file.

java -jar libSBOLj-core2-2.0.0-SNAPSHOT-withDependencies.jar <inputFile> -o <outputFile>

If validation fails with an error, there will be a message printed about the validation error. In addition to checking all required validation rules, it will also check if the URIs are compliant and whether the SBOL document is complete (i.e., all referenced objects are contained within the file). These validation checks can be turned off with the -n and -i flags, respectively.

If the input file is an SBOL 1.1 file, then it will convert the file into an SBOL 2.0 file. This conversion should be provided a default URI prefix with the -p flag. It can also be provided a default version, if desired. Finally, the -t flag will insert the type of top level objects into the URI during conversion, if desired.

java -jar libSBOLj-core2-2.0.0-SNAPSHOT-withDependencies.jar <in> -o <out> -p <prefix> -v <version>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.