How to display differences after biojava alignment?
0
0
Entering edit mode
6.2 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!!

biojava alignment • 1.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 2652 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6