epi2me-labs / wf-somatic-variation

Other
10 stars 5 forks source link

[Bug]: TypeError: 'NoneType' object is not subscriptable #2

Closed myxotheles closed 10 months ago

myxotheles commented 1 year ago

What happened?

Hi, I have run this workflow via command line on our HPC. We do not have docker/singularity but we have apptainer. Since apptainer and singularity are similar, I have tried to see if it works when specifying singularity. It seemed to run just fine but then crashed suddenly. I am not sure this error has got to do with apptainer, it looks more like a bug in python code

Operating System

CentOS Linux 7 (Core)

Workflow Execution

EPI2ME Labs command line

Workflow Execution - EPI2ME Labs Versions

No response

Workflow Execution - CLI Execution Profile

Singularity (Apptainer)

Workflow Version

v0.2.0-g5bcd48d

Relevant log output

Error executing process > 'somatic_sv:nanomonsv_parse (2)'

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 test_sample_normal/
  nanomonsv parse C3634_recalibrated.bam test_sample_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
myxotheles commented 1 year ago

Tried again with more memory, still not resolving. I checked my input bam with samtools quickcheck looks ok. This is probably a bug in nanomonsv or in the nextflow pipeline not passing data properly. Please can you look at this as this makes the workflow unworkable.

RenzoTale88 commented 1 year ago

Hi @myxotheles, I can see here that your normal file is generated with non-ONT datasets. I am not sure if nanomonsv supports them since it is specifically designed for ONT data. From our part, the workflow seems to be passing the inputs to the software correctly, so your guess that the crash lies with the software is correct.

I noticed that you opened an issue on the nanomonsv github page. I would suggest to wait for the reply from the nanomonsv developer before attempting to run the workflow again.

myxotheles commented 1 year ago

Dear @RenzoTale88 , thanks for your reply. We only have the control sequenced with Illumina. We could re-sequence it with nanopore though. However unfortunately, in practice you often don't have normal tissue for control, particularly with archived samples. If that is the case, is it possible to run the workflow in 'tumour only' mode?

RenzoTale88 commented 1 year ago

Unfortunately no, the workflow currently requires a tumor/normal pair to work properly. Mind that, although nanomonsv does call SVs using only the tumor samples, this mode has not been tested.