[Biojava-l] Displaying a simple alignment blastoutput-like[Scanned]

Jolyon Holdstock jolyon.holdstock at ogt.co.uk
Tue Feb 9 15:40:54 UTC 2010


Does nothing become visible, if so how are you calling the panels/frame to display?

Can you post all your code?

-----Original Message-----
From: Louise Ott [mailto:anjolou at hotmail.com] 
Sent: 09 February 2010 15:18
To: biojava-l at lists.open-bio.org
Subject: [Biojava-l] Displaying a simple alignment blastoutput-like[Scanned]


Hi all !
I read and followed all the advices i found on the net and in this mailing list and i came to this :

public class OtherAlignmentPanel extends TranslatedSequencePanel {
    public otherAlignmentPanel(Alignment ali) {        this.setSequence((SymbolList) ali);        this.setBackground(Color.white);        this.setPreferredSize(new Dimension(MainFrame.screenSize.width -40, MainFrame.screenSize.height - 15));
        MultiLineRenderer multi = new MultiLineRenderer();        AlignmentRenderer render1 = new AlignmentRenderer();        AlignmentRenderer render2 = new AlignmentRenderer();        AlignmentRenderer render3 = new AlignmentRenderer();        SymbolSequenceRenderer symbol = new SymbolSequenceRenderer();
        render1.setLabel(ali.getLabels().get(0));        render1.setRenderer(symbol);
        multi.addRenderer(render1);
        render2.setLabel(ali.getLabels().get(1));        render2.setRenderer(symbol);
        multi.addRenderer(render2);
        render3.setLabel(ali.getLabels().get(2));        render3.setRenderer(symbol);
        multi.addRenderer(render3);
        this.setRenderer(multi);    }
}

I created the panel in a frame like this :
        Sequence seq1;        seq1 = ProteinTools.createGappedProteinSequence(hspHits.getHsp().get(0).getHspQseq(), "query");
        Sequence seq2;        seq2 = ProteinTools.createGappedProteinSequence(hspHits.getHsp().get(0).getHspHseq(), "hit");
        Sequence seq3;        seq3 = ProteinTools.createGappedProteinSequence(hspHits.getHsp().get(0).getHspMidline(), "midline");
        Map<String, Sequence> list = new HashMap();        list.put("query", seq1);        list.put("middle", seq2);        list.put("hit", seq3);
        SimpleAlignment ali = new SimpleAlignment((Map) list);        OtherAlignmentPanel pane = new otherAlignmentPanel(ali);	this.add(pane);



My problems :- First, it just shows nothing ! I am totally lost, it has been 3 days i am just trying to display this simple alignment but it doesn't work !!- I really would like the lines to be wrapped like in the blast output, so i tryied with the SequencePanelWrapper, but it doesn't work either...
Is there any simple solution ??What did i do wrong in my code ?


Have a nice day and thanks !
Louise
 		 	   		  
_________________________________________________________________
Découvrez Windows 7 en 7 secondes !
http://clk.atdmt.com/FRM/go/181574577/direct/01/
_______________________________________________
Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-l











This email has been scanned by Oxford Gene Technology Security Systems.




More information about the Biojava-l mailing list