[Biojava-l] accessing the HSP alignment using biojava
Tracy, Adam
Adam_Tracy at affymetrix.com
Thu May 13 20:59:25 EDT 2004
hello, and thank you for your contribution to biojava -
i'm following the example of how to parse blast alignments outlined on your
website here:
http://www.biojava.org/docs/bj_in_anger/ExtractSearchInformation.htm
now, i'm curious to access the consensus string that describes the
relationship between the subject and the query, for instance the middle row
below:
Query: 276 QSFQRVQGFKKMVDRWRNSHTRCMWQMTLSQRRNLYATLRMQDTMGQELALANKQLLMVR 455
+SFQ+ G KK VDRWRNSHT C+WQM L QRRN YATLRMQDTM QELALA KQLLMVR
Sbjct: 120 ESFQKAMGLKKTVDRWRNSHTHCLWQMALGQRRNPYATLRMQDTMVQELALAKKQLLMVR 179
in the code snippet below, i can get the two sequence fragments from the
seqString() method called on the SymbolList items contained within the
SubHit's Alignment, but not the consensus string. is there a protocol
defined in the API that might help me with this?
for (Iterator k = result.getHits().iterator(); k.hasNext(); ) {
SeqSimilaritySearchHit hit = (SeqSimilaritySearchHit) k.next();
for (Iterator alignments = hit.getSubHits().iterator();
alignments.hasNext();) {
SeqSimilaritySearchSubHit sh = (SeqSimilaritySearchSubHit)
alignments.next();
Alignment al = sh.getAlignment();
for (Iterator syms = al.symbolListIterator(); syms.hasNext();) {
SymbolList sl = (SymbolList) syms.next();
sl.seqString();
}
}
}
thank you for your time!
ant
--------
Adam Tracy | Staff Software Engineer | CIS Software Operations AFFYMETRIX,
INC. | 6550 Vallejo St. Suite 100 | Emeryville, CA 94608 | Tel: 510-428-8536
More information about the Biojava-l
mailing list