Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Generate random BEL nanopubs

Tony Bargnesi edited this page May 18, 2016 · 2 revisions

Starting with bel.rb 0.5.0 you can generate random BEL nanopubs.

First you will need to install the latest bel gem with:

gem install bel 

Then use the bel generate command to create random BEL nanopubs.

$ bel generate --help
Usage: bel [OPTIONS]... generator [OPTIONS]
Generates random BEL Nanopubs and serializes through a bel.rb translator.

Options:
  -l, --limit=<i>         The number of BEL Nanopubs to generate; default is
                          no limit. (Default: -1)
  -t, --translator=<s>    ID for bel.rb translator; defaults to "bel"
                          (default: bel)
  -s, --sample            Sample namespace values and annotations from BEL
                          resources.
  -h, --help              Show this message

Examples

  • Generate random BEL nanopubs indefinitely.
bel generate
  • Generate 100,000 random BEL nanopubs and translate to BNJ (BEL Nanopub JSON) format. Use --sample to choose actual namespace and annotation values for your nanopubs.
bel generate --limit 100000 --sample --translator json > my_nanopubs.json
  • Generate 20000 random BEL nanopubs, without sampling, then translate to JSON Graph Format.
bel generate --limit 20000 --translator jgf > my_nanopubs.jgf

Note: The --sample option increases the time needed for each nanopub.

Clone this wiki locally