Comments (10)
Hi,
It seems like a new version of the library_pyfastx_ and a old index of the fasta file (created by pyfastx) could be the cause (see the post here: lmdu/pyfastx#9)
Please, check if you have an old index file for the "input_fasta" in the directory where you are currently working, if so delete it and try again (or start the program in a fresh, empty directory)
Let me know how it goes
from metatag.
Hi,
I tried to do so by removing everything in the folder (rm -rf *
), but it didn't work. I also deleted my old environment and reinstalled from scratch to check if it was a version problem, but the problem persists
from metatag.
Update:
I tried the same procedure with a different gene (Amt, TIGRFAM TIGR00836) to check if it was related to the makedatabase_struct.py
or the KEGG format
. The error appears again:
(traits) rlaso@elbrus:/data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Amt/data/reference_data_Amt_TIGR00836$ python3 /data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py --in /data/mcm/databases/TRAITs_reference_database/final_ref_database.fasta --outdir /data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Amt/data/reference_data_Amt_TIGR00836/ --hmm /data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Amt/hmms/TIGR00836.1.HMM --relabel --prefix "ref_TIG"
* Making peptide-specific reference database...
Running Hmmer...
Parsing Hmmer output file...
Filtering Fasta...
RuntimeError: get seq count and length error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py", line 118, in <module>
main()
File "/data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py", line 81, in main
filterFASTAByHMM(
File "/data/mcm/rlaso/Programs/TRAITS/code/phyloplacement/database/manipulation.py", line 118, in filterFASTAByHMM
filterFASTAbyIDs(input_fasta, record_ids=hmmer_hits.id.values,
File "/data/mcm/rlaso/Programs/TRAITS/code/phyloplacement/database/manipulation.py", line 76, in filterFASTAbyIDs
fa = pyfastx.Fasta(input_fasta)
SystemError: <class 'Fasta'> returned a result with an error set
I guess that means the error is in the database or on my specific environment
from metatag.
In principle the md5sum is the correct one.
5fb8268b59b222a9cd035c46bcf4d031 final_ref_database.fasta
from metatag.
Hi @gecko1990 (sorry for the late reply),
It seems like a new version of the library_pyfastx_ and a old index of the fasta file (created by pyfastx) could be the cause (see the post here: lmdu/pyfastx#9)
Please, check if you have an old index file for the "input_fasta" in the directory where you are currently working, if so delete it and try again (or start the program in a fresh, empty directory)
Let me know how it goes
from metatag.
I tried that as referred here (#53 (comment)), but I am unsure what you mean with the working directory.
(traits) rlaso@elbrus:/data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Nxr_Narg/data$ python3 /data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py --in /data/mcm/databases/TRAITs_reference_database/final_ref_database.fasta --outdir /data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Nxr_Narg/data/ --hmm /data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Nxr_Narg/hmms/TIGR01580.1.HMM --relabel --prefix "ref_TIG" * Making peptide-specific reference database...
Running Hmmer...
Parsing Hmmer output file...
Filtering Fasta...
RuntimeError: get seq count and length error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py", line 118, in <module>
main()
File "/data/mcm/rlaso/Programs/TRAITS/code/makedatabase.py", line 81, in main
filterFASTAByHMM(
File "/data/mcm/rlaso/Programs/TRAITS/code/phyloplacement/database/manipulation.py", line 118, in filterFASTAByHMM
filterFASTAbyIDs(input_fasta, record_ids=hmmer_hits.id.values,
File "/data/mcm/rlaso/Programs/TRAITS/code/phyloplacement/database/manipulation.py", line 76, in filterFASTAbyIDs
fa = pyfastx.Fasta(input_fasta)
SystemError: <class 'Fasta'> returned a result with an error set
(traits) rlaso@elbrus:/data/mcm/rlaso/Traits/Phylogenetic_trees/Nitrogen_cycle/Nxr_Narg/data$ ls
hmmer_output.txt
As I show here, once the error occurs, the only thing appearing in the working directory is the hmmer output
from metatag.
Hi, yes, sorry, I meant the directory where the input fasta is located, in your case:
/data/mcm/databases/TRAITs_reference_database/final_ref_database.fasta
Could you please check if there is any file ending in ".fxi", probably "final_ref_database.data.fxi"?
Thanks
from metatag.
Nothing at all. =(
(traits) rlaso@elbrus:/data/mcm/rlaso/Programs/TRAITS$ ls /data/mcm/databases/TRAITs_reference_database/
final_ref_database.fasta
(traits) rlaso@elbrus:/data/mcm/rlaso/Programs/TRAITS$ cd /data/mcm/databases/TRAITs_reference_database/
(traits) rlaso@elbrus:/data/mcm/databases/TRAITs_reference_database$ ls -a
. .. final_ref_database.fasta
from metatag.
Problem resolved. I didn't have writing permissions for the folder and the index could not be created
from metatag.
Alright, closing this issue then!
from metatag.
Related Issues (20)
- new error using papara HOT 7
- problem to print help of makedatabase.py HOT 3
- Modify automated sequence data type checking HOT 1
- error when relabelling the newick tree with the placements HOT 1
- Integrate Pynteny in makedatabase.py
- Refactor code prior to repo publication
- Add pynteny to makedatabase_struc
- Install phyloplacement with poetry? HOT 1
- Re-structure project and rename tool
- User logger instead of print throughout code base
- Handle log / terminal messages
- Compose minimal pipeline
- Use pathlib instead of os
- Build Docs
- Use logger instead of print
- Fix dependency versions in conda environment
- Update Docs
- Update docstrings
- Integrate JPLACEparser
- Add usage docs and examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metatag.