Coder Social home page Coder Social logo

No repertoires generated in output about ligo HOT 7 CLOSED

uio-bmi avatar uio-bmi commented on September 22, 2024
No repertoires generated in output

from ligo.

Comments (7)

pavlovicmilena avatar pavlovicmilena commented on September 22, 2024

Hi and thank you for trying out LIgO! I tried to replicate the issue, and I get an error related to one of the packages LIgO uses. I assume the same would be the issue in your test run. The package in question is currently being updated and will hopefully work in a day or two (I will write here when it's updated). In the meantime, I suggest running LIgO using Docker if possible. To do so from the same directory you have been trying so far, you only need to run the following command (and have Docker running in the background):

docker run -it -v $(pwd):/data --name my_container milenapavlovic/ligo ligo /data/specs.yaml /data/output/

This line assumes that the specification file is called specs.yaml. The results would be in the current directory/output folder.

For more information on running LIgO with Docker, please see the documentation here: https://uio-bmi.github.io/ligo/installation.html#use-ligo-with-docker.

Hope this helps!

from ligo.

pavlovicmilena avatar pavlovicmilena commented on September 22, 2024

Hi! This issue should be fixed now. If you reinstall LIgO with version 1.0.2 (latest version) and try to rerun, it should work:

pip install ligo==1.0.2

Or if you keep the current installation but reinstall the bionumpy package to 0.2.26:

pip install bionumpy==0.2.26

Please let me know if this works or if you have any other questions about LIgO. :)

from ligo.

agirgis3 avatar agirgis3 commented on September 22, 2024

Hi, unfortunately your suggestions do not work. I re-installed ligo and the recommended bionumpy version. The command continues to run, but without generating repertoires similarly to above. I am having trouble getting docker to work for unrelated reasons, but will work on getting the program working via docker.

If you are able to help me run the program without docker, please let me know!

from ligo.

ivargr avatar ivargr commented on September 22, 2024

Hi!

I'm just jumping in from the side here (as I'm part of developing the BioNumPy package that caused the initial problem). I'm pretty sure that the issue seems to be fixed for me as long as I have bionumpy 0.2.26. Running the example code then gives output as it should. Could you double check that you have exactly version 0.2.26 of BioNumPy, i.e. that

pip show bionumpy

shows Version: 0.2.26? :)

from ligo.

agirgis3 avatar agirgis3 commented on September 22, 2024

Hi, thanks for your help! Unfortunately I do have the appropriate bionumpy installed in my virtual environment:

my-username:~$ source ligo_env/bin/activate
(ligo_env) my-username:~$ pip show bionumpy
Name: bionumpy
Version: 0.2.26
Summary: Library for working with biological sequence data as numpy arrays.
Home-page: https://github.com/bionumpy/bionumpy
Author: Knut Rand
Author-email: [email protected]
License: MIT license
Location: /home/my-username/ligo_env/lib/python3.11/site-packages
Requires: npstructures, numpy
Required-by: ligo
(ligo_env) my-username:~$ 

While I am at it, here are all packages in the venv:

(ligo_env) my-username:~$ pip list
Package               Version
--------------------- ------------
airr                  1.3.1
bionumpy              0.2.26
certifi               2023.7.22
charset-normalizer    3.3.2
dill                  0.3.7
idna                  3.4
IMGTgeneDL            0.5.2
importlib-resources   6.1.0
ligo                  1.0.2
npstructures          0.2.13
numpy                 1.23.5
olga                  1.2.4
packaging             23.2
pandas                2.1.2
pip                   22.0.2
plotly                5.18.0
pystache              0.6.5
python-dateutil       2.8.2
pytz                  2023.3.post1
PyYAML                6.0.1
requests              2.31.0
scipy                 1.11.3
setuptools            59.6.0
six                   1.16.0
stitchr               1.1.2
tenacity              8.2.3
tzdata                2023.3
urllib3               2.0.7
yamlordereddictloader 0.4.2

from ligo.

pavlovicmilena avatar pavlovicmilena commented on September 22, 2024

Hi, and sorry for the delay! I have tried to replicate the issue, but the simulation runs without issues in my case (macOS, ligo=1.0.2, python=3.11.8). If you still have this issue and would like to run LIgO, could you share the specification you used? The console output should look something like this:

2024-04-02 21:07:08.061048: LIgO: parsing the specification...

2024-04-02 21:07:09.375856: Full specification is available at output/full_specs.yaml.

2024-04-02 21:07:09.375905: LIgO: starting the simulation...

2024-04-02 21:07:09.375944: Instruction 1/1 has started.
2024-04-02 21:07:11.907310: Generated 1000 sequences from skewed model for given V/J genes at output/my_sim_inst/sim_item1/gen_model/tmp_1.tsv.
2024-04-02 21:07:11.910138: Prepared sequences for processing and removed temporary file output/my_sim_inst/sim_item1/gen_model/tmp_1.tsv.
2024-04-02 21:07:11.916052: Generated 1000 background sequences, stored at output/my_sim_inst/sim_item2/gen_model/tmp_1.tsv.
2024-04-02 21:07:11.918868: Prepared sequences for processing and removed temporary file output/my_sim_inst/sim_item2/gen_model/tmp_1.tsv.
2024-04-02 21:07:11.919073: Generated 1000 background sequences, stored at output/my_sim_inst/sim_item3/gen_model/tmp_1.tsv.
2024-04-02 21:07:11.922069: Prepared sequences for processing and removed temporary file output/my_sim_inst/sim_item3/gen_model/tmp_1.tsv.
2024-04-02 21:07:12.016838: Removed 280 out of 1000 during rejection sampling for having more than 1 signal.
2024-04-02 21:07:12.020081: sim_item1 simulation finished
2024-04-02 21:07:12.026461: Removed 182 out of 1000 during rejection sampling for having more than 1 signal.
2024-04-02 21:07:12.029146: sim_item2 simulation finished
2024-04-02 21:07:12.029280: Removed 354 out of 1000 during rejection sampling for having more than 1 signal.
2024-04-02 21:07:12.032092: sim_item3 simulation finished
2024-04-02 21:07:12.072781: Instruction 1/1 has finished.
2024-04-02 21:07:12.074087: Generating HTML reports...
2024-04-02 21:07:12.077732: HTML reports are generated.
2024-04-02 21:07:12.077760: LIgO: finished simulation.

From this and from your initial output, it seems that the instruction is never started. This might be due to an issue with YAML formatting in the specification (if the instruction key is indented on the same level as the key my_sim_inst). Here is the quickstart specification with the correct formatting:

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 # remove signal-specific AIRs from the background
      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

I hope this helps! If not, I can investigate this further :)

from ligo.

pavlovicmilena avatar pavlovicmilena commented on September 22, 2024

I am closing this issue, assuming that the problem was that the instruction in the YAML specs was indented one step too much so the parser found no instructions to execute, hence no repertoires were generated. If it turns out to be something else, please feel free to reopen this or open a new issue :)

from ligo.

Related Issues (2)

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.