in reply to Re: Iterative BLAST(N) program
in thread Iterative BLAST(N) program
Thanks for the reply.
So the part at "# get header and sequence with 'fastacmd' and write to new fasta file" is handled correctly? Cuz I'm trying to get only new hits to use in the next rounds and so on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Iterative BLAST(N) program
by GrandFather (Saint) on Jun 08, 2011 at 23:13 UTC | |
I can't tell because I don't know what the lines you are dealing with look like. I can only help with overall structure and technique. On the face of it the handling looks OK, but it does depend very much on the content of the first two fields on each line. Can the letter case of the contents be different or can numeric representation be different between the fields for example? I've applied the changes I suggested in my reply along with a few others to give:
Note that I've eliminated system calls to delete files and get the date and replaced them with the equivalent Perl functions! So far as I can see there are no changes in the logic of the code, but to my mind it is somewhat cleaner.
True laziness is hard work
| [reply] [d/l] |
by Tjuh (Novice) on Jun 09, 2011 at 10:09 UTC | |
Thank u GrandFather for cleaning up the code a bit, much appreciated Im adding an example blastoutput ($saveblast) of the first and second round so u can see if im doing it rite Round 1 blast output
round 2 blast output
As u can see for example 2004099281 and 2004082897 in the second column, they appear in both rounds, and what im trying to do is to only get the new uniq hits that are to be used in new rounds. I hope i made myself a bit clear, its a bit different to explain. | [reply] [d/l] [select] |
by GrandFather (Saint) on Jun 09, 2011 at 12:02 UTC | |
I started working through your code to eliminate the system calls and modify the file I/O to use string files when I realised that toolic had already identified a major bug with your code. See his second bullet point in Re: Iterative BLAST(N) program. toolic also makes the very strong point that you should write some test code or otherwise validate your results using a test set of data. It may be that the following self contained sample code provides a test bed for you to determine what you need to know:
The major interesting technique here (used in various ways in several places) is using a variable as a file. That avoids writing or reading any actual files at all, but allows most of the interesting processing code to remain intact.
True laziness is hard work
| [reply] [d/l] |