-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from puja-trivedi/create_docs_20241003
Create docs 20241003
- Loading branch information
Showing
10 changed files
with
269 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.. _linkml_trimmer: | ||
|
||
LinkML Schema Trimmer | ||
---------------------- | ||
|
||
Overview | ||
......... | ||
Generate a trimmed version of a LinkML schema by only including a specific subset of classes, slots, and enums. | ||
|
||
|
||
Command Line | ||
............. | ||
|
||
``bkbit linkml-trimmer`` | ||
,,,,,,,,,,,,,,,,,,,,,,,, | ||
|
||
.. code-block:: bash | ||
$ bkbit linkml-trimmer [OPTIONS] SCHEMA | ||
Options | ||
,,,,,,, | ||
|
||
``-c, --classes <classes>`` | ||
**Required option** | ||
|
||
List of 'classes' to include in the trimmed schema. | ||
|
||
**Note**: Classes must be separated by commas and enclosed in quotes. | ||
``-s, --slots <slots>`` | ||
List of 'slots' to include in the trimmed schema. | ||
|
||
**Note**: Slots must be separated by commas and enclosed in quotes. | ||
|
||
``-e, --enums <enums>`` | ||
List of 'enums' to include in the trimmed schema. | ||
|
||
**Note**: Enums must be separated by commas and enclosed in quotes. | ||
|
||
Arguments | ||
,,,,,,,,, | ||
|
||
``SCHEMA`` | ||
Required argument | ||
|
||
|
||
Examples | ||
......... | ||
|
||
Example 1: Trim `Biolink Schema <https://biolink.github.io/biolink-model/>`_ | ||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
|
||
.. code-block:: bash | ||
$ bkbit linkml-trimmer --classes "gene, genome, organism taxon, thing with taxon, material sample, procedure, entity, activity, named thing" biolink.yaml > bican-biolink.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
.. _spreadsheet_converter: | ||
|
||
Spreadsheet to LinkML Schema | ||
============================= | ||
|
||
Overview | ||
......... | ||
Create a yaml linkml model from set of spreadsheets. It can use either tsv files or Google Sheet as an input. | ||
|
||
The default behavior is to run the converter starting with tsv files, specifying their paths as arguments, for example, model_spreadsheets/*tsv. | ||
If ``--gsheet`` option is used, the converter starts from downloading spreadsheets from Google Sheets. | ||
The argument must be a YAML file that has ``gsheet_id`` and a list of ``sheets`` with ``gid`` (a unique identifier for each individual sheet) | ||
and ``name`` (optionally) that will be used as a name of the downloaded TSV file (if not available ``gid`` wil be used). | ||
|
||
Command Line | ||
............. | ||
|
||
``bkbit schema2model`` | ||
,,,,,,,,,,,,,,,,,,,,,,, | ||
|
||
.. code-block:: bash | ||
$ bkbit schema2model [OPTIONS] SPREADSHEETS | ||
**Options** | ||
|
||
``-o, --output <output>`` | ||
Path for the yaml output file. | ||
|
||
``-t, --template <template>`` | ||
Optional template yaml file with standard classes that will be added to the model. | ||
|
||
``--gsheet, --no-gsheet`` | ||
Using Google Sheet as a source. If True, the arguments MUST be a yaml file with gsheet_id | ||
and gid of all the sheets. | ||
|
||
Default: | ||
False | ||
|
||
``--gsheet-download-dir <gsheet_download_dir>`` | ||
Path used to download Google Sheets. If not specified a default directory will be created. | ||
|
||
``--fix_tsv, --no-fix_tsv`` | ||
Fixing known issues with tsv files from Google Sheets. | ||
|
||
Default: | ||
True | ||
|
||
``--fix_tsv_save, --no-fix_tsv_save`` | ||
Keeping the fixed files, relevant only if fix_tsv is True | ||
|
||
Default: | ||
False | ||
|
||
``--repair, --no-repair`` | ||
Standard Linkml auto-repair schema | ||
|
||
Default: | ||
True | ||
``--fix_bican_model, --no-fix_bican_model`` | ||
Automated repair specifically for the BICAN YAML model | ||
|
||
Default: | ||
True | ||
|
||
**Arguments** | ||
|
||
``SPREADSHEETS`` | ||
Required argument | ||
|
||
Examples | ||
......... | ||
|
||
Example 1: Schema defined in tsv files | ||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
|
||
.. code-block:: bash | ||
# Run schema2model command | ||
$ bkbit schema2model -o model.yaml source_model/spreadsheets/*.tsv | ||
Example 2: Schema defined in Google Sheets | ||
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
|
||
.. code-block:: bash | ||
# Run schema2model command | ||
$ bkbit schema2model -o model.yaml --gsheet --gsheet-download-dir source_model/spreadsheets source_model/gsheet.yaml |