Closed jolespin closed 2 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
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.
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..
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
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.
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.
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 ofCONDA_PREFIX
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.
@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?
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.
I'm trying to scan my dataset for RNA viruses but I'm getting an error.
The command I ran was the following:
Results from stderr:
Results from
log/iter-0/step3-classify/all-score-RNA.log
:Here's my conda environment:
I made sure to install scikit-learn==0.22.1 in case it was an unpickling error.