nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

Failed to run medaka consensus #458

Closed Ghanizadeh1980 closed 8 months ago

Ghanizadeh1980 commented 10 months ago

Hi, I am a novice in de novo genome assembly and try to get my head around it. I have been trying to run medaka, but half way through analysis it fails and the message below pops up

"line 153: 322692 Killed medaka consensus "${CALLS2DRAFT}.bam" "${CONSENSUSPROBS}" --model "${MODEL}" --batch_size "${BATCH_SIZE}" --threads "${THREADS}" Failed to run medaka consensus."

Here is the command that I used to run medaka: "medaka_consensus -i ~/GBassembly-lastrun-13-08.23/GBmixed.nanofilt.fastq -d ~/GBassembly-lastrun-13-08.23/racon/GBmixedlastassemblyracon.fasta -o ~/medaka/GBmixedlastassemblymedaka -b 50 -t 10 -m r941_min_fast_g507"

I am using the most recent version of medaka (v. 1.9.1), which I installed using pip install. My OS is Ubuntu 20.04.6. Further info regarding GPU, CUDA, etc. can be found below:

NVIDIA-SMI 535.86.05 Driver Version: 535.86.05 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 Quadro K620 Off | 00000000:05:00.0 On | N/A | | 34% 29C P8 1W / 30W | 378MiB / 2048MiB | 1% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1366 G /usr/lib/xorg/Xorg 31MiB | | 0 N/A N/A 2708 G /usr/lib/xorg/Xorg 138MiB | | 0 N/A N/A 2837 G /usr/bin/gnome-shell 76MiB | | 0 N/A N/A 311078 G ...0219878,17514106022886242494,262144 74MiB | | 0 N/A N/A 317548 G ...sion,SpareRendererForSitePerProcess 43MiB

Can you please help me withthis?

Cheers,

Hossein.

cjw85 commented 10 months ago

I'm not certain what is happening here. I would suggest however that your GPU is not really up to the job. You should disable use of your GPU whilst running medaka be setting the CUDA_VISIBLE_DEVICES environment variable, e.g.:

export CUDA_VISIBLE_DEVICES=""
medaka_consensus ...
Ghanizadeh1980 commented 9 months ago

Hi,

Thanks for your suggestion, however, the issue still persists. I also realized this message "Pileup counts do not span requested region, requested contig". Please see below for further info:

[15:55:15 - Predict] Processing 18178 short region(s). [15:55:15 - MdlStrTF] Model <keras.engine.sequential.Sequential object at 0x7f2cb0614d60> [15:55:15 - MdlStrTF] loading weights from /tmp/tmp2jijomoc/model/variables/variables [15:55:15 - Sampler] Initializing sampler for consensus of region contig_10:0-6983. [15:55:15 - Sampler] Initializing sampler for consensus of region contig_10015:0-8326. [15:55:15 - PWorker] Running inference for 95.1M draft bases. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10:0-6983, received 1152-6982. [15:55:16 - Feature] Processed contig_10:1152.0-6982.0 (median depth 2.0) [15:55:16 - Sampler] Took 0.14s to make features. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10015:0-8326, received 510-1778. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10037:0-5883. [15:55:16 - Feature] Processed contig_10015:510.0-1778.0 (median depth 1.0) [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10015:0-8326, received 2936-8053. [15:55:16 - Feature] Processed contig_10015:2936.0-8053.0 (median depth 2.0) [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10037:0-5883, received 924-2599. [15:55:16 - Sampler] Took 0.29s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10046:0-9759. [15:55:16 - Feature] Processed contig_10037:924.0-2599.0 (median depth 2.0) [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10037:0-5883, received 2724-5808. [15:55:16 - Feature] Processed contig_10037:2724.0-5808.0 (median depth 2.0) [15:55:16 - Sampler] Took 0.26s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_1005:0-5169. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10046:0-9759, received 3-9758. [15:55:16 - Feature] Processed contig_10046:3.0-9758.0 (median depth 5.0) [15:55:16 - Sampler] Took 0.18s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10054:0-7969. [15:55:16 - Feature] Processed contig_1005:0.0-5168.0 (median depth 4.0) [15:55:16 - Sampler] Took 0.16s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10069:0-3815. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10054:0-7969, received 0-7768. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10069:0-3815, received 4-3618. [15:55:16 - Feature] Processed contig_10054:0.0-7768.0 (median depth 17.0) [15:55:16 - Sampler] Took 0.22s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10079:0-7506. [15:55:16 - Feature] Processed contig_10069:4.0-3618.0 (median depth 3.0) [15:55:16 - Sampler] Took 0.19s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10124:0-9126. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10079:0-7506, received 863-6829. [15:55:16 - Feature] Processed contig_10079:863.0-6829.0 (median depth 2.0) [15:55:16 - Sampler] Took 0.13s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10127:0-8411. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10124:0-9126, received 1-9125. [15:55:16 - Feature] Processed contig_10124:1.0-9125.0 (median depth 4.0) [15:55:16 - Sampler] Took 0.09s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10162:0-4861. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10127:0-8411, received 1608-8410. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10162:0-4861, received 437-4857. [15:55:16 - Feature] Processed contig_10127:1608.0-8410.0 (median depth 3.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10195:0-6662. [15:55:16 - Feature] Processed contig_10162:437.0-4857.0 (median depth 3.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10208:0-9543. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10195:0-6662, received 144-6661. [15:55:16 - Feature] Processed contig_10195:144.0-6661.0 (median depth 5.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10211:0-7779. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10208:0-9543, received 486-9542. [15:55:16 - Feature] Processed contig_10208:486.0-9542.0 (median depth 3.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10213:0-7049. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10211:0-7779, received 5-7778. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10213:0-7049, received 0-6357. [15:55:16 - Feature] Processed contig_10211:5.0-7778.0 (median depth 3.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10223:0-8313. [15:55:16 - Feature] Processed contig_10213:0.0-6357.0 (median depth 2.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10227:0-4829. [15:55:16 - Feature] Processed contig_10223:0.0-8312.0 (median depth 4.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Sampler] Initializing sampler for consensus of region contig_10248:0-7738. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10248:0-7738, received 214-2619. [15:55:16 - Feature] Processed contig_10248:214.0-2619.0 (median depth 1.0) [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10248:0-7738, received 3514-7737. [15:55:16 - Feature] Processed contig_10248:3514.0-7737.0 (median depth 2.0) [15:55:16 - Sampler] Took 0.01s to make features. [15:55:16 - Feature] Pileup counts do not span requested region, requested contig_10227:0-4829, received 96-4828. [15:55:16 - Feature] Processed contig_10227:96.0-4828.0 (median depth 41.0) [15:55:16 - Sampler] Took 0.02s to make features. [15:55:36 - PWorker] Batches in cache: 8. [15:55:36 - PWorker] 0.0% Done (0.0/95.1 Mbases) in 21.0s

Any ideas?

Cheers.

cjw85 commented 9 months ago

The above is normal medaka output, albeit you appear to have a very large number of short contigs in you assembly to which very few reads align.