I am trying to extract the base algorithm from a visual basic software, to port it in python or PHP. It seems simple in theory but I am not a professional programmer. I know python and a little PHP but I know very little about Visual Basic. I've tried to stick to visual basic but it seems that any changes I made to this software (PromKappa) damages the program. Can someone help me with a simpler version in python (or PHP)?
Any help is greatly appreciated, thanks!
It seems to me you'd have to be able to write out the algorithm, so that you can port it to your language of choice. If you don't understand it enough to write it out (i.e. as in pseudo-code), you risk programming something that may give you a result, with no guarantee that it's the correct result. "Extracting the algorithm" means you could write it down for someone. Poking around with visual basic, with the goal of getting an output that doesn't break the program, sounds kind of scary. Better to take the time to understand what's going on, and avoid black boxes.
Last night I read your comment and I stood a little to digest the problem. I need 3 functions: the first one (that I have from other experiments) should feed with sliding windows other two functions (one calculates Kappa and one calculates the CG content). Thus, each sliding window generates a point with the x=CG and y=kappa. If all goes well my code it should reach a very bizarre pattern, but that's just in theory for now.
The program you have linked seems to be very simple. Basically, it just calculates the GC content of a promoter region, and an index of coincidence, which I think is a sort of alignment score. Which part of this algorithm do you want to reproduce?
That is the problem, that in theory is easy, but when I looked at PromKappa source code I remained "cross-eyed", it was too complicated. The software does much more than it is explained in the article and the source code does not have explanatory comments for each function or line of code. I originally wanted to cut the source code until only the section that interests me remains functional. The reason I want to port it is that the kappa index of coincidence is fundamentally different from sequence alignments (the analysis is done on a single sequence).
You need to edit this question to highlight the bioinformatics problem you are trying to solve. Right now it looks like a generic programming question.
I try to make the simplified python version of this program, because I do not know visual basic. If my python implementation does not work in any way, I will make a new post here that will include my code in python for a direct advice on the code. The end result of my code must look something like this:http://upload.wikimedia.org/wikipedia/commons/4/4c/Insulin_gene_promoter.png
Still sounds like a generic programming question :) Care to try again?
I found the hard solution for PHP ...http://www.design215.com/toolbox/asp.php
Please look one minute at the software:http://www.biomedcentral.com/content/supplementary/1471-2164-13-512-s3.rar. I want to know which function handles kappa and the C + G. thanks.
I was not able to do much with the converter, for example this function:
is converted in:
which really confused me even more :)