* @param title String
* @param msa boolean
* @param alview AlignmentView
- * @param viewonly if true then the prediction will be made just on the concatenated visible regions
+ * @param viewonly if true then the prediction will be made just on the concatenated visible regions
*/
private void startJPredClient(String title, boolean msa,
jalview.datamodel.AlignmentView alview, AlignFrame parentFrame, boolean viewonly)
int spos=0;
int i=0;
if (viscontigs!=null) {
- // Construct the delMap - mapping from the positions within the input to Jnet to the contigs in the original sequence
-
+ // Construct the delMap - mapping from the positions within the input to Jnet to the contigs in the original sequence
+
delMap = new int[seq.getEnd()-seq.getStart()+1];
int gapMap[] = seq.gapMap();
for (int contig = 0; contig<viscontigs.length; contig += 2)
{
-
+
while (spos<gapMap.length && gapMap[spos]<viscontigs[contig]) {
spos++;
}
int tmap[] = new int[i];
System.arraycopy(delMap, 0, tmap, 0, i);
delMap=tmap;
- }
+ }
}
if (msa && msf.length > 1)
{
-
+
String altitle = "JNet prediction on "+(viewonly?"visible ":"") + seq.getName() +
" using alignment from " + title;
{
aln[i] = msf[i].getSeq('-');
}
-
-
+
+
Hashtable SequenceInfo = jalview.analysis.SeqsetUtils.uniquify(aln, true);
if (viewonly) {
// Remove hidden regions from sequence objects.
String seqs[] = alview.getSequenceStrings('-');
for (int i = 0, j = msf.length; i < j; i++)
- {
+ {
aln[i].setSequence(seqs[i]);
- }
+ }
seq.setSequence(seqs[0]);
- }
+ }
wsInfo.setProgressText("Job details for "+(viewonly?"visible ":"")+"MSA based prediction (" +
title + ") on sequence :\n>" + seq.getName() +
"\n" +
- AlignSeq.extractGaps("-. ", seq.getSequence()) +
+ AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) +
"\n");
JPredThread jthread = new JPredThread(wsInfo, altitle, server,
SequenceInfo, aln, delMap, alview, parentFrame, WsURL);
// Remove hidden regions from input sequence
String seqs[] = alview.getSequenceStrings('-');
seq.setSequence(seqs[0]);
- }
+ }
wsInfo.setProgressText("Job details for prediction on "+(viewonly?"visible ":"")+"sequence :\n>" +
seqname + "\n" +
- AlignSeq.extractGaps("-. ", seq.getSequence()) +
+ AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) +
"\n");
JPredThread jthread = new JPredThread(wsInfo, altitle, server, WsURL,
SequenceInfo, seq, delMap, alview, parentFrame);
wsInfo.setProgressText("Job details for MSA based prediction (" +
title + ") on sequence :\n>" + seq.getName() + "\n" +
- AlignSeq.extractGaps("-. ", seq.getSequence()) +
+ AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) +
"\n");
SequenceI aln[] = new SequenceI[msf.length];
for (int i = 0, j = msf.length; i < j; i++)
}
wsInfo.setProgressText("Job details for prediction on sequence :\n>" +
seq.getName() + "\n" +
- AlignSeq.extractGaps("-. ", seq.getSequence()) +
+ AlignSeq.extractGaps("-. ", seq.getSequenceAsString()) +
"\n");
String altitle = "JNet prediction for sequence " + seq.getName() + " from " +
title;