import jalview.analysis.AlignSeq;
import jalview.analysis.SeqsetUtils;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.util.MessageManager;
import jalview.util.ShiftList;
private SequenceI refseq = null;
- private Hashtable seqProps;
+ private SequenceInfo seqProps;
/**
* Reference dataset sequence for the cigar string
package jalview.hmmer;
import jalview.analysis.AlignmentSorter;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import javax.swing.JInternalFrame;
int job = 0;
for (SequenceI[] seqs : subAlignments)
{
- Hashtable sequencesHash = stashSequences(seqs);
+ Map<String, SequenceInfo> sequencesHash = stashSequences(seqs);
try
{
File modelFile = FileUtils.createTempFile("hmm", ".hmm");
package jalview.hmmer;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
/**
* A class that runs the hmmbuild command as a separate process.
// at import level ?
SequenceI[] copyArray = copy.toArray(new SequenceI[copy.size()]);
- Hashtable sequencesHash = stashSequences(copyArray);
+ Map<String, SequenceInfo> sequencesHash = stashSequences(copyArray);
exportStockholm(copyArray, alignmentFile, ac);
package jalview.hmmer;
import jalview.analysis.SeqsetUtils;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
/**
* Base class for hmmbuild, hmmalign and hmmsearch
*
* @param seqs
*/
- protected Hashtable stashSequences(SequenceI[] seqs)
+ protected Map<String, SequenceInfo> stashSequences(SequenceI[] seqs)
{
return SeqsetUtils.uniquify(seqs, true);
}
/**
* Restores the sequence data lost by uniquifying
*
- * @param hashtable
+ * @param sequencesHash
* @param seqs
*/
- protected void recoverSequences(Hashtable hashtable, SequenceI[] seqs)
+ protected void recoverSequences(Map<String, SequenceInfo> sequencesHash, SequenceI[] seqs)
{
- SeqsetUtils.deuniquify(hashtable, seqs);
+ SeqsetUtils.deuniquify(sequencesHash, seqs);
}
/**
package jalview.hmmer;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import java.io.IOException;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import java.util.Scanner;
public abstract class Search extends HmmerCommand
boolean searchAlignment = true;
- Hashtable sequencesHash;
+ Map<String, SequenceInfo> sequencesHash;
public Search(AlignFrame alignFrame, List<ArgumentI> args)
{
*/
package jalview.io.packed;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.analysis.TreeModel;
import jalview.api.FeatureColourI;
import jalview.datamodel.AlignmentI;
/**
* @return the seqDetails
*/
- public Hashtable getSeqDetails()
+ public Map<String, SequenceInfo> getSeqDetails()
{
return seqDetails;
}
/**
* original identity of each sequence in results
*/
- Hashtable seqDetails;
+ Map<String, SequenceInfo> seqDetails;
public boolean relaxedIdMatching = false;
* @param parentAlignment
*/
public JalviewDataset(AlignmentI aldataset,
- Map<String, FeatureColourI> fc, Hashtable seqDets)
+ Map<String, FeatureColourI> fc, Map<String, SequenceInfo> seqDets)
{
// TODO not used - remove?
this(aldataset, fc, seqDets, null);
* with.
*/
public JalviewDataset(AlignmentI aldataset,
- Map<String, FeatureColourI> fc, Hashtable seqDets,
+ Map<String, FeatureColourI> fc, Map<String, SequenceInfo> seqDets,
AlignmentI parentAlignment)
{
this();
*/
package jalview.ws;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
protected List<ArgumentI> arguments = null;
- protected Hashtable<String, Map> SeqNames = new Hashtable();
+ protected Hashtable<String, SequenceInfo> SeqNames = new Hashtable();
public AWsJob()
{
package jalview.ws.jws1;
import jalview.analysis.AlignSeq;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.bin.Cache;
import jalview.datamodel.AlignmentView;
import jalview.datamodel.SeqCigar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Hashtable;
+import java.util.Map;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
aln[i] = msf[i].getSeq('-');
}
- Hashtable SequenceInfo = jalview.analysis.SeqsetUtils.uniquify(aln,
- true);
+ Map<String, SequenceInfo> SequenceInfo =
+ jalview.analysis.SeqsetUtils.uniquify(aln, true);
if (viewonly)
{
// Remove hidden regions from sequence objects.
+ (viewonly ? "visible " : "") + "sequence " + seq.getName()
+ " from " + title;
String seqname = seq.getName();
- Hashtable SequenceInfo = jalview.analysis.SeqsetUtils
+ SequenceInfo SequenceInfo = jalview.analysis.SeqsetUtils
.SeqCharacterHash(seq);
if (viewonly)
{
aln[i] = new jalview.datamodel.Sequence(msf[i]);
}
- Hashtable SequenceInfo = jalview.analysis.SeqsetUtils.uniquify(aln,
- true);
+ Map<String, SequenceInfo> SequenceInfo =
+ jalview.analysis.SeqsetUtils.uniquify(aln, true);
Jpred server = locateWebService();
if (server == null)
String altitle = "JPred prediction for sequence " + seq.getName()
+ " from " + title;
- Hashtable SequenceInfo = jalview.analysis.SeqsetUtils
+ SequenceInfo SequenceInfo = jalview.analysis.SeqsetUtils
.SeqCharacterHash(seq);
Jpred server = locateWebService();
import jalview.analysis.AlignSeq;
import jalview.analysis.SeqsetUtils;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import vamsas.objects.simple.JpredResult;
vamsas.objects.simple.Msfalignment msa;
- java.util.Hashtable SequenceInfo = null;
+ Object SequenceInfo = null;
int msaIndex = 0; // the position of the original sequence in the array of
{
sqs[i] = al.getSequenceAt(i);
}
- if (!SeqsetUtils.deuniquify(SequenceInfo, sqs))
+ if (!SeqsetUtils.deuniquify((Map<String, SequenceInfo>)SequenceInfo, sqs))
{
throw (new Exception(MessageManager.getString(
"exception.couldnt_recover_sequence_properties_for_alignment")));
}
if (!jalview.analysis.SeqsetUtils.SeqCharacterUnhash(
- al.getSequenceAt(FirstSeq), SequenceInfo))
+ al.getSequenceAt(FirstSeq), (SequenceInfo)SequenceInfo))
{
throw (new Exception(MessageManager.getString(
"exception.couldnt_recover_sequence_props_for_jnet_query")));
}
}
- public JPredJob(Hashtable SequenceInfo, SequenceI seq, int[] delMap)
+ public JPredJob(Object SequenceInfo, SequenceI seq, int[] delMap)
{
super();
this.predMap = delMap;
}
}
- public JPredJob(Hashtable SequenceInfo, SequenceI[] msf, int[] delMap)
+ public JPredJob(Object SequenceInfo, SequenceI[] msf, int[] delMap)
{
this(SequenceInfo, msf[0], delMap);
if (sequence != null)
}
JPredThread(WebserviceInfo wsinfo, String altitle,
- ext.vamsas.Jpred server, String wsurl, Hashtable SequenceInfo,
+ ext.vamsas.Jpred server, String wsurl, SequenceInfo SequenceInfo,
SequenceI seq, int[] delMap, AlignmentView alview,
AlignFrame alframe)
{
}
JPredThread(WebserviceInfo wsinfo, String altitle,
- ext.vamsas.Jpred server, Hashtable SequenceInfo, SequenceI[] msf,
- int[] delMap, AlignmentView alview, AlignFrame alframe,
- String wsurl)
+ ext.vamsas.Jpred server, Map<String, SequenceInfo> SequenceInfo,
+ SequenceI[] msf, int[] delMap, AlignmentView alview,
+ AlignFrame alframe, String wsurl)
{
this(wsinfo, altitle, server, wsurl, alview, alframe);
JPredJob job = new JPredJob(SequenceInfo, msf, delMap);
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import jalview.analysis.SeqsetUtils;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.bin.Cache;
import jalview.commands.RemoveGapsCommand;
import jalview.datamodel.Alignment;
private static class JPredJob extends WsJob
{
- private final Hashtable<?, ?> sequenceInfo;
+ private final Object sequenceInfo;
private final List<SequenceI> msf;
private final int[] delMap;
private AlignmentI alignment = null;
private HiddenColumns hiddenCols = null;
- private JPredJob(Hashtable<?, ?> sequenceInfo, SequenceI[] msf, int[] delMap)
+ private JPredJob(Object sequenceInfo, SequenceI[] msf, int[] delMap)
{
this.sequenceInfo = sequenceInfo;
this.msf = List.of(msf);
private JPredServiceI server;
private String title;
- private Hashtable<?, ?> sequenceInfo;
+ private Object sequenceInfo;
private SequenceI[] msf;
private int[] delMap;
public JPredThread(WebserviceInfo wsInfo, String title,
- JPredServiceI server, Hashtable<?, ?> sequenceInfo,
+ JPredServiceI server, Object sequenceInfo,
SequenceI[] msf, int[] delMap, AlignmentView view, AlignFrame frame,
String wsURL)
{
{
seqs[i] = alignment.getSequenceAt(i);
}
- if (!SeqsetUtils.deuniquify(sequenceInfo, seqs))
+ if (!SeqsetUtils.deuniquify((Map<String, SequenceInfo>)sequenceInfo, seqs))
{
throw (new Exception(MessageManager.getString(
"exception.couldnt_recover_sequence_properties_for_alignment")));
profileSeq.setSequence(seqs[msaIndex].getSequenceAsString());
}
if (!SeqsetUtils.SeqCharacterUnhash(
- alignment.getSequenceAt(firstSeq), sequenceInfo))
+ alignment.getSequenceAt(firstSeq), (SequenceInfo)sequenceInfo))
{
throw new Exception(MessageManager.getString(
"exception.couldnt_recover_sequence_props_for_jnet_query"));
*/
package jalview.ws.rest;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
boolean gotresult;
- Hashtable squniq;
+ Map<String, SequenceInfo> squniq;
/**
* dataset associated with this input data.