metapi 2.1.1 上手

韦宏朗
2023-12-01

metapi 2.1.1 上手

2022-05-25 四月廿五;多云转阵雨 微风 湿度86%; CNGB 深圳;

https://github.com/ohmeta/metapi/
尝试在ubuntu上跑一下metapi 2.1.1


Running metapi mag_wf:
snakemake --snakefile /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk --configfile ./config.yaml --cores 240 --rerun-incomplete --keep-going --printshellcmds --reason --until rmhost_all --local-cores 8 --jobs 30
KeyError in line 104 of /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk:
'assembly_group'
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk", line 104, in <module>
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/sampler.py", line 25, in parse_samples
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/frame.py", line 3458, in __getitem__
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc

Real running cmd:
snakemake --snakefile /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk --configfile ./config.yaml --cores 240 --rerun-incomplete --keep-going --printshellcmds --reason --until rmhost_all --local-cores 8 --jobs 30
██ cat rmhost.sh
snakemake --snakefile /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk --configfile ./config.yaml --cores 240 --rerun-incomplete --keep-going --printshellcmds --reason --until rmhost_all --local-cores 8 --jobs 30

改一改:

██ cat rmhost.sh
snakemake --snakefile /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk --configfile ./config.yaml --core all --until rmhost_all --local-cores 2
(skin) houyang@ubuntu (*/ω\*)[~/BGI/02.skin/01.test/aaa]
██ sh rmhost.sh
KeyError in line 104 of /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk:
'assembly_group'
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk", line 104, in <module>
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/sampler.py", line 25, in parse_samples
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/frame.py", line 3458, in __getitem__
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc

改一改:

██ cat rmhost.sh
snakemake --snakefile /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk --configfile ./config.yaml --core all --until rmhost_all --local-cores 2 --profile ./profiles/sge --jobs 30
(skin) houyang@ubuntu (*/ω\*)[~/BGI/02.skin/01.test/aaa]
██ sh rmhost.sh
KeyError in line 104 of /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk:
'assembly_group'
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/snakefiles/mag_wf.smk", line 104, in <module>
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/metapi/sampler.py", line 25, in parse_samples
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/frame.py", line 3458, in __getitem__
  File "/home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc

难道是pandas版本问题

██ pip show pandas
Name: pandas
Version: 1.3.5
Summary: Powerful data structures for data analysis, time series, and statistics
Home-page: https://pandas.pydata.org
Author: The Pandas Development Team
Author-email: pandas-dev@python.org
License: BSD-3-Clause
Location: /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages
Requires: numpy, python-dateutil, pytz
Required-by: metapi, seaborn
(skin) houyang@ubuntu (*/ω\*)[~/BGI/02.skin/01.test/aaa]
██ pip uninstall pandas
Found existing installation: pandas 1.3.5
Uninstalling pandas-1.3.5:
  Would remove:
    /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas-1.3.5.dist-info/*
    /home/ubuntu/anaconda3/envs/skin/lib/python3.7/site-packages/pandas/*
Proceed (Y/n)? y
  Successfully uninstalled pandas-1.3.5
pip install pandas==1.3.4

没有用。。。。


重新使用conda安装试试

██ conda create -n metapi_525 python=3.7
██ source activate metapi_525
██ conda install -c bioconda metapi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.                                                                  failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.27=0
  - python=3.7 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.27

难道是系统原因。。。
在WIN10下:

(metapi_525) D:\BGI\01.Project\metapi_525>conda install -c bioconda metapi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done                                                          
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /                                                              
Found conflicts! Looking for incompatible packages.   
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                         
                                                                                               
UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

不得不说,conda是真的垃圾
继续在win10中:pip3 install metapi==2.1.1…问题也是难以解决。。。。


2022-05-26 四月廿六;阴转阵雨 28℃; CNGB 深圳;

看一看集群上的版本:

██ metapi -v
metapi version 1.0.5

。。。很难受吽

若果是系统原因,我可以尝试在集群上安装新版本。
安装目录:

/hwfssz5/ST_HEALTH/P18Z10200N0127/PROJECT/P18Z10200N0127_GRJ/houyaiyang/share/app/Anaconda3
 类似资料: