From: TZVanaalten Date: Wed, 16 Aug 2017 10:07:48 +0000 (+0100) Subject: JAL-2629 fix for hmmbuild not loading a HMM onto the current frame X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9790722e2a94c8caa26ffd89378ee81a51867a47;p=jalview.git JAL-2629 fix for hmmbuild not loading a HMM onto the current frame --- diff --git a/src/jalview/hmmer/HMMBuildThread.java b/src/jalview/hmmer/HMMBuildThread.java index 656b6e5..a9ca8ce 100644 --- a/src/jalview/hmmer/HMMBuildThread.java +++ b/src/jalview/hmmer/HMMBuildThread.java @@ -61,7 +61,8 @@ public class HMMBuildThread implements Runnable group = af.getViewport().getSelectionGroup(); forGroup = true; } - alignment = af.getViewport().getAlignment(); + viewport = af.getViewport(); + alignment = viewport.getAlignment(); } diff --git a/src/jalview/hmmer/HMMERCommands.java b/src/jalview/hmmer/HMMERCommands.java index e3fcd69..281e1dc 100644 --- a/src/jalview/hmmer/HMMERCommands.java +++ b/src/jalview/hmmer/HMMERCommands.java @@ -16,6 +16,13 @@ import java.io.PrintWriter; import java.util.Hashtable; import java.util.List; +/** + * Contains multiple commands and methods frequently used to run hmmbuild, + * hmmalign and hmmsearch + * + * @author TZVanaalten + * + */ public class HMMERCommands { // Path of hmmer binaries directory @@ -30,12 +37,6 @@ public class HMMERCommands public final String HMMSEARCH = "/hmmsearch "; - public String HMMBUFFER; - - public String ALIGNMENTBUFFER; - - public String ALIGNMENTINPUT; - public String OUTPUTALIGNMENT; public final String NAME = "-n "; @@ -56,18 +57,29 @@ public class HMMERCommands List hmmSeqs; + /** + * Uniquifies the sequences when exporting and stores their details in a + * hashtable. + * + * @param seqs + */ public void uniquifySequences(SequenceI[] seqs) { hash = jalview.analysis.SeqsetUtils.uniquify(seqs, true); } + /** + * Recover the sequence data lost by uniquifying. + * + * @param seqs + */ public void recoverSequenceNames(SequenceI[] seqs) { jalview.analysis.SeqsetUtils.deuniquify(hash, seqs); } /** - * Runs a command in the terminal. + * Runs a command in the command line. * * @param command * @throws IOException @@ -112,7 +124,7 @@ public class HMMERCommands } /** - * Exports an alignment to the buffer location in Jalview. + * Exports an alignment and/or HMM to the specified file. * * @param alignment * @throws IOException @@ -142,6 +154,12 @@ public class HMMERCommands } } + /** + * Adds any HMM sequences removed before submitting the alignment as a job + * back into the alignment. + * + * @param af + */ public void addHMMConsensusSequences(AlignFrame af) { AlignmentI al = af.getViewport().getAlignment(); @@ -156,11 +174,21 @@ public class HMMERCommands af.buildSortByAnnotationScoresMenu(); } + /** + * Returns the list of HMM sequences removed + * + * @return + */ public List getHmmSeqs() { return hmmSeqs; } + /** + * Sets the list of removed HMM sequences + * + * @param hmmSeqs + */ public void setHmmSeqs(List hmmSeqs) { this.hmmSeqs = hmmSeqs;