LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tool like diff to compare two files & make graphical output highlighting differences? (http://www.linuxquestions.org/questions/linux-newbie-8/tool-like-diff-to-compare-two-files-and-make-graphical-output-highlighting-differences-4175420071/)

kmkocot 08-02-2012 06:50 PM

Tool like diff to compare two files & make graphical output highlighting differences?
 
Hi all,

I a large dataset of paired files representing amino acid sequences for a particular gene from different organisms. One file in each pair is a modified version of the other in which certain parts have been trimmed out. I need to manually evaluate the results of this trimming and would like to make figures out of some of the files as examples.

Is there a program like diff that could take two files and produce something like a pdf output in which parts of the file that differ are somehow highlighted?

Here's an example of an input file pair (the sequences themselves do not have any line breaks in them):
Code:

>1
DDFKIAVCSSNQNRSMEAHSFLSKKGFNVKSFGTGNMVKLPGPAPDKPNVYDFSITYDAMYRDLMQKDYELYTQNGILHMLDRNRRIKAHPERFQDSTERFDLLITCEERVYDQVLEDFENKEKQAVHIINIDIQDDHEEATIGAFMVCELVTMLYASDDLDNEVDEILQEFEHKVKRSVLHTAQ
>2
HEFRIAVCSSNQNRSMEAHSFLSKKGFCVKSFGTGNMVKLPGPAPDKPNIYDFSITYDAMYRDLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQAVHIINIDIQDNHEEATIGAFMICELVTMLFASEDLDNEIDEILQEFEHKVNRPVLHTVQ
>3
EILRIAVCSSNQNRSMEAHNFLSKRGFNVKSFGSGTHVKLPGPSPDRPNIYDFTTTYDQMYRDLIEKDKNLYTQNGLLHMLDRNRRIKEKPQRFQSCPDHFDLIITCEERVYDQVVEDLENRDNESCHIINIDIQDNHEEATIGAFMICDLVAMLAKCEDLDNEVDEMVQEFEGQCQDPCCTRLF

Code:

>1
DDFKIAVCSSNQNRSMEAHSFLSKKGFNVKSFGTGNMVKLPGPAPDKPNVYDFSITYDAMYRDLMQKDYELYTQNGILHMLDRNRRIKAHPERFQDSTERFDLLITCEERVYDQVLEDFENKEKQAVHIINIDIQDDHEEATIGAFMVCELVTMLYASDDLDNEVDEILQEFEHKVKRSVLHTAQ
>2
HEFRIAVCSSNQNRSMEAHSFLSKKGFCVKSFGTGNMVKLPGPAPDKPNIYDFSITYDAMYRDL                                                            QAVHIINIDIQDNHEEATIGAFMICELVTMLFASEDLDNEIDEILQEFEHKVNRPVLHTVQ
>3
EILRIAVCSSNQNRSMEAHNFLSKRGFNVKSFGSGTHVKLPGPSPDRPNIYDFTTTYDQMYRDLIEKDKNLYTQNGLLHMLDRNRRIKEKPQRFQSCPDHFDLIITCEERVYDQVVEDLENR    HIINIDIQDNHEEATIGAFMICDLVAMLAKCEDLDNEVDEMVQEFE

Any suggestions on how I could do this would be greatly appreciated!!!

Best,
Kevin

schneidz 08-02-2012 10:26 PM

i would do a byte to byte compare on the two sets in c and write them out to an xml file where you can change the color for non matched bytes.


All times are GMT -5. The time now is 01:59 PM.