bactopia / bactopia

A flexible pipeline for complete analysis of bacterial genomes
https://bactopia.github.io
MIT License
398 stars 69 forks source link

Unable to run Bactopia 2.1.x: downloaded and set up through conda [question] #371

Closed UpalabdhaD closed 5 months ago

UpalabdhaD commented 1 year ago

Dear Robert, Thanks for the wonderful bactopia. I have thoroughly enjoyed the bactopia paper and found it suitable for my analysis. However, I didn't have much luck running it successfully. Would be great to have your help.

1. my shell script

`

Source conda shell

source $HOME/anaconda3/etc/profile.d/conda.sh

include proxy for downloading data

export http_proxy='http://username:passwd@ip-address-univ/' export https_proxy='http://username:passwd@ip-address-univ/' export ftp_proxy='http://username:passwd@ip-address-univ/'

#########################

Directory paths

######################### Bactopia_top="$HOME/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso" BaDs="$HOME/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/02_Ralstonia_dataset" Ralstonia_seq="$HOME/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/05_Ralstonia_sequences"

activate conda enviornment

conda activate bactopia

#########################

Build Datasets

#########################

time bactopia \ datasets \ --species "Ralstonia solanacearum" \ --include_genus \ --cpus 8 \ --outdir $BaDs

#####################################################

Query ENA for all Ralstonia Sequence projects

#####################################################

taxonomy id for R.solanacerum is 305

time bactopia \ search \ 305 \ --prefix Ralstonia_ENA \ --outdir $Bactopia_top/05_Ralstonia_sequences

##################################################

Run bactopia command

################################################ time bactopia \ --accessions $Ralstonia_seq/Ralstonia_ENA-accessions.txt \ --use_ena \ --datasets $BaDs/ \ --species "Ralstonia solanacearum" \ --genome_size 5500000 \ --coverage 50 \ --cleanup_workdir \ --outdir $Bactopia_top/trial_10

conda deactivate `

Bash Output:

bash bactopia_rso.sh 2022-11-21 15:56:27:root:INFO - Checking if environment pre-builds are needed, use --verbose to see full details. 2022-11-21 15:56:27:root:INFO - Found Conda environments in /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/conda/envs, if a complete rebuild is needed please use --force_rebuild N E X T F L O W ~ version 22.10.1 Launching /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/main.nf [desperate_bassi] DSL2 - revision: 145bb11899



| | _ | | __ (_)
| '
\ / ` |/ | / | ' | |/ ` |
| |) | (| | (
| || () | |) | | (| |
|
./ _,|_|__/| ./||_,| |_|
bactopia v2.1.1 Bactopia is a flexible pipeline for complete analysis of bacterial genomes.

Core Nextflow options runName : desperate_bassi launchDir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/03_script workDir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/03_script/work projectDir : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x userName : upalabdha profile : standard configFiles : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/nextflow.config

Required Parameters accessions : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/05_Ralstonia_sequences/Ralstonia_ENA-accessions.txt

Dataset Parameters datasets : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/02_Ralstonia_dataset/ species : Ralstonia solanacearum coverage : 50 genome_size : 5500000

Gather Samples Parameters use_ena : true

Optional Parameters outdir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/trial_10

Nextflow Configuration Parameters cleanup_workdir : true

Nextflow Profile Parameters condadir : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/conda/envs registry : quay singularity_cache: /home/upalabdha/.bactopia/singularity

!! Only displaying parameters that differ from the pipeline defaults !!

If you use bactopia for your analysis please cite:

real 0m6.569s user 0m39.539s sys 0m1.369s

If you want anything else for help please let me know. Currently I am using a i7 cpu 16 thread desktop computer with 64Gb RAM configured with Debian, Conda version 22.9.0

Thanks in advance, Upalabdha

rpetit3 commented 1 year ago

Hi @UpalabdhaD

Let's see if you can get this going for you! What is the output of:

ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome/../../../lib/nf/
UpalabdhaD commented 1 year ago

hi @rpetit3 Thanks for your quick response. here is output of ls -lh ❯ ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome/../../../lib/nf/ ls: cannot access '/home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome/../../../lib/nf/': No such file or directory

rpetit3 commented 1 year ago

OK, what about here? ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/

UpalabdhaD commented 1 year ago

Here you go @rpetit3

❯ ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/
total 48K
drwxr-xr-x 5 upalabdha upalabdha 4.0K Nov 19 19:55 bin
drwxr-xr-x 6 upalabdha upalabdha 4.0K Nov 20 13:37 conda
drwxr-xr-x 5 upalabdha upalabdha 4.0K Nov 19 19:55 conf
drwxr-xr-x 2 upalabdha upalabdha 4.0K Nov 19 19:55 data
drwxr-xr-x 3 upalabdha upalabdha 4.0K Nov 19 19:55 lib
-rw-rw-r-- 2 upalabdha upalabdha 1.3K Nov  8 09:45 main.nf
drwxr-xr-x 4 upalabdha upalabdha 4.0K Nov 19 19:55 modules
-rw-rw-r-- 2 upalabdha upalabdha 5.4K Nov  8 09:45 nextflow.config
drwxr-xr-x 3 upalabdha upalabdha 4.0K Nov 19 19:55 subworkflows
drwxr-xr-x 5 upalabdha upalabdha 4.0K Nov 19 19:55 tests
drwxr-xr-x 2 upalabdha upalabdha 4.0K Nov 19 19:55 workflows
rpetit3 commented 1 year ago

OK,

ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/lib/nf

ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome
UpalabdhaD commented 1 year ago
❯ ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/lib/nf
total 40K
-rw-rw-r-- 2 upalabdha upalabdha  20K Nov  8 09:45 bactopia.nf
-rw-rw-r-- 2 upalabdha upalabdha 7.5K Nov  8 09:45 bactopia_tools.nf
-rw-rw-r-- 2 upalabdha upalabdha 9.0K Nov  8 09:45 functions.nf

❯ ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome
total 72K
-rw-rw-r-- 2 upalabdha upalabdha  594 Nov  8 09:45 README.md
-rw-rw-r-- 2 upalabdha upalabdha  12K Nov  8 09:45 main.nf
-rw-rw-r-- 2 upalabdha upalabdha  905 Nov  8 09:45 meta.yml
-rw-rw-r-- 2 upalabdha upalabdha  673 Nov  8 09:45 params.config
-rw-rw-r-- 2 upalabdha upalabdha 8.7K Nov  8 09:45 params.json
-rw-rw-r-- 2 upalabdha upalabdha 2.6K Nov  8 09:45 test.nf
-rw-rw-r-- 2 upalabdha upalabdha  31K Nov  8 09:45 test.yml
rpetit3 commented 1 year ago

Another (trying to get an idea on how things look

ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome/../../../
UpalabdhaD commented 1 year ago

Sure!!

❯ ls -lh /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/./workflows/../modules/local/bactopia/assemble_genome/../../../
total 8.0K
drwxr-xr-x  3 upalabdha upalabdha 4.0K Nov 19 19:55 local
drwxr-xr-x 57 upalabdha upalabdha 4.0K Nov 19 19:55 nf-core
rpetit3 commented 1 year ago

Did you by chance build the dev version of bactopia?

UpalabdhaD commented 1 year ago

yes robert. Initially I tried the main version, then faced issues, found one relevant solution in github and then followed this instruction.

https://github.com/bactopia/bactopia/issues/365

rpetit3 commented 1 year ago

Cool, I just pushed a fix to the dev branch: https://github.com/bactopia/bactopia/commit/4e50be9c54d200655662c3fee6e24fb59c297bf1

I'm re-building now, and it should hopefully be done in ~10 minutes

UpalabdhaD commented 1 year ago

Many thanks! Please guide me through it.

rpetit3 commented 1 year ago

OK, you might be able to just update.

conda activate bactopia
conda update -c rpetit3 -c conda-forge -c bioconda bactopia

This should hopefully recognize the updated package

UpalabdhaD commented 1 year ago

Hi @rpetit3

Screenshot 2022-11-21 at 11 48 52 PM

Is it you are talking about ?

UpalabdhaD commented 1 year ago

Hi @rpetit3

Did:

conda activate bactopia conda update -c rpetit3 -c conda-forge -c bioconda bactopia

Now:

` ❯ conda update -c rpetit3 -c conda-forge -c bioconda bactopia Collecting package metadata (current_repodata.json): done Solving environment: done

All requested packages already installed.

Retrieving notices: ...working... done `

after that:

time bactopia \ --accessions $Ralstonia_seq/Ralstonia_ENA-accessions.txt \ --use_ena \ --datasets $BaDs/ \ --species "Ralstonia solanacearum" \ --genome_size 5500000 \ --coverage 50 \ --cleanup_workdir \ --outdir $Bactopia_top/trial_11

Got the same error:

❯ bash 03_script/bactopia_rso.sh 2022-11-22 13:43:52:root:INFO - Checking if environment pre-builds are needed, use --verbose to see full details. 2022-11-22 13:43:52:root:INFO - Found Conda environments in /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/conda/envs, if a complete rebuild is needed please use --force_rebuild N E X T F L O W ~ version 22.10.1 Launching/home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/main.nf` [furious_jones] DSL2 - revision: 145bb11899



| | _ | | __ (_)
| '
\ / ` |/ | / | ' | |/ ` |
| |) | (| | (
| || () | |) | | (| |
|
./ _,|_|__/| ./||_,| |_|
bactopia v2.1.1 Bactopia is a flexible pipeline for complete analysis of bacterial genomes.

Core Nextflow options runName : furious_jones launchDir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso workDir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/work projectDir : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x userName : upalabdha profile : standard configFiles : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/nextflow.config

Required Parameters accessions : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/05_Ralstonia_sequences/Ralstonia_ENA-accessions.txt

Dataset Parameters datasets : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/02_Ralstonia_dataset/ species : Ralstonia solanacearum coverage : 50 genome_size : 5500000

Gather Samples Parameters use_ena : true

Optional Parameters outdir : /home/upalabdha/Documents/01_Work_nucleix/02_Prj_Rso_WGS/Bactopia_Rso/trial_11

Nextflow Configuration Parameters cleanup_workdir : true

Nextflow Profile Parameters condadir : /home/upalabdha/anaconda3/envs/bactopia/share/bactopia-2.1.x/conda/envs registry : quay singularity_cache: /home/upalabdha/.bactopia/singularity

!! Only displaying parameters that differ from the pipeline defaults !!

If you use bactopia for your analysis please cite:

real 0m6.620s user 0m38.313s sys 0m1.565s `

rpetit3 commented 1 year ago

Hi @UpalabdhaD

I've released v2.2.0, I'd recommend giving it a try.

Cheers, Robert

rpetit3 commented 5 months ago

Hi @UpalabdhaD

I'm cleaning up old issues and since this is related to v2, I'm going to go ahead and close this with the recommendation to give v3 a try.

Please reach out if you have any questions or issues!

Cheers, Robert