comprna / METEORE

Automatic DNA methylation detection from nanopore tools and their consensus model
MIT License
72 stars 18 forks source link

Megalodon Example : AssertionError: Alphabet (ACGT) and model number of modified bases (-41) do not agree. #24

Closed Fatihlrcfs closed 2 years ago

Fatihlrcfs commented 2 years ago

Hi All, I am using the command below, I got this error. could you offer me how can ı solve that? I have CPU for analysis and working on example data which is provided from meteore. thanks best. command: megalodon data/example/ --outputs mods --reference data/ecoli_k12_mg1655.fasta --mod-motif m CG 0 --write-mods-text --processes 10 --guppy-server-path /cluster/lrcfs/2397405/bin/ont-guppy-cpu-5.0.16/bin/guppy_basecall_server --guppy-params "-d /cluster/lrcfs/2397405/bin/rerio/basecall_models/ --num_callers 10" --guppy-timeout 400 --guppy-config res_dna_r941_min_modbases_5mC_CpG_v001.cfg --overwrite

Error: [14:47:06] Running Megalodon version 2.3.5 [14:47:06] Loading guppy basecalling backend [2021-12-02 14:47:08.803475] [0x00002b838f646700] [info] Connecting to server as '' [2021-12-02 14:47:08.805161] [0x00002b838f646700] [info] Connected to server as ''. Connection id: 7db2bf17-16c4-4ae3-86bd-31537a63d4bf [14:47:08] Loading reference **** WARNING: "mods" output requested, so "per_read_mods" will be added to outputs. **** [14:47:09] Loaded model calls canonical alphabet ACGT and modified bases m=5mC (alt to C) Traceback (most recent call last): File "/cluster/lrcfs/ftiras/ftiras_env/envs/nanoplot/bin/megalodon", line 11, in sys.exit(_main()) File "/cluster/lrcfs/ftiras/ftiras_env/envs/nanoplot/lib/python3.8/site-packages/megalodon/main.py", line 726, in _main megalodon._main(args) File "/cluster/lrcfs/ftiras/ftiras_env/envs/nanoplot/lib/python3.8/site-packages/megalodon/megalodon.py", line 1775, in _main args, mods_info = parse_mod_args( File "/cluster/lrcfs/ftiras/ftiras_env/envs/nanoplot/lib/python3.8/site-packages/megalodon/megalodon.py", line 1448, in parse_mod_args mods_info = mods.ModInfo( File "/cluster/lrcfs/ftiras/ftiras_env/envs/nanoplot/lib/python3.8/site-packages/megalodon/mods.py", line 2211, in init assert ( AssertionError: Alphabet (ACGT) and model number of modified bases (-41) do not agree.

zakayuen commented 2 years ago

Sorry for the late response. Not sure if you have solved this by yourself.

Anyway, I will update the Megalodon code very soon, using Guppy for canonical basecalling and Remora for modified basecalling (not rerio anymore)

zakayuen commented 2 years ago

We have updated the Megalodon commands for your reference. We are now using the modified basecalling model in Remora, not Rerio.

You can choose the right pre-trained model in Remora for your project. See the models: remora model list_pretrained