Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Issue running prepare_mapped_reads.py #107

Open
ghost opened this issue Mar 3, 2021 · 4 comments
Open

Issue running prepare_mapped_reads.py #107

ghost opened this issue Mar 3, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2021

Hello, I'm kind of new to nanopore technology and wanted to to try taiyaki on algae sequences. Yet I have a problem when I'm running prepare_mapped_reads. First there are many warnings while running and after that I have an error on the version of my checkpoint model. Yet I got the pretrained model from the taiyaki_walkthrough folder.

Error :

File "/home/sangliera/taiyaki-env/bin/prepare_mapped_reads.py", line 141, in <module>
    main()
  File "/home/sangliera/taiyaki-env/bin/prepare_mapped_reads.py", line 108, in main
    kwargs['model'] = helpers.load_model(args.model)
  File "/home/sangliera/taiyaki-env/lib/python3.8/site-packages/taiyaki/helpers.py", line 106, in load_model
    assert hasattr(network, 'metadata'), \
AssertionError: Attempted to load unversioned model checkpoint.

I tried to run the misc/upgrade_model.py with the model but it didn't really help.

Thanks a lot in advance for your time.

@SCDealy
Copy link

SCDealy commented Mar 6, 2021

You say that "misc/upgrade_model.py" didn't really help. In what way? Did "upgrade_model.py" succeed or give errors? If the upgrade succeeded, presumably you got a different error when you tried to use it after the upgrade, what was it? If the upgrade failed, presumably that gave an error of some sort so you need to provide details.

@dmr0263
Copy link

dmr0263 commented Dec 3, 2021

Hello @SCDealy, I am having a similar problem... When running prepare_mapped_reads I got several warnings stating "SourceChangeWarning" for the following source codes: "taiyaki.layers.Serial", "torch.nn.modules.container.ModuleList", "taiyaki.layers.Convolution", "torch.nn.modules.padding.ConstantPad1d", "torch.nn.modules.conv.Conv1d", "taiyaki.layers.Reverse", "taiyaki.layers.GruMod", "torch.nn.modules.rnn.GRU", "taiyaki.layers.GlobalNormFlipFlop", and "torch.nn.modules.linear.Linear".

Also, I got a similar error as the individual above, my example is below.

Traceback (most recent call last):
File "/work2/08286/nrp_lab/maverick2/apps/taiyaki/venv/bin/prepare_mapped_reads.
py", line 7, in
exec(compile(f.read(), file, 'exec'))
File "/work2/08286/nrp_lab/maverick2/apps/taiyaki/bin/prepare_mapped_reads.py",
line 141, in
main()
File "/work2/08286/nrp_lab/maverick2/apps/taiyaki/bin/prepare_mapped_reads.py",
line 108, in main
kwargs['model'] = helpers.load_model(args.model)
File "/work2/08286/nrp_lab/maverick2/apps/taiyaki/taiyaki/helpers.py", line 109,
in load_model
"""
AssertionError: Attempted to load unversioned model checkpoint.
Please run misc/upgrade_model.py

Then when I try to run the command upgrade_model.py I get the message that the command cannot be found. I also tried misc/upgrade_model.py and got the message "No such file or directory" am I missing something?

Thank you in advance for your time and help.

@SCDealy
Copy link

SCDealy commented Dec 3, 2021

Based on your traceback, it appears to me that the full path to "upgrade_model.py" on your system should be:

/work2/08286/nrp_lab/maverick2/apps/taiyaki/misc/upgrade_model.py

presumably your working directory is not inside the installed Taiyaki directory tree and the .../taiyaki/misc directory is probably not on your path, so you probably need to provide either the full path above to run the command, or a path that is specified relative to your working directory. The "locate" command can be useful for finding these kinds of accessory programs that are often provided with software packages but not installed on the default paths for executable programs

@dmr0263
Copy link

dmr0263 commented Dec 9, 2021

@SCDealy Thank you for your help and prompt response.
Another question for you... When executing the upgrade_model.py script, the input file needed that is described as the "mapped signal to read from", would that be the previously generated tsv file from the generate_per_read_params.py script?
Thank you again in advance for your time and help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants