in reply to Re^10: Help with pushing into a hash
in thread Help with pushing into a hash
You're very welcome! Return if you encounter more issues...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^12: Help with pushing into a hash
by jemswira (Novice) on Sep 02, 2012 at 07:09 UTC | |
Hey there kenosis. Sorry to bother you again. SO the program is no longer giving me error messages, but the pushing to the arrays here:
isn't working properly. For example I selected a specific number from $activin, which was in $uniprot, but it wasn't in the final output. So @activline, @antioxline and @toxinline are much smaller than they should be. So a lot of the data that is supposed to be in the output is not there anymore. I tried testing with this:
and it gave me the correct $2, I tried this too:
and it printed the correct thing. But if I removed the tests i put, and ran the normal code, E7F888 is not in @activline. Is there anything I could do to figure out what's wrong with my code? Here's it again.
THanks so much. | [reply] [d/l] [select] |
by Kenosis (Priest) on Sep 02, 2012 at 22:17 UTC | |
Hi, jemswira! This is no bother at all! You mentioned that the following captured a key that wasn't in the final set:
Try the following:
saywill print the scalar $_ which the regex operates on. By doing this, you can examine the line to verify that the matches the following regex:
Also, it may be that the 'key' is not being captured from $activin, since:
will work only if the 'key' if found in both files and the regexs which process both work as they should. Let me know what you find... | [reply] [d/l] [select] |
by jemswira (Novice) on Sep 03, 2012 at 06:27 UTC | |
well i ran the code and it returned this: E7F888 Name=arid5b ;PF01388which is correct. Well I selected the number cause it was in both files ( I manually ctrl-f ed the notepad file. Well a lot of lines are missing from the final output. The $activ is 512 kb large and the out put is 3kb. And also @activline is missing alot when I did print @activline;. I randomly selected E7F888 from $activin and checked to make sure it was in $uniprot, so it may be another offending line of data. If I did this:
I got this:
which showed that it was in %activ and that it was found in the file. But when I run through the normal code, it is not in @activ anymore. UPDATE, I ran the following code to check something, and not all the data is printed, I.E. A lot of lines are not pushed into the array.
I am sure that there are more lines that are supposed to be printed. E.G.
I shall try to reverse the order, I.E, make a hash out of $uniprot instead of $activ and run it again. | [reply] [d/l] [select] |
by Kenosis (Priest) on Sep 03, 2012 at 16:29 UTC |