Skip to main content

LIgO is a tool for simulation of adaptive immune receptors and repertoires.

Project description

LIgO

Python application Docker

LIgO is a tool for simulation of adaptive immune receptors and repertoires, internally powered by immuneML. The README includes quick installation instructions and information on how to run a quickstart. For more detailed documentation, see https://uio-bmi.github.io/ligo/.

Installation

Requirements: Python 3.11 or later.

To install from PyPI (recommended), run the following command in your virtual environment:

pip install ligo

To install LIgO from the repository, run the following:

pip install git+https://github.com/uio-bmi/ligo.git

To be able to use Stitcher to export full-length sequences, download the database after installing LIgO:

stitchrdl -s human

Usage

To run LIgO simulation, it is necessary to define the YAML file describing the simulation. Here is an example YAML specification, that will create 300 T-cell receptors. The first 100 receptors will contain signal1 (which means all of these 100 receptors will have TRBV7 gene and AS somewhere in the receptor sequence), the next 100 receptors will contain signal2 (sequences will contain G/G with the gap denoted by '' sign and the gap size between 1 and 2 inclusive), and the final 100 receptors will not contain any of these signals.

  definitions:
    motifs:
      motif1:
        seed: AS
      motif2:
        seed: G/G
        max_gap: 2
        min_gap: 1
    signals:
      signal1:
        v_call: TRBV7
        motifs:
          - motif1
      signal2:
        motifs:
          - motif2
    simulations:
      sim1:
        is_repertoire: false
        paired: false
        sequence_type: amino_acid
        simulation_strategy: RejectionSampling
        remove_seqs_with_signals: true 
        sim_items:
          sim_item1: # group of AIRs with the same parameters
            generative_model:
              chain: beta
              default_model_name: humanTRB
              model_path: null
              type: OLGA
            number_of_examples: 100
            signals:
              signal1: 1
          sim_item2:
            generative_model:
              chain: beta
              default_model_name: humanTRB
              model_path: null
              type: OLGA
            number_of_examples: 100
            signals:
              signal2: 1
          sim_item3:
            generative_model:
              chain: beta
              default_model_name: humanTRB
              model_path: null
              type: OLGA
            number_of_examples: 100
            signals: {} # no signal
  instructions:
    my_sim_inst:
      export_p_gens: false
      max_iterations: 100
      number_of_processes: 4
      sequence_batch_size: 1000
      simulation: sim1
      type: LigoSim

To run this simulation, save the YAML file above as specs.yaml and run the following:

ligo specs.yaml output_folder

Note that output_folder (user-defined name) should not exist before the run.

Citing LIgO

If you are using LIgO in any published work, please cite:

Chernigovskaya, M.; Pavlović, M.; Kanduri, C.; Gielis, S.; Robert, P. A.; Scheffer, L.; Slabodkin, A.; Haff, I. H.; Meysman, P.; Yaari, G.; Sandve, G. K.; Greiff, V “Simulation of Adaptive Immune Receptors and Repertoires with Complex Immune Information to Guide the Development and Benchmarking of AIRR Machine Learning” bioRxiv, 2023, 2023.10.20.562936. https://doi.org/10.1101/2023.10.20.562936.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ligo-1.0.9.tar.gz (137.2 kB view details)

Uploaded Source

Built Distribution

ligo-1.0.9-py3-none-any.whl (207.0 kB view details)

Uploaded Python 3

File details

Details for the file ligo-1.0.9.tar.gz.

File metadata

  • Download URL: ligo-1.0.9.tar.gz
  • Upload date:
  • Size: 137.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for ligo-1.0.9.tar.gz
Algorithm Hash digest
SHA256 8a5db9404e294e0bf3363ee8fdb8b3f727697cdde9c2a99b641a5e0393ed66cf
MD5 03265838509c204b5c4587d8b2f2888a
BLAKE2b-256 e29e0f236fec5979be3bd96817179234a7ad8048bcee05c3e883b70093461e6b

See more details on using hashes here.

File details

Details for the file ligo-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: ligo-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 207.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for ligo-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba10e6be1b0ee2b13c8889db524cf157d0fb0025edaa61d9cf180560704eccd
MD5 9c7154379a12e1e6e83add8c7e2e24e9
BLAKE2b-256 83c324555791869019f3cb2386f0a3f34520347902f8b21904c965f5f5c8e6b8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page