作者chen1i6c04 (輕踏水無痕)
看板Perl
標題[問題] 程式運行時發生錯誤
時間Tue Aug 8 11:47:42 2017
因為工作上的需要接觸了一些使用Perl寫的生物資訊軟體
但按照指示安裝並運行測試指令後,出現以下錯誤
$ Can't use an undefined value as an ARRAY reference at mlst.pl line 898, <TBL> line 6221.
錯誤訊息的程式碼如下
for (my
$i=0; $i < scalar(@$hitArray);
$i++){
my
$tmpQuerySingleLine = @$queryArray[
$i];
my
$tmpHomoSingleLine = @$homoArray[
$i];
my
$tmpHitSingleLine = @$hitArray[
$i];
$txtresults .= "MLST allele seq: ".
$tmpQuerySingleLine."\n";
$txtresults .= " ".
$tmpHomoSingleLine."\n";
$txtresults .= "Hit in genome: ".
$tmpHitSingleLine."\n\n";
$allelealign .=
$tmpQuerySingleLine."\n";
$hits .=
$tmpHitSingleLine."\n";
}#end for
麻煩各位幫忙看一下,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 117.56.12.50
※ 文章網址: https://www.ptt.cc/bbs/Perl/M.1502164065.A.2E0.html
※ 編輯: chen1i6c04 (117.56.12.50), 08/08/2017 14:48:29
→ herculus6502: 所以898行是哪一行?有附測試資料嗎?這樣很難抓吔 08/08 15:52
→ chen1i6c04: 問題已解決,似乎是測試資料有問題,真是不好意思 08/08 16:11