作者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://webptt.com/cn.aspx?n=bbs/Perl/M.1502164065.A.2E0.html
※ 编辑: chen1i6c04 (117.56.12.50), 08/08/2017 14:48:29
1F:→ herculus6502: 所以898行是哪一行?有附测试资料吗?这样很难抓吔 08/08 15:52
2F:→ chen1i6c04: 问题已解决,似乎是测试资料有问题,真是不好意思 08/08 16:11