friend1ws / nanomonsv

SV detection tool for nanopore sequence reads
GNU General Public License v3.0
78 stars 12 forks source link

TypeError: 'NoneType' object is not subscriptable #42

Closed myxotheles closed 11 months ago

myxotheles commented 1 year ago

Hi, I am running nanomonsv as part of a nanopore workflow (wf-somatic-variation). As input for normal I have an illumina sequenced BAM and as tumour I have a nanopore BAM. I checked the normal and tumour input BAMs with samtools quickcheck and they show no errors.

I am running this on Linux Centos cluster with 16 cores and 3GB/core allocated. The workflow always crashes when nanomonsv is called. I am trying to isolate the problem, not sure if it is the nextflow or the nanomonsv or a ressource problem.

Have also posted in https://github.com/epi2me-labs/wf-somatic-variation but had no response so far.

Caused by:
  Process `somatic_sv:nanomonsv_parse (2)` terminated with an error exit status (1)

Command executed:

  export REF_PATH=ref_cache/%2s/%2s/%s
  mkdir C3634_normal/
  nanomonsv parse C3634_recalibrated.bam C3634_normal/parsed

Command exit status:
  1

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_TMP is set, but APPTAINERENV_TMP is preferred
  INFO:    Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  Traceback (most recent call last):
    File "/home/epi2melabs/conda/bin/nanomonsv", line 10, in <module>
      sys.exit(main())
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/__init__.py", line 13, in main
      args.func(args)
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/run.py", line 40, in parse_main
      parse_alignment_info(args.bam_file, args.output_prefix + ".tmp.deletion_info.txt", 
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/parse.py", line 44, in parse_alignment_info
      if cigartuples[0][0] == 5: left_hard_clipping_size = cigartuples[0][1]
  TypeError: 'NoneType' object is not subscriptable

Would be grateful for some help to understand where the problem coul dbe .

friend1ws commented 11 months ago

nanomonsv is basically tested for the BAM/CRAM files via minimap2. We do not support short read BAM/CRAM files.