in reply to Parsing a file
I don't know exactly what are you trying to accomplish, but if you only want to extract the "Sbjct" lines you could simply try something like:
while (<$fh>) { print if (/Sbjct/){ }
As a side note, I'm not a fan of bioperl at all, but maybe it would be useful for you. You can try This tutorial to see how to parse Blast reports.
Also, it is always better to run blast with the option -m 8 and get the results in tabular format if your intention is to parse the results with a custom made script
Hope this helps
Update: The code has been updated to meet the poster output sample included
citromatik
|
|---|