jiarong / VirSorter2

customizable pipeline to identify viral sequences from (meta)genomic data
GNU General Public License v2.0
212 stars 28 forks source link

"Error in rule classify_by_group:" during Step 3 when searching for RNA viruses #73

Closed jolespin closed 2 years ago

jolespin commented 3 years ago

I'm trying to scan my dataset for RNA viruses but I'm getting an error.

The command I ran was the following:

virsorter run -w ${OUT_DIR} -i ${FASTA} --min-length 1500 -j ${N_JOBS} --include-groups RNA all

Results from stderr:

(virsorter_env) -bash-4.2$ cat logs/virsorter__1001.2.e
[2021-06-17 14:50 INFO] VirSorter 2.2.2
[2021-06-17 14:50 INFO] /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/bin/virsorter run -w virsorter_output/1001.2 -i rnaspades_output/1001.2/transcripts.fasta --min-length 1500 -j 4 --include-groups RNA all
[2021-06-17 14:50 INFO] Using /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/template-config.yaml as config template
[2021-06-17 14:50 INFO] conig file written to /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2/config.yaml

[2021-06-17 14:50 INFO] Executing: snakemake --snakefile /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/Snakefile --directory /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2 --jobs 4 --configfile /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2/config.yaml --latency-wait 600 --rerun-incomplete --nolock  --conda-frontend mamba --conda-prefix /usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs --use-conda    --quiet  all
Job counts:
    count   jobs
    1   all
    1   check_point_for_reclassify
    1   circular_linear_split
    1   classify
    1   classify_by_group
    1   classify_full_and_part_by_group
    1   combine_linear_circular
    1   combine_linear_circular_by_group
    1   extract_feature
    1   extract_provirus_seqs
    1   finalize
    1   gff_feature
    1   gff_feature_by_group
    1   hmm_features_by_group
    1   hmm_sort_to_best_hit_taxon
    1   hmm_sort_to_best_hit_taxon_by_group
    1   merge_classification
    1   merge_full_and_part_classification
    1   merge_hmm_gff_features_by_group
    1   merge_provirus_call_by_group_by_split
    1   merge_provirus_call_from_groups
    5   merge_split_hmmtbl
    5   merge_split_hmmtbl_by_group
    5   merge_split_hmmtbl_by_group_tmp
    1   pick_viral_fullseq
    1   preprocess
    1   split_faa
    1   split_faa_by_group
    1   split_gff_by_group
    41
[2021-06-17 14:50 INFO] # of seqs < 1500 bp and removed: 31720
[2021-06-17 14:50 INFO] # of circular seqs: 1
[2021-06-17 14:50 INFO] # of linear seqs  : 155
[2021-06-17 14:50 INFO] Finish spliting circular contig file with common rbs
[2021-06-17 14:50 INFO] Finish spliting linear contig file with common rbs
[2021-06-17 14:50 INFO] Step 1 - preprocess finished.
[2021-06-17 14:58 INFO] Step 2 - extract-feature finished.
[2021-06-17 14:58 ERROR] See error details in /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2/log/iter-0/step3-classify/all-score-RNA.log
[Thu Jun 17 14:58:03 2021]
Error in rule classify_by_group:
    jobid: 38
    output: iter-0/RNA/all.pdg.clf
    conda-env: /usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db
    shell:

        Log=/local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2/log/iter-0/step3-classify/all-score-RNA.log
        python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/./scripts/classify.py iter-0/RNA/all.pdg.ftr /usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/group/RNA/model RNA iter-0/RNA/all.pdg.clf 2> $Log || { echo "See error details in $Log" | python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/./scripts/echo.py --level error; exit 1; }

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Exiting because a job execution failed. Look above for error message

*** An error occurred. Detailed errors may not be printed for certain rules. Refer to the log file of the failed command for troubleshooting
Issues can be raised at: https://github.com/jiarong/VirSorter2/issues

Results from log/iter-0/step3-classify/all-score-RNA.log:

(virsorter_env) -bash-4.2$ cat /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/virsorter_output/1001.2/log/iter-0/step3-classify/all-score-RNA.log
/usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator MinMaxScaler from version 0.22.1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
/usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.22.1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
/usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.22.1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
/usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator GridSearchCV from version 0.22.1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
/usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator Pipeline from version 0.22.1 when using version 0.22. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)
Traceback (most recent call last):
  File "/usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/./scripts/classify.py", line 77, in <module>
    main()
  File "/usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.6/site-packages/virsorter/./scripts/classify.py", line 71, in main
    df = df.rename({0: 'nonviral', 1: label}, axis=1, errors='raise')
  File "/usr/local/packages/python/lib/python3.6/site-packages/pandas/util/_decorators.py", line 197, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/packages/python/lib/python3.6/site-packages/pandas/core/frame.py", line 4025, in rename
    return super(DataFrame, self).rename(**kwargs)
  File "/usr/local/packages/python/lib/python3.6/site-packages/pandas/core/generic.py", line 1072, in rename
    'argument "{0}"'.format(list(kwargs.keys())[0]))
TypeError: rename() got an unexpected keyword argument "errors"

Here's my conda environment:

(virsorter_env) -bash-4.2$ conda list
# packages in environment at /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
amply                     0.1.4                      py_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
arrow                     1.1.0              pyhd8ed1ab_1    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
binaryornot               0.4.4                      py_1    conda-forge
brotlipy                  0.7.0           py36h8f6f2f9_1001    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.1               h7f98852_1    conda-forge
ca-certificates           2021.5.30            ha878542_0    conda-forge
certifi                   2021.5.30        py36h5fab9bb_0    conda-forge
cffi                      1.14.5           py36hc120d54_0    conda-forge
chardet                   4.0.0            py36h5fab9bb_1    conda-forge
click                     8.0.1            py36h5fab9bb_0    conda-forge
coincbc                   2.10.5               hcee13e7_1    conda-forge
conda                     4.10.1           py36h5fab9bb_0    conda-forge
conda-package-handling    1.7.3            py36h8f6f2f9_0    conda-forge
configargparse            1.4.1              pyhd8ed1ab_0    conda-forge
cookiecutter              1.6.0                 py36_1000    conda-forge
cryptography              3.4.7            py36hb60f036_0    conda-forge
curl                      7.77.0               hea6ffbf_0    conda-forge
datrie                    0.8.2            py36h8f6f2f9_2    conda-forge
decorator                 5.0.9              pyhd8ed1ab_0    conda-forge
docutils                  0.17.1           py36h5fab9bb_0    conda-forge
expat                     2.4.1                h9c3ff4c_0    conda-forge
future                    0.18.2           py36h5fab9bb_3    conda-forge
gettext                   0.19.8.1          h0b5b191_1005    conda-forge
git                       2.30.2          pl5320h24fefe6_1    conda-forge
gitdb                     4.0.7              pyhd8ed1ab_0    conda-forge
gitpython                 3.1.17             pyhd8ed1ab_0    conda-forge
icu                       68.1                 h58526e2_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
importlib-metadata        4.5.0            py36h5fab9bb_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
jinja2-time               0.2.0                      py_2    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter_core              4.7.1            py36h5fab9bb_0    conda-forge
krb5                      1.19.1               hcc1bbae_0    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
libarchive                3.5.1                hccf745f_2    conda-forge
libblas                   3.9.0                9_openblas    conda-forge
libcblas                  3.9.0                9_openblas    conda-forge
libcurl                   7.77.0               h2574ce0_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.3                  h58526e2_2    conda-forge
libgcc-ng                 9.3.0               h2828fa1_19    conda-forge
libgfortran-ng            9.3.0               hff62375_19    conda-forge
libgfortran5              9.3.0               hff62375_19    conda-forge
libgomp                   9.3.0               h2828fa1_19    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0                9_openblas    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libopenblas               0.3.15          pthreads_h8fe5266_1    conda-forge
libsolv                   0.7.18               h780b84a_0    conda-forge
libssh2                   1.9.0                ha56f1ee_6    conda-forge
libstdcxx-ng              9.3.0               h6de172a_19    conda-forge
libxml2                   2.9.12               h72842e0_0    conda-forge
lz4-c                     1.9.3                h9c3ff4c_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mamba                     0.14.0           py36h05d92e0_0    conda-forge
markupsafe                2.0.1            py36h8f6f2f9_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
numpy                     1.19.5           py36h2aa4a07_1    conda-forge
openssl                   1.1.1k               h7f98852_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
perl                      5.32.1          0_h7f98852_perl5    conda-forge
pip                       21.1.2             pyhd8ed1ab_0    conda-forge
poyo                      0.5.0                      py_0    conda-forge
psutil                    5.8.0            py36h8f6f2f9_1    conda-forge
pulp                      2.4              py36h5fab9bb_0    conda-forge
pycosat                   0.6.3           py36h8f6f2f9_1006    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyrsistent                0.17.3           py36h8f6f2f9_2    conda-forge
pysocks                   1.7.1            py36h5fab9bb_3    conda-forge
python                    3.6.13          hffdb5ce_0_cpython    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.6                     1_cp36m    conda-forge
pyyaml                    5.4.1            py36h8f6f2f9_0    conda-forge
ratelimiter               1.2.0                   py_1002    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
reproc                    14.2.1               h36c2ea0_0    conda-forge
reproc-cpp                14.2.1               h58526e2_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
ruamel.yaml               0.16.5           py36h516909a_1    conda-forge
ruamel.yaml.clib          0.2.2            py36h8f6f2f9_2    conda-forge
ruamel_yaml               0.15.80         py36h8f6f2f9_1004    conda-forge
scikit-learn              0.22.1           py36hcdab131_1    conda-forge
scipy                     1.5.3            py36h9e8f40b_0    conda-forge
setuptools                49.6.0           py36h5fab9bb_3    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     3.0.5              pyh44b312d_0    conda-forge
snakemake-minimal         5.26.0                     py_0    bioconda
sqlite                    3.35.5               h74cdb3f_0    conda-forge
tk                        8.6.10               h21135ba_1    conda-forge
toposort                  1.6                pyhd8ed1ab_0    conda-forge
tqdm                      4.7.2                    py36_0    bioconda
traitlets                 4.3.3            py36h9f0ad1d_1    conda-forge
typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
urllib3                   1.26.5             pyhd8ed1ab_0    conda-forge
virsorter                 2.2.2              pyhdfd78af_0    bioconda
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
whichcraft                0.6.1                      py_0    conda-forge
wrapt                     1.12.1           py36h8f6f2f9_3    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h516909a_0    conda-forge
zipp                      3.4.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.5.0                ha95c52a_0    conda-forge

I made sure to install scikit-learn==0.22.1 in case it was an unpickling error.

jolespin commented 3 years ago

I'm not entirely sure why it's pulling from /usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py instead of CONDA_PREFIX

jiarong commented 3 years ago

You found the problem already. Somehow you add the system python to the top of executable search path, and conda activate is not able to append the CONDA_PREFIX to the $PATH. (you can have a look at the $PATH to verify). You might have modified the $PATH in your .bashrc or module load can do that too.

jiarong commented 3 years ago

You can use --use-conda-off to override the snakemake env and use the current env instead. But this wont solve the problem since it will still use packages from system python that are not compatible first..

jolespin commented 3 years ago

There's something strange going on. I ran the program on the test data, it worked, then I ran it again but then pressed ctrl+c to exit it. Now I'm getting errors.

Does exiting a job prematurely affect the actual underlying code?

This happened earlier. I removed and reinstalled then got the same issue. I tried again but downloaded the database again then it started working.

Is it possible this can fail if there are multiple runs happening at the same time?

I'm getting this issue now for the test run:

(virsorter_env) -bash-4.2$ virsorter run -w test.out -i test.fa --include-groups RNA -j 4 all
[2021-06-17 23:22 INFO] VirSorter 2.2.2
[2021-06-17 23:22 INFO] /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/bin/virsorter run -w test.out -i test.fa --include-groups RNA -j 4 all
[2021-06-17 23:22 INFO] Using /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/template-config.yaml as config template
[2021-06-17 23:22 INFO] conig file written to /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/test.out/config.yaml

[2021-06-17 23:22 INFO] Executing: snakemake --snakefile /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/Snakefile --directory /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/test.out --jobs 4 --configfile /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/test.out/config.yaml --latency-wait 600 --rerun-incomplete --nolock  --conda-frontend mamba --conda-prefix /usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs --use-conda    --quiet  all
Job counts:
    count   jobs
    1   all
    1   check_point_for_reclassify
    1   circular_linear_split
    1   classify
    1   classify_by_group
    1   classify_full_and_part_by_group
    1   combine_linear_circular
    1   combine_linear_circular_by_group
    1   extract_feature
    1   extract_provirus_seqs
    1   finalize
    1   gff_feature
    1   gff_feature_by_group
    1   hmm_features_by_group
    1   hmm_sort_to_best_hit_taxon
    1   hmm_sort_to_best_hit_taxon_by_group
    1   merge_classification
    1   merge_full_and_part_classification
    1   merge_hmm_gff_features_by_group
    1   merge_provirus_call_by_group_by_split
    1   merge_provirus_call_from_groups
    5   merge_split_hmmtbl
    5   merge_split_hmmtbl_by_group
    5   merge_split_hmmtbl_by_group_tmp
    1   pick_viral_fullseq
    1   preprocess
    1   split_faa
    1   split_faa_by_group
    1   split_gff_by_group
    41
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db/bin/python'
  sys.base_prefix = '/local/ifs3_scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db'
  sys.base_exec_prefix = '/usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db'
  sys.executable = '/usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db/bin/python'
  sys.prefix = '/local/ifs3_scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db'
  sys.exec_prefix = '/usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db'
  sys.path = [
    '/local/ifs3_scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db/lib/python38.zip',
    '/local/ifs3_scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db/lib/python3.8',
    '/usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db/lib/python3.8/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
LookupError: no codec search functions registered: can't find encoding

Current thread 0x00007fbca67cb740 (most recent call first):
<no Python frame>
[Thu Jun 17 23:22:55 2021]
Error in rule circular_linear_split:
    jobid: 7
    output: iter-0/pp-seqname-length.tsv
    conda-env: /usr/local/scratch/METAGENOMICS/jespinoz/db/virsorter_db/conda_envs/0da703db
    shell:

        # prep_logdir
        mkdir -p log/iter-0/step1-pp log/iter-0/step2-extract-feature log/iter-0/step3-classify

        Cnt=$(grep -c '^>' /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/test.fa)
        if [ ${Cnt} = 0 ]; then
            echo "No sequnences found in contig file; exiting"               | python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/./scripts/echo.py --level error
            exit 1
        fi

        python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/./scripts/circular-linear-split.py           /local/ifs3_scratch/CORE/jespinoz/Oral/viruses_output/rnavirus_output/test.fa           iter-0/pp-circular.fna.preext          iter-0/pp-linear.fna           iter-0/pp-seqname-length.tsv           "||rbs:common"           0

        if [ ! -s iter-0/pp-circular.fna.preext ]; then
            echo "No circular seqs found in contig file"               | python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/./scripts/echo.py
            rm iter-0/pp-circular.fna.preext
        else
            python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/./scripts/circular-extend.py               iter-0/pp-circular.fna.preext iter-0/pp-circular.fna
        fi

        if [ ! -s iter-0/pp-linear.fna ]; then
            echo "No linear seqs found in contig file"               | python /usr/local/devel/ANNOTATION/jespinoz/anaconda3/envs/virsorter_env/lib/python3.8/site-packages/virsorter/./scripts/echo.py
            rm iter-0/pp-linear.fna
        fi

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Exiting because a job execution failed. Look above for error message

*** An error occurred. Detailed errors may not be printed for certain rules. Refer to the log file of the failed command for troubleshooting
Issues can be raised at: https://github.com/jiarong/VirSorter2/issues
jiarong commented 3 years ago

I have not seen this error before.. How did you get from the first error in this issue to this one? Sometimes reinstall can not mess up the ENV variables and starting a new login session might help.

Control-C on a running job wont affect the underlying code and multiple concurrent runs wont interfere with each other. I am quite sure.

jolespin commented 3 years ago

I'm going to diagnose it today and will update you here. Luckily I was able to install it locally so I'm running the jobs on my laptop but I am still curious what happened on the server.

zhou-sumei commented 3 years ago

Hi, I met the similar issue like you when I run the --prep-for-dramv command . Here is the log file:

Traceback (most recent call last): File "/picb/evolgen/users/zhousumei/miniconda/envs/find_virus/lib/python3.9/site-packages/virsorter/./scripts/classify.py", line 77, in main() File "/picb/evolgen/users/zhousumei/miniconda/envs/find_virus/lib/python3.9/site-packages/virsorter/./scripts/classify.py", line 56, in main X = X.loc[:, SELECT_FEATURE_LIST] File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 925, in getitem return self._getitem_tuple(key) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 1109, in _getitem_tuple return self._getitem_tuple_same_dim(tup) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 806, in _getitem_tuple_same_dim retval = getattr(retval, self.name)._getitem_axis(key, axis=i) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 1143, in _getitem_axis elif com.is_bool_indexer(key): File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/common.py", line 146, in is_bool_indexer return len(key) > 0 and lib.is_bool_list(key) TypeError: Argument 'obj' has incorrect type (expected list, got CommentedSeq)

It also report the error on the screen like this: "one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!" I tried "set +u " : set +u; source /picb/evolgen/users/zhousumei/miniconda/bin/activate find_virus; set -u; Sadly, It didn't work.

This is my code: source` /picb/evolgen/users/zhousumei/miniconda/bin/activate find_virus virsorter run --seqname-suffix-off --viral-gene-enrich-off --prep-for-dramv -i $virus/test.fna --include-groups dsDNAphage,ssDNA -w $WD/ERR1995211_vs2_pass2 -j 30 all

I have notice that there are two version python, the first one is python3.9 in my "find_virus" conda environment, the second one is python3.8 in the "ac0e7fcb" environment----but I didn't created this env manually.
I don't know whether this is the point.

If you can give me some advice, I would appreciate it ! Thang you very much !

I'm not entirely sure why it's pulling from /usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py instead of CONDA_PREFIX

jolespin commented 3 years ago

That is what I ended up doing. Fresh reinstall and fresh database reinstall. It was also weird because I ran a few grid jobs and a few failed. Re ran those and it worked again. I’m not entirely sure what happened but eventually I got all my samples to work. I didn’t have any of these issues when running non-RNA viruses which is pretty weird. Might be our sever or something.

Sent from my iPhone

On Jul 6, 2021, at 3:30 AM, zhou-sumei @.***> wrote:

 Hi, I met the similar issue like you when I run the --prep-for-dramv command . Here is the log file:

Traceback (most recent call last): File "/picb/evolgen/users/zhousumei/miniconda/envs/find_virus/lib/python3.9/site-packages/virsorter/./scripts/classify.py", line 77, in main() File "/picb/evolgen/users/zhousumei/miniconda/envs/find_virus/lib/python3.9/site-packages/virsorter/./scripts/classify.py", line 56, in main X = X.loc[:, SELECT_FEATURE_LIST] File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 925, in getitem return self._getitem_tuple(key) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 1109, in _getitem_tuple return self._getitem_tuple_same_dim(tup) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 806, in _getitem_tuple_same_dim retval = getattr(retval, self.name)._getitem_axis(key, axis=i) File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/indexing.py", line 1143, in _getitem_axis elif com.is_bool_indexer(key): File "/picb/evolgen/users/zhousumei/my_toolkits/virsorter_db/conda_envs/ac0e7fcb/lib/python3.8/site-packages/pandas/core/common.py", line 146, in is_bool_indexer return len(key) > 0 and lib.is_bool_list(key) TypeError: Argument 'obj' has incorrect type (expected list, got CommentedSeq)

It also report the error on the screen like this: "one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!" I tried "set +u " : set +u; source /picb/evolgen/users/zhousumei/miniconda/bin/activate find_virus; set -u; Sadly, It didn't work.

This is my code: source` /picb/evolgen/users/zhousumei/miniconda/bin/activate find_virus virsorter run --seqname-suffix-off --viral-gene-enrich-off --prep-for-dramv -i $virus/test.fna --include-groups dsDNAphage,ssDNA -w $WD/ERR1995211_vs2_pass2 -j 30 all

I have notice that there are two version python, the first one is python3.9 in my "find_virus" conda environment, the second one is python3.8 in the "ac0e7fcb" environment----but I didn't created this env manually. I don't know whether this is the point.

If you can give me some advice, I would appreciate it ! Thang you very much !

I'm not entirely sure why it's pulling from /usr/local/packages/python/lib/python3.6/site-packages/sklearn/base.py instead of CONDA_PREFIX

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jiarong commented 3 years ago

@zhou-sumei The issue you are reporting is different from this one. See #77

@jolespin Glad to hear that you made it run on the cluster. Did those few job fail due to memory corruption from hmmsearch?

jolespin commented 3 years ago

I don’t think so and I’m so far removed from that point that I wouldn’t be able to replicate it if I tried. We can close this issue. I’m going to implement it into our metagenomics pipeline at jcvi so if I encounter any errors in the future I can reopen it.

On Jul 6, 2021, at 5:57 PM, jiarong @.***> wrote:

 @zhou-sumei The issue you are reporting is different from this one. See #77

@jolespin Glad to hear that you made it run on the cluster. Did those few job fail due to memory corruption from hmmsearch?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.