Building Applications Overview
This article gives an introduction to creating and editing applications on BioLib:
- Getting started
- Application Settings, naming and visibility
- Adding code and source files
- Setting up input arguments
- Configuring modules
- Adding a citation
- Advanced settings
- Publishing and sharing your application
There is also a video tutorial for creating your first application
All you need to get started building applications on BioLib is a free account. If you don't have one already,
you can create an account here.
To start a project, make sure you are signed in to your account, then click the "Create" button in the top right-hand
corner of your home screen
Application Settings, Naming and Visibility
By default, your application will be named My-App followed by a unique string of random letters. The name of an
application can be changed by clicking the App Settings button in the top right-hand corner.
By default, the visibility of a new application is set to "draft", meaning that only you can find, view, and run the
application. The visibility of the application can be changed under "App Settings", where you can also make the code
open-source. Making the application open-source will allow any user with access to download all the source files.
After choosing a template, your application will be pre-populated with:
- Source File: You can edit and add source files directly in the editor window or upload source files from your
local file system. On BioLib there are currently executors for Python 3, Rust, C/C++, R, WebAssembly as well as a
number of machine learning frameworks. You can find more in-depth information about
supported languages and libraries here.
- License: Here, you should include a relevant license governing how other BioLib users may use your application.
The license file can be viewed by other users on the application page.
- README: The README file is what forms the core content of the application page and is where you provide the
description and documentation available to the application user. The file is rendered as Markdown so you can add
headings, formatting, code snippets etc. This page gathers some
tips on how to structure an application page.
- BioLib config.yml file: The config file is for advanced users, and most users never have to edit it. You can
find documentation on how to use the config file here.
The "Input Arguments" section is where you configure the input options that the users of your application will be
shown, and how the inputs they provide will be passed on to the application.
Input Key: In this field, you provide the necessary flag for arguments in your code. Make sure this field matches
exactly the naming in the code!
For example, if your code has an argument called index and it is parsed as follows:
parser.add_argument('--index', dest='index', default=0)
Then the Input Key field should be
Input Rendering: This dropdown configures how the input options are shown to the users of your application:
- Text Input - Text field where users can copy & paste inputs
- Hidden from user - Allows you to provide a predefined argument without the user being able to view or change
- Toggle - Provides the user with an on/off toggle switch. The toggle will pass the values defined by the application
creator under on / off values
- File Input - Button users can press to upload a file
- Number Input - Field where users can input number
- Radio Select - Button for mutually exclusive options
- Dropdown Select - Dropdown menu where user can choose between option provide by you
- Option Display Name / Option Value: If an input is rendered as a radio or dropdown select, with the
"Option Display Name" field you specify what each of the options within the dropdown/ radio select menu will be called,
and with the "Option Value" field you specify what value will be passed to the program when a given menu point is
- Input Description: The description you provide in this field will be shown above the input options that the user
of your application sees. Help your users by providing a specific instructive description so the users will understand
how to apply the setting or provide the input.
- Require users to specify this input?: Putting this toggle to on will force the users of your application to
provide an input before running the application.
- Default Value: You have the option to provide a default value or file. Providing an example input can often be
very helpful for the users of your application.
For more detailed documentation on how inputs work on BioLib, refer to
Applications on BioLib are structured in modules. You can think of modules as the BioLib equivalent of locally
installed programs: the declared modules are the programmes that are available for your application to run.
You can find more in-depth documentation about
images and supported languages here.
You can provide a citation for an application that users should cite whenever they publish work making use of the
application. The citation will be displayed on the application page, alongside the description of the application.
For more about citations on BioLib, refer to this page.
- Path to description file: if you want the description of your application to be rendered on the basis of a
different Markdown file than the
README.md, that is used as default, you can specify that that file here.
- Path to license file: if you want the license for your application to be a different file than the file named
LICENSE you can specify the path to that file here.
- stdin: If putting this toggle to on, the user of your application will be presented with the option to upload a
file or provide input in a text field, which will be passed as Standard In to your application.
- Output: You can deliver or return outputs or results from your application to your user either by (a) Printing
or returning output (user will be presented with output in the browser window), or (b) writing to disk
(user can download output files). Once your application has been run, the user will be presented with a result page in
the browser window showing anything you print during execution (stdout). The "Output Type" option under advanced
settings refers to the output delivered using stdout. Note that this setting does not change the actual output file;
it merely tells the system how to render that output. For example, if your output is a Markdown file you should choose
Markdown. Any file your application writes to disk will be available for the user to download once the execution of
your application has been completed. For further information about how to create different types of outputs on BioLib
refer to this page.
- config.yml file: Here, you can read more about using the
config.yml file for advanced or automated configuration of applications.
Publishing and Sharing Your Application
To share or publish your application, go to "App Settings" and change the visibility from "draft" to "public"
(to make it discoverable by all BioLib users) or to "private" to share it using a private link.
We encourage all developers to test that their application works as expected before changing its state to "public".
Can't Find an Answer to Your Question?
And remember, If you have any questions that you cannot find an answer for, do not hesitate to ping us by sending us
an email at firstname.lastname@example.org.