B-UMMI / chewBBACA_tutorial

Step by step tutorial using chewBBACA with all necessary files and results
6 stars 1 forks source link

NotADirectoryError: [Errno 20] Not a directory: 'listgenes_core.txt/.schema_config' #6

Open ramadatta opened 3 years ago

ramadatta commented 3 years ago

Hi,

Can request to know how to solve this error? Many thanks in advance.

chewBBACA.py AlleleCall -i .genomes/ -g listgenes_core.txt -o results --cpu 6 --ptf Streptococcus_agalactiae.trn

chewBBACA version: 2.5.5
Authors: Mickael Silva, Pedro Cerqueira, Rafael Mamede
Github: https://github.com/B-UMMI/chewBBACA
Wiki: https://github.com/B-UMMI/chewBBACA/wiki
Tutorial: https://github.com/B-UMMI/chewBBACA_tutorial
Contacts: imm-bioinfo@medicina.ulisboa.pt

==========================
  chewBBACA - AlleleCall
==========================
It seems that your schema was created with chewBBACA 2.1.0 or lower.
It is highly recommended that you run the PrepExternalSchema process to guarantee full compatibility with the new chewBBACA version.
If you wish to continue, the AlleleCall process will convert the schema to v2.5.5, but will not determine if schema structure respects configuration values.
Do you wish to proceed?
yes

Adding Prodigal training file to schema...
Created listgenes_core.txt/Streptococcus_agalactiae.trn

Creating file with schema configs...
Traceback (most recent call last):
  File "/storage/apps/anaconda3/bin/chewBBACA.py", line 10, in <module>
    sys.exit(main())
  File "/storage/apps/anaconda3/lib/python3.6/site-packages/CHEWBBACA/chewBBACA.py", line 1549, in main
    functions_info[process][1]()
  File "/storage/apps/anaconda3/lib/python3.6/site-packages/CHEWBBACA/chewBBACA.py", line 414, in allele_call
    schema_directory)
  File "/storage/apps/anaconda3/lib/python3.6/site-packages/CHEWBBACA/utils/auxiliary_functions.py", line 224, in write_schema_config
    pickle_dumper(config_file, params)
  File "/storage/apps/anaconda3/lib/python3.6/site-packages/CHEWBBACA/utils/auxiliary_functions.py", line 77, in pickle_dumper
    with open(pickle_out, 'wb') as po:
NotADirectoryError: [Errno 20] Not a directory: 'listgenes_core.txt/.schema_config'
ramadatta commented 3 years ago

Hi,

with a bit of playing around, understand the above command requires a .schema_config, which I have inschema_seed folder. So, accordingly I have changed the above command to

chewBBACA.py AlleleCall -i genomes_680/GBS_Aug2016/ -g schema_seed/ -o results --cpu 32 --ptf Streptococcus_agalactiae.trn

This seems to run without problem. Can guide me if I am missing something. Thanks.

rfm-targa commented 3 years ago

Hello @ramadatta,

Thank you for reporting this issue. This error is related with some changes we have introduced in the latest versions. chewBBACA should accept a file with the list of genes that you want to use in the AlleleCall process, but one of the checks in the code is not being made at the right stage and is leading to this error. For now it will only be possible to run the AlleleCall process by passing the schema's directory, as you have done in the last command you have posted. But that will use the full wgMLST schema and the objective of passing a list of genes is to be able to work only with a subset of the wgMLST such as the cgMLST without needing to create a new directory structure with only the genes you want to use. We will fix this issue and let you know when you can clone the repo and install the new version to get around that bug. We will also create a new bugfix release in PyPI and Conda.

Best regards,

rfm

ramadatta commented 3 years ago

Thanks @rfm-targa for quick reply. In my case, I would want to use cgMLST for my analysis. I eagerly await for the bugfix release in Conda.

rfm-targa commented 3 years ago

Hello @ramadatta,

We have updated the code and it should work fine. We still do not have a release on PyPI and Conda because we need to perform a set of final tests with the modules that connect to Chewie-NS. Chewie-NS is currently restarting and we need to wait for that. We should be able to complete the tests later this day and we'll create a release after that. If you want to start working with the new release sooner, you can clone chewBBACA's master branch and install it. Otherwise, you will have to wait at least until tomorrow to be able to install the new version (updating the package in Conda requires approval from one of Conda's developers and we cannot guarantee that it will be approved immediately). I will keep you updated!

Best regards,

rfm

ramadatta commented 3 years ago

Thanks so much rafael! I will try installing the chewBBACA clone first and play with it.

rfm-targa commented 3 years ago

Hello @ramadatta,

chewBBACA's release 2.5.6 is out and you can install it through Pip or Conda. You should be able to use a file with the list of genes without any issues (remember to include full paths in the list of genes). Give it a try and let us know if it solved the issue or if you find anything else.

Best regards,

rfm

ramadatta commented 3 years ago

Thanks very much @rfm-targa. I will try it and come back on this soon.

rfm-targa commented 3 years ago

@ramadatta could you perform the analysis with chewBBACA's version 2.5.6?

ramadatta commented 3 years ago

Sorry @rfm-targa. I have not tried yet. In the meanwhile, I had an external schema, with which I am trying to run the pipeline and stuck at generating core gene alignment.