Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to verify protein reference sets (extraction) #15

Open
Kailin-Sun opened this issue Sep 21, 2024 · 4 comments
Open

Failure to verify protein reference sets (extraction) #15

Kailin-Sun opened this issue Sep 21, 2024 · 4 comments

Comments

@Kailin-Sun
Copy link

Dear Edgardo,

Thank you very much for all your work on Captus!
I am currently trying to extract Angiosperms353 genes from my Captus-assembled dataset.

I am using the command

captus_assembly extract -a 02_assemblies/ -n Angiosperms353 

to extract genes; however, when verifying protein reference sets, a "value error" occurs:

Traceback (most recent call last):
  File "/home/kailin/miniconda3/envs/captus/bin/captus_assembly", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/kailin/miniconda3/envs/captus/lib/python3.12/site-packages/captus/captus_assembly.py", line 1424, in main
    CaptusAssembly()
  File "/home/kailin/miniconda3/envs/captus/lib/python3.12/site-packages/captus/captus_assembly.py", line 90, in __init__
    getattr(self, args.command)()
  File "/home/kailin/miniconda3/envs/captus/lib/python3.12/site-packages/captus/captus_assembly.py", line 1074, in extract
    extract(full_command, args)
  File "/home/kailin/miniconda3/envs/captus/lib/python3.12/site-packages/captus/extract.py", line 257, in extract
    prot_concurrent, prot_threads, prot_ram = adjust_concurrency(args.concurrent,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 2)

This is independent of the reference file used (Angiosperms353, Mega353 or my own reference file, whether as nucleotide or amino acid sequence).

I am using Captus v1.0.1 within a minic
onda environment under Ubuntu 22.04 (tried both native linux and from Windows using WSL).

The log file is attached.
captus-assembly_extract.log

@edgardomortiz
Copy link
Owner

Dear @Kailin-Sun ,

Looking at your logs I can only think that this computer does not have enough resources. I have never tried running Captus in a maching with less than 8GB of RAM and less than 4 cores. Have you tried in a different computer?

I hope this helps,

Edgardo

@Kailin-Sun
Copy link
Author

Kailin-Sun commented Sep 25, 2024

Thank you very much for the fast response! Unfortunately, the log I sent was just an additional attempt from a native Linux machine with browser access. I get the same error on the much more powerful computer I actually use for the analysis (8 GB RAM, 8 real and 8 virtual cores).
As a work-around, I have successfully extracted the genes using the references as DNA rather than protein code.

@edgardomortiz
Copy link
Owner

edgardomortiz commented Sep 26, 2024

Dear @Kailin-Sun ,

I found the source of the error, you are running into RAM limitations. I set for protein extraction, a minimum of 7.5GB of RAM, and a minimum of 2Gb for DNA extraction. This means that even your computer with 8GB of RAM is very close to the limit, and perhaps because other programs are also taking RAM, Captus detects that there is less than 7.5GB of RAM available. However, Captus should still attempt to extract the proteins if the RAM is less than 7.5GB, albeit reducing concurrency and threads per task to 1.

This led me to find a bug in my code, the fix will be included in the next version together with other changes. In the meantime you could fix the issue by modifying line 814 of the file extract.py, from:

        return 1, ram_B

to:

        return 1, 1, ram_B

I also have uploaded the new extract.py to GitHub, so you can see what I mean. I hope this helps, ask me if you have any questions. Sorry for the inconvenience, and thanks for helping by reporting the bug.

Edgardo

@Kailin-Sun
Copy link
Author

Dear Edgardo,

Thank you for the bug fix! I ended up running Scipio on a different computer in the end (before you posted the update), which indeed worked because that computer had 16 GB RAM. Next time I need to run Captus from my current laptop I will use the new code.

I also wanted to say thank you for developing Captus. It's working a lot better than other programmes I've tried!

Best wishes,

Kailin

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

No branches or pull requests

2 participants