nmquijada / tormes

Making whole bacterial genome sequencing data analysis easy
GNU General Public License v3.0
99 stars 32 forks source link

tormes-setup error #51

Closed jysi-lab closed 2 years ago

jysi-lab commented 2 years ago

Hello, first thank you for this great pipeline!

I managed to install tormes on HPC (it took quite some time - tormes would not be installed with python version above 3.6.10), but the setup process was killed while trying to download the kraken (minikraken_8GB_202003.tgz). Then I just moved on to analysis and encountered the following error:

$tormes -m /scratch/e1376a01/test/tormes -o /scratch/e1376a01/test/tormes_output grep: /scratch/e1376a01/.conda/envs/tormes-1.3.0/bin/../files/config_file.txt: No such file or directory

So I tried to setup tormes again but now it says,

ERROR: /scratch/e1376a01/.conda/envs/tormes-1.3.0/bin/../CGE-modules/ already exist! Please check

Could you guide me in resolving this issue? Thank you! Jane

nmquijada commented 2 years ago

Dear Jane,

Thank you very much for your comment.

I am sorry that it took time for you to install tormes. The python version was defined as a requirement as it fulfills the needs for all the required dependencies, but it might change to a newer version in the next tormes release.

If the tormes-setup process failed when downloading the minikraken database, it already installed some missing dependencies but did not complete the entire set up, that's why you are receiving the error message with the config_file.txt (it is created at the latest step, after checking that all installations worked well).

When you try to run tormes-setup, it detects that some installations are done and so displays the "ERROR" message, in order to warn you that no overwriting of directories/files will be done (this is intended in case some users modified the content of such directory by any specific purpose).

You can remove the entire CGE-modules directory created by tormes and run tormes-setup again:

conda activate tormes-1.3.0
rm -rf /scratch/e1376a01/.conda/envs/tormes-1.3.0/CGE-modules 
tormes-setup

Please, let me know if it worked!

Narciso

jysi-lab commented 2 years ago

Dear Narciso,

Thank you for your prompt reply! Oh, and the python version is written in the yml file as well! Sorry, I just noticed it now. However, I was unable to install tormes using the yml. Instead, I installed each dependency one at a time. I had to provide the python version for tormes in particular (conda install -c nmquijada tormes python=3.6.10).

Anyway, thanks to your advise, I was able to run tormes-setup again, but I got stuck downloading the kraken db again. So, I downloaded it on my Mac and uploaded it directly to /scratch/e1376a01/.conda/envs/tormes-1.3.0/db/minikraken-DB.

Then when I ran tormes-setup again, it was still trying to download the db. Would there be a way to skip this process? Thank you again, Jane

nmquijada commented 2 years ago

Hi Jane,

Don't know why the conda env installation via yaml file failed for you. Without the errors you got is hard to guess. In any case, I am happy that you managed to install the dependencies one by one (I've seen similar issues like this before, that solved this way with complex conda environments).

Regarding the download of minikraken-DB, I am afraid there is not a built-in option like that in the tormes-setup. We will include this for sure in the next release. In the meantime, we can trick a bit the tormes-setup to prevent it to download the database. The download of the database is in lines 58-62 of the tormes-setup script: https://github.com/nmquijada/tormes/blob/f5a547020f4d6cf562930f327799070bcf42cedc/bin/version-1.3.0/tormes-setup#L58-L62

So you can either comment those lines (add a # at the begining of the line) with your preferred text editor, or directly from the command line:

conda activate tormes-1.3.0
# in case you haven't removed the CGE directory:
rm -rf /scratch/e1376a01/.conda/envs/tormes-1.3.0/CGE-modules
# make sure that the lines you are willing to change are the right ones, so check it with:
sed -n 58,62p $(which tormes-setup)
# that would have printed the lines I mentioned above.

# If yes, then:
sed -i '58,62s/^/#/' $(which tormes-setup)

Now you can run tormes-setup again.

Let me know! Narciso

jysi-lab commented 2 years ago

Hi Narciso,

Thanks to your clear guidance, I was able to install it and now running the test files! Thank you again for your prompt and kind guidance, Jane

nmquijada commented 2 years ago

Hi Jane,

I am happy to help! Good that it worked :)

I will close this issue now but feel free to reopen