bcftoolsのindexがないときのエラーメッセージ
#CWL
結果
bcftoolsの実行でエラーになった
コマンド
code:bash
cwltool fixed_version_by_yamaken.cwl --header annots.hdr --annotationfile chr_Y_molecular_annotation.tsv.gz --vcf S1.haplotypecaller.vcf.gz S1.haplotypecaller_togovar.vcf.gz --output_name S1.haplotypecaller_togovar.vcf.gz
CWL
https://github.com/yamaken37/BioHackathonFiles2024/commit/5d0637b04416d5c1bf85e1786a5d1126d138fee6
エラーメッセージ
code:bash
E::bcf_sr_regions_init Could not parse the file /var/lib/cwl/stg42ecf495-2088-4b1d-ad1e-66d2dab0066b/chr_Y_molecular_annotation.tsv.gz, using the columns 3,4,4
Could not initialize the annotation file: /var/lib/cwl/stg42ecf495-2088-4b1d-ad1e-66d2dab0066b/chr_Y_molecular_annotation.tsv.gz
WARNING job vcf-togovar-annotation exited with status: 255
WARNING job vcf-togovar-annotation completed permanentFail
考察
そもそもbcftoolがindexがないときにその存在チェックエラーを出すべき、このエラーメッセージからindexファイルがないことに気がつくのは困難
対策
secondaryFiles:で実行環境にindexファイルを置いてあげるようにして、解決した。
https://github.com/yamaken37/BioHackathonFiles2024/commit/169b726d52f0dcd08b3384a5d4b64dedb8aa9f6e
メモ
bioinfomaticsではコマンドに渡すファイルの、indexファイルは同じディレクトリにある前提であり、コマンドにはindexファイルを明示的に指定しない。indexファイルがないと動かないのに、それを明示的にコマンド引数に指定しないのは、さまざまな不要なエラーや不要なデバッグ時間を発生させる。
せめて、indexファイルをinputに必要としているツールは、indexファイルの存在確認をエラーメッセージで出してほしい