Entering edit mode
6.8 years ago
vmicrobio
▴
290
Hi!
I would like to compare 2 dna sequences and display the differences in nucleic acids on a screen and then convert this/these particular difference(s) in codons.
Here is how I display the alignment, I'm a little bit confuse on what to do on the following steps
private void alignment() throws CompoundNotFoundException {
String targetSeq = Reference.getRefSequence();
DNASequence target = new DNASequence(targetSeq, AmbiguityDNACompoundSet.getDNACompoundSet());
String querySeq = Sequence.getSequence();
DNASequence query = new DNASequence(querySeq, AmbiguityDNACompoundSet.getDNACompoundSet());
SubstitutionMatrix<NucleotideCompound> matrix = SubstitutionMatrixHelper.getNuc4_4();
SimpleGapPenalty gapP = new SimpleGapPenalty();
gapP.setOpenPenalty((short)5);
gapP.setExtensionPenalty((short)2);
SequencePair<DNASequence, NucleotideCompound> psa = Alignments.getPairwiseAlignment(query, target, PairwiseSequenceAlignerType.GLOBAL, gapP, matrix);
this.AlignmentResult.setText(psa.toString());
}
Thanks a lot in advance for any answers, suggestions or advices!!