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

Error: traitar phenotype #6

Open
lanlan0210 opened this issue Jul 24, 2023 · 12 comments
Open

Error: traitar phenotype #6

lanlan0210 opened this issue Jul 24, 2023 · 12 comments

Comments

@lanlan0210
Copy link

Thank you for developing Traitar. I got an error message when I ran the software. The data used is the data in the test file you provided.
command: traitar phenotype test samples.txt from_genes output_dir
error: usage: traitar phenotype [-h] [-c CPUS] [-x PARALLEL] [-o]
[-g {genbank,refseq,img,prodigal,metagenemark}]
[-p PRIMARY_MODELS] [-s SECONDARY_MODELS]
[-r REARRANGE_HEATMAP]
[--no_heatmap_sample_clustering]
[--no_heatmap_phenotype_clustering]
[-f {png,pdf,svg,jpg}]
pfam_dir input_dir sample2file
{from_genes,from_nucleotides,from_annotation_summary}
output_dir
traitar phenotype: error: argument mode: invalid choice: 'output_dir' (choose from 'from_genes', 'from_nucleotides', 'from_annotation_summary').
Can you help me see how to solve it? Looking forward to your reply.

@nick-youngblut
Copy link
Owner

@lanlan0210 you are probably not providing all of the required positional arguments:

pfam_dir input_dir sample2file
{from_genes,from_nucleotides,from_annotation_summary}
output_dir

@lanlan0210
Copy link
Author

Thank you for your timely reply. The previous problem seems solved, but a new error has appeared.
Uploading image.png…
Looking forward to your reply.

@evazio
Copy link

evazio commented Aug 23, 2023

Hello,

Same here, I modified the command line as indicated but it gives back this error:
FileNotFoundError: [Errno 2] No such file or directory: 'output/annotation/pfam/LBR121___________________________________domtblout.dat'

As I understand, this file should be generated by the software. Any ideas on how to solve this? I used the phenotype default
traitar phenotype /GENOMICS/genomes/ASSEMBLED/faa/traitar_pfam /GENOMICS/genomes/ASSEMBLED/faa /GENOMICS/genomes/ASSEMBLED/faa/samples.txt from_genes output_traitar

Thank you in advance for the assistance.

@mgabriell1
Copy link

Hello,
Same problem here.
Below you can find the complete log.
Thanks in advance for the help!

2023-10-06 13:48:14,059 - Running annotate as part of predict
2023-10-06 13:48:14,060 - Running annotation with hmmer. This step can take a while. A rough estimate for sequential Pfam annotation of genome samples of ~3 Mbs is 10 min per genome.
2023-10-06 13:48:14,062 - Computing hmms
2023-10-06 13:48:14,063 -   Using existing file (use --overwrite to recreate): Genome00005//traitar_result/Genome00005.faa
2023-10-06 13:48:14,063 -   No. of hmmer commands to run: 0
2023-10-06 13:48:14,063 - Filtering hmm hits
2023-10-06 13:48:14,066 -   File doesn't exist, so creating: Genome00005//traitar_result/phenotypic_predictions/annotation/pfam/Genome00005_filtered_best.dat
2023-10-06 13:48:14,066 -   No. of hmmer filter commands to run: 1
Traceback (most recent call last):
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/bin/traitar", line 10, in <module>
    sys.exit(main())
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/__main__.py", line 101, in main
    args.func(args)
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/Commands/phenotype.py", line 34, in phenolyze
    p.annotate(args.mode)
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/traitar_cls.py", line 217, in annotate
    self.run_hmmer_annotation(self.s2f.loc[:,'sample_file_name'],
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/traitar_cls.py", line 317, in run_hmmer_annotation
    fae_func(p)
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/hmmer2filtered_best.py", line 98, in _main_par
    main(infile_f, hmm_name, out_best_f)
  File "/cluster/project/eawag/p07003/Software/conda/envs/traitar-env/lib/python3.10/site-packages/traitar/hmmer2filtered_best.py", line 110, in main
    with open(infile_f) as inF:
FileNotFoundError: [Errno 2] No such file or directory: 'Genome00005//traitar_result/phenotypic_predictions/annotation/pfam/Genome00005_domtblout.dat'

@nick-youngblut
Copy link
Owner

@mgabriell1 do you have write permissions to Genome00005//traitar_result/phenotypic_predictions/annotation/pfam/?

@mgabriell1
Copy link

Assuming that's the relative path in <out_dir>, yes

@nick-youngblut
Copy link
Owner

Does Genome00005//traitar_result/phenotypic_predictions/annotation/pfam/ actually exist?

@mgabriell1
Copy link

It was created by traitar, but it was empty (hence the error)

@nick-youngblut
Copy link
Owner

If I had to guess, it could be the quality of your input genome(s). A poor quality genome could result in little or no pfam annotations, which would result in downstream failures of Traitar.

@mgabriell1
Copy link

I don't think that's the case. That specific genome has been called as 99.97% complete by CheckM2 so I'd imagine it should be annotated by PFAM.
Also this seem to have happened to others, so it's not something that I've only encountered myself

@smta11
Copy link

smta11 commented Apr 17, 2024

Hello everyone,
Has this problem been solved? I am getting the same error with test data and appreciate it if someone shares the solution of this problem. Thanks!

@nick-youngblut
Copy link
Owner

For some reason hmmsearch is not writing an output:

outfile = os.path.join(a_dir, out_samples[i] + '_domtblout.dat')

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

5 participants