hotel has asked for the wisdom of the Perl Monks concerning the following question:
I am new to Perl as I am new to this website. I actually can be considered new to programming even. I've been working on a Perl script for the last few days and now even though it works fine (as far as i understand from my outputs) it displays a warning that i cannot figure out the reason. Below you can find a part of the text file (the file consists of this motif only) that my script parses and my the piece of my code that seems to be the trouble maker.
The warning message i get from the command prompt is this:
.....(the same warning with different line numbers) ...........
Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl
asmodium\plasm-backup.pl line 92, <geneREAD> line 2454.
Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl
asmodium\plasm-backup.pl line 92, <geneREAD> line 2463.
Argument "" isn't numeric in numeric le (<=) at C:\Users\kullaniciadi\Desktop\pl
asmodium\plasm-backup.pl line 92, <geneREAD> line 2463.
......(the same warning with different line numbers)
Here is the input file:
Gene: PF14_0747
TABLE: Epitopes from IEDB
Epitope Sequence Location on Protein Strain Confidence
26850 IKND 1914-1917 Plasmodium falciparum 3D7 Medium
------------------------------------------------------------
Gene: PF14_0711
TABLE: Epitopes from IEDB
Epitope Sequence Location on Protein Strain Confidence
26850 IKND 9-12 Plasmodium falciparum 3D7 Medium
------------------------------------------------------------
and here is the essential piece of my code
I do not understand how the line consisting of dashes enter the if in which i (should only) have two numeric values. Thank you for your time.my $ctr; while($line2=<geneREAD>) { $ctr=0; chomp($line2); if($line2=~ m/^Gene:\s*(.*)/) { $geneName= $1; #print "$geneName\n"; if(grep(/^$geneName$/, @geneArr)) { while(substr($line2, 0 , 3) ne "---") { #print "$line2\n"; $line2=<geneREAD>; chomp($line2); if($line2=~ m/(\d*)\s*([A-Z]*)\s*(\d*)-(\d*)/) { $epitope= $1; $epiSeq= $2; $locBeg=$3; $locEnd=$4; foreach $snpID(@ {$snpHash{$geneName}}) { #print "$snpID $HoProPos{$snpID}\n"; if($locBeg <= $HoProPos{$snpID} && $HoProPos{$ +snpID} <= $locEnd) { if($ctr== 0) {print OUT "Gene: $geneName\n";} print OUT "SNP $snpID found in epitope $ep +itope at protein position $HoProPos{$snpID}\n"; $ctr=1; } } #print "$1 $2 $3 $4\n" } } } } }
ps: Please warn me if i could not formulate the question well enough or if i didnt provide enough information/code or if i provided more than required, as this is my first post.
|
---|