![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Stuck in Perl.. Partial code, but it needs more improvement.. Any suggestions, please?by glycine (Sexton) |
on May 27, 2021 at 15:12 UTC ( #11133141=note: print w/replies, xml ) | Need Help?? |
hello! becuase you mentioned about "CDS", "original", so I guess you want parser information from a genbank format file, right? (e.g. https://www.ncbi.nlm.nih.gov/nuccore/M85050.1) as cavac say, if you do not offer file format, other people can't understand what do you want to do, and then understand wether the code work good. so I can't offer how to make your code work correctly, too. there are some part of your maybe need change, I just try to give some advice:)
before this paragraph, @cd did not defined in anywher, so this will make script stop work, and because it assigned by itself, I can't understand purpose of this statements, so I don't know how to modify it, but I sure it won't work now.
this part have same problem, what is @origin?
I guess you defined subroutines in other site, so I don't what can they do, ;-;.
you used two style of open() in this code, first is better, please use it every times. you can use while(my $line = <$fh>){...}, this will read one line of file in each times. so you don't need read all content into a array, and don't need to find the last index before. if you actually treat a very big file, it will reduce ram occupied by program. p.s. yes, Bioperl can resolve most of problem.
In Section
Seekers of Perl Wisdom
|
|