アラインメント後に 2 つのアミノ酸配列の違いを取得したい
たとえば、次のようになります。
target: LTTYEYLDDCRDDEE
query: LATYYYLDDCRDDEE
アミノ酸の変化とそれがどこで起こるのか知りたいです。
これが私のコードです:
//alignment
try {
String aaref = symL2ref.seqString();
ProteinSequence sRef = new ProteinSequence(aaref);
String aaseq = symL2.seqString();
ProteinSequence sSeq = new ProteinSequence(aaseq);
SubstitutionMatrix<AminoAcidCompound> matrix2 = SubstitutionMatrixHelper.getBlosum65();
GapPenalty penalty = new SimpleGapPenalty();
short gop = 8;
short extend = 1;
penalty.setOpenPenalty(gop);
penalty.setExtensionPenalty(extend);
PairwiseSequenceAligner<ProteinSequence, AminoAcidCompound> smithWaterman = Alignments.getPairwiseAligner(sRef, sSeq, PairwiseSequenceAlignerType.LOCAL, penalty, matrix2);
SequencePair<ProteinSequence, AminoAcidCompound> psa2 = smithWaterman.getPair();
System.out.println("alignment: \n" + psa2);
int startt = 1;
int endd = psa2.getLength();
Mut mut = new Mut();
//amino acid difference
int k;
for(k = startt; k <= endd; ++k) {
AminoAcidCompound aadifftarget = (AminoAcidCompound)psa2.getCompoundInTargetAt(k);
int aadiff = psa2.getIndexInQueryAt(k);
AminoAcidCompound aadiffquery = (AminoAcidCompound)psa2.getCompoundInQueryAt(k);
if (!((AminoAcidCompound)psa2.getQuery().getCompoundAt(k)).equals(psa2.getTarget().getCompoundAt(k))) {
mut.getQuer(aadiffquery);
}
mut.getPos(aadiff);
mut.getTarg(aadifftarget);
}
//trying to make a relevant output
System.out.println("aadifftarget: \n" + mut);
System.out.println(psa2.getIndexInQueryAt(1));
System.out.println(psa2.getIndexInTargetAt(1));
System.out.println(psa2.getCompoundInQueryAt(1));
System.out.println(psa2.getCompoundInTargetAt(1));
k = psa.getNumIdenticals();
} catch (BioException var53) {
var53.printStackTrace();
}
使用可能な出力が得られません。T2A、E5Y を含むオブジェクトを取得するにはどうすればよいですか?
あなたの助けとコメントに感謝します!