gaoyubang / nanom6A

MIT License
18 stars 11 forks source link

the error about predict_sites #7

Open woshiyangsi opened 3 years ago

woshiyangsi commented 3 years ago

(nanom6A_env) [yangsiyu@localhost A]$ python ~/software/nanom6A_2021_3_18/predict_sites.py --cpu 20 -i 0_fast5_pass_test0_single_result -o 0_fast5_pass_test0_single_result_final -r /home/yangsiyu/genome/ENSEMBLE/ref.chr.bed -g /home/yangsiyu/genome/ENSEMBLE/ref.fa \

--model /home/yangsiyu/software/nanom6A_2021_3_18/bin/model/ genome file ok! genome file index ok! samtools ok! bedtools ok! minimap2 ok! sam2tsv ok! check finsh! mkdir: 无法创建目录"0_fast5_pass_test0_single_result_final": 文件已存在 1.start predict extract AAACA predicting AAACA Traceback (most recent call last): File "/home/yangsiyu/software/nanom6A_2021_3_18/predict_sites.py", line 552, in run_main() File "/home/yangsiyu/software/nanom6A_2021_3_18/predict_sites.py", line 473, in run_main predict(tpp,"%s/%s.tsv"%(basefl,tpp),basefl) File "/home/yangsiyu/software/nanom6A_2021_3_18/predict_sites.py", line 19, in predict model = joblib.load(filename="%s/%s.m"%(FLAGS.model.rstrip("/"),tpp)) File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 585, in load obj = _unpickle(fobj, filename, mmap_mode) File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 504, in _unpickle obj = unpickler.load() File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/pickle.py", line 1088, in load dispatchkey[0] File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 329, in load_build Unpickler.load_build(self) File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/pickle.py", line 1552, in load_build setstate(state) File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/site-packages/xgboost/core.py", line 1267, in setstate _LIB.XGBoosterUnserializeFromBuffer(handle, ptr, length)) File "/home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/site-packages/xgboost/core.py", line 210, in _check_call raise XGBoostError(py_str(LIB.XGBGetLastError())) xgboost.core.XGBoostError: [17:40:07] ../src/learner.cc:956: Check failed: header == serialisation_header:

If you are loading a serialized model (like pickle in Python) generated by older XGBoost, please export the model by calling Booster.save_model from that version first, then load it back in current version. There's a simple script for helping the process. See:

https://xgboost.readthedocs.io/en/latest/tutorials/saving_model.html for reference to the script, and more details about differences between saving model and serializing.

Stack trace: [bt] (0) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/libxgboost.so(+0x1bde1b) [0x7fdc70d01e1b] [bt] (1) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/libxgboost.so(+0x1d7db2) [0x7fdc70d1bdb2] [bt] (2) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/libxgboost.so(XGBoosterUnserializeFromBuffer+0x50) [0x7fdc70be5b00] [bt] (3) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/lib-dynload/../../libffi.so.7(+0x69ed) [0x7fdc760b99ed] [bt] (4) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/lib-dynload/../../libffi.so.7(+0x6077) [0x7fdc760b9077] [bt] (5) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2f4) [0x7fdc760cf794] [bt] (6) /home/yangsiyu/software/miniconda3/envs/nanom6A_env/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x10ff8) [0x7fdc760cfff8] [bt] (7) python(_PyObject_FastCallKeywords+0x48b) [0x55ffd6884a5b] [bt] (8) python(+0x18fb59) [0x55ffd6885b59]

gaoyubang commented 3 years ago

It seems that the cond env is not the same with conda.yml. Such as the python version and sklearn model.

  1. conda env remove -n nanom6A_env
  2. cd nanom6A_2021_3_18 conda env create -f conda.yml

Then try again.

gaoyubang commented 3 years ago

image Please check your network.

woshiyangsi commented 3 years ago

ok.I will try tomorrow. thank u for your reply.

woshiyangsi commented 3 years ago

i have solved this problem,thank u!And i have any other problems. 1. tombo resquiggle --overwrite --basecall-group 1 fast5_pass_single /home/yangsiyu/genome/ENSEMBLE/ref.cdna.all.fa --processes 10 --fit-global-scale --include-event-stdev

then i got an error tombo resquiggle --overwrite --basecall-group 1 fast5_pass_single /home/yangsiyu/genome/ENSEMBLE/Sus_scrofa.Sscrofa11.1.cdna.all.fa --processes 10 --fit-global-scale --include-event-stdev [08:20:30] Loading minimap2 reference. [08:20:36] Getting file list. **** ERROR **** Reads do not to contain basecalls. Check --basecall-group option if basecalls are stored in non-standard location or use tombo preprocess annotate_raw_with_fastqs to add basecalls from FASTQ files to raw FAST5 files.

so i dont use the --basecall-group. tombo resquiggle --overwrite fast5_pass_single /home/yangsiyu/genome/ENSEMBLE/ref.cdna.all.fa --processes 40 --fit-global-scale --include-event-stdev

then,it worked!I want to know if not using this parameter( --basecall-group) will affect the result?

2.python ~/software/nanom6A_2021_3_18/predict_sites.py --cpu 20 -i 0_fast5_pass_test0_single_result -o 0_fast5_pass_test0_single_result_final -r /home/yangsiyu/genome/ENSEMBLE/Sus_scrofa.Sscrofa11.1.104.chr.bed -g /home/yangsiyu/genome/ENSEMBLE/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa --model /home/yangsiyu/software/nanom6A_2021_3_18/bin/model/

This code is inconsistent with your readme manual.your manual dont have the paramete( --model )

gaoyubang commented 3 years ago

1.You need to re-basecalled the fast5 file using guppy, and the output will contains the new basecalled group Basecall_1D_001 beside the default Basecall_1D_000.

  1. What the manual mentioned is the binary version, there is some different with the source code version which you used.
woshiyangsi commented 3 years ago

Hi yubang, 2.When I run the software in the bin file, the following error occurred. Is the running result in the python script I run and the bin file consistent? (nanom6A_env) [yangsiyu@localhost bin]$ python extract_raw_and_feature_fast File "extract_raw_and_feature_fast", line 1 SyntaxError: Non-UTF-8 code starting with '\xe8' in file extract_raw_and_feature_fast on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

gaoyubang commented 3 years ago

extract_raw_and_feature_fast is binary file, you can run it directly without python, just extract_raw_and_feature_fast

woshiyangsi commented 3 years ago

but i got the gcc error. (nanom6A_env) [yangsiyu@localhost bin]$ ./extract_raw_and_feature_fast -h Traceback (most recent call last): File "extract_raw_and_feature_fast.py", line 5, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/statsmodels/robust/init.py", line 5, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/statsmodels/robust/norms.py", line 1, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/statsmodels/compat/init.py", line 1, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/statsmodels/tools/init.py", line 1, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/statsmodels/tools/tools.py", line 7, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/init.py", line 42, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/api.py", line 26, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/groupby/init.py", line 1, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/groupby/groupby.py", line 37, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/frame.py", line 100, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/series.py", line 4390, in File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/generic.py", line 10138, in _add_series_or_dataframe_operations File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 395, in load_module File "/media/gyb/data1/data/miniconda3_bin/envs/pyinstaller_py/lib/python2.7/site-packages/pandas/core/window.py", line 14, in File "/tmp/pip-install-dBKkVS/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 684, in load_module ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /tmp/_MEIreGh1B/libstdc++.so.6) [70593] Failed to execute script extract_raw_and_feature_fast

woshiyangsi commented 3 years ago

Is the running result in the python script I run and the bin file consistent?

gaoyubang commented 3 years ago

Yes

woshiyangsi commented 3 years ago

ok,i got it. thank u!

lalalala123-la commented 10 months ago

1.You need to re-basecalled the fast5 file using guppy, and the output will contains the new basecalled group Basecall_1D_001 beside the default Basecall_1D_000. 2. What the manual mentioned is the binary version, there is some different with the source code version which you used.

Hi,In the step of tombo resquiggle,I also want to know if not using this parameter( --basecall-group) will affect the result? (this is the result of tombo resquiggle:) image