KwanLab / Autometa

Autometa: Automated Extraction of Genomes from Shotgun Metagenomes
https://autometa.readthedocs.io
Other
40 stars 15 forks source link

Error in AUTOMETA:TAXON_ASSIGNMENT:LCA:PREP_DBS #363

Open bindiyabajracharya opened 3 weeks ago

bindiyabajracharya commented 3 weeks ago

I am getting the following error and I cannot resolve it. Can you help me find the solution to this?

ERROR ~ Error executing process > 'AUTOMETA:TAXON_ASSIGNMENT:LCA:PREP_DBS (Preparing db cache from autometadb)'

Caused by: Missing output file(s) cache expected by process AUTOMETA:TAXON_ASSIGNMENT:LCA:PREP_DBS (Preparing db cache from autometadb)

Command executed:

autometa-taxonomy-lca \ --blast . \ --lca-output . \ --dbdir autometadb \ --dbtype ncbi \ --cache cache \ --only-prepare-cache autometa --version | sed -e "s/autometa: //g" > prep.version.txt

Command exit status: 0

Command output: (empty)

Command error: [06/18/2024 05:42:53 AM INFO] autometa.taxonomy.lca: Created LCA cache dir: cache [06/18/2024 05:43:00 AM DEBUG] autometa.common.utilities: pickling object to cache/tour.pkl.gz [06/18/2024 05:43:09 AM DEBUG] autometa.common.utilities: object pickled to cache/tour.pkl.gz [06/18/2024 05:43:09 AM DEBUG] autometa.common.utilities: pickling object to cache/level.pkl.gz [06/18/2024 05:43:11 AM DEBUG] autometa.common.utilities: object pickled to cache/level.pkl.gz [06/18/2024 05:43:11 AM DEBUG] autometa.common.utilities: pickling object to cache/occurrence.pkl.gz [06/18/2024 05:43:31 AM DEBUG] autometa.common.utilities: object pickled to cache/occurrence.pkl.gz [06/18/2024 05:43:31 AM DEBUG] autometa.taxonomy.lca: Precomputing LCAs [06/18/2024 05:46:34 AM DEBUG] autometa.common.utilities: pickling object to cache/precomputed_lcas.pkl.gz [06/18/2024 05:48:40 AM DEBUG] autometa.common.utilities: object pickled to cache/precomputed_lcas.pkl.gz [06/18/2024 05:48:40 AM DEBUG] autometa.taxonomy.lca: LCA data structures prepared [06/18/2024 05:48:40 AM INFO] root: Cache prepared

Work dir: /hdd/Documents/gmbc_metagdata/testdataautometa/work/b7/99a287067456db67ff34f6e0d55180

Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out

-- Check '.nextflow.log' file for details

chasemc commented 3 weeks ago

Just tested and it works on our server, so not totally sure. It may help if you provide more information about what command you ran (with what options) and the version of Nextflow and autometa you are using

The latest version of Nextflow has removed docker.userEmulation which could cause permission issues

To fix that ./nextflow config can be modified

from

    docker {
        docker.enabled         = true
        docker.userEmulation   = true
        singularity.enabled    = false
        podman.enabled         = false
        shifter.enabled        = false
        charliecloud.enabled   = false
    }

to:

    docker {
        docker.enabled         = true
        docker.runOptions      = '-u $(id -u):$(id -g)'
        singularity.enabled    = false
        podman.enabled         = false
        shifter.enabled        = false
        charliecloud.enabled   = false
    }

@shaneroesemann do you want to try to submit a PR with that and also bump the nextflow version in nextflow-env.yml?

bindiyabajracharya commented 3 weeks ago

I found out the solution to this. The pipeline was generating some files having ownership by root. So, when it tried to move those files to the other directory, it couldn't move, because I was working by staying on the other directory. It worked when I used the same command while in the root directory. So, I think it is a kind of bug in this pipeline, which needs to be fixed.

chasemc commented 2 weeks ago

Great. Yes, that's the docker.userEmulation issue above, changing the config as above should work.

bindiyabajracharya commented 2 weeks ago

@chasemc Can you tell me where can I find this ./nextflow config file so that I can modify it?

chasemc commented 2 weeks ago

https://github.com/KwanLab/Autometa/blob/0d9028cf7bad20d6e28667aaba9d3889a15ace09/nextflow.config#L162-L169