Clinical-Genomics-Lund / nextflow_wgs

5 stars 5 forks source link

Starting from bam with modified group/sample ids fails at `build_mitochondrial_qc_json` #169

Open alkc opened 6 months ago

alkc commented 6 months ago
Error executing process > 'build_mitochondrial_qc_json (SampleA-trio-rank-model-fix)'

Caused by:
  Process `build_mitochondrial_qc_json (SampleA-trio-rank-model-fix)` terminated with an error exit status (1)

Command executed:

  mito_tsv_to_json.py SampleA-trio-rank-model-fix_mito_coverage.tsv SampleA-trio-rank-model-fix > "SampleA-trio-rank-model-fix_mito_qc.json"

Command exit status:
  1

Command output:
  (empty)

Command error:
  Traceback (most recent call last):
    File "/fs1/alkc/proj/nextflow_wgs/bin/mito_tsv_to_json.py", line 24, in <module>
      average_coverage = float(row[f"{args.sample_id}_mean_cvg"])
  KeyError: 'SampleA-trio-rank-model-fix_mean_cvg'

Work dir:
 ...

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`

In this case the KeyError occurred due to the identifier targetted by the python-script grabbing the sample name from the bam filename, which did not align with the sample name used in the rerun.

i.e. the sample data for the sample exists in the TSV but uses the name of the original bam file as sample identifier instead of the sample id specified in the input CSV

alkc commented 6 months ago

... This might also be something caused by accidentally starting with -resume