import java.awt.Color;
import java.util.List;
+import java.util.Locale;
import java.util.Vector;
public class PDBChain
public String pdbid = "";
- public PDBChain(String thePdbid, String theId, boolean isAlphaFoldModel)
+ String tfacName = "Temperature Factor";
+
+
+ public PDBChain(String thePdbid, String theId, String tempFactorColumnName)
{
- this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase();
+ this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase(Locale.ROOT);
this.id = theId;
- this.alphaFoldModel = isAlphaFoldModel;
+ if (tempFactorColumnName!=null && tempFactorColumnName.length()>0)
+ {
+ tfacName = tempFactorColumnName;
+ }
+ }
+
+ /**
+ * import chain data assuming Temperature Factor is in the Temperature Factor column
+ * @param thePdbid
+ * @param theId
+ */
+ public PDBChain(String thePdbid, String theId)
+ {
+ this(thePdbid,theId, null);
}
/**
public Mapping shadowMap;
- private boolean alphaFoldModel;
-
public void setNewlineString(String nl)
{
newline = nl;
* @param seq
* @param status
* The Status of the transferred annotation
+ *
+ * @param altPDBID the group id for the features on the destination sequence (e.g. the official accession ID)
*/
public void transferRESNUMFeatures(SequenceI seq,
- String status)
+ String status, String altPDBID)
{
+ if (altPDBID==null)
+ {
+ altPDBID = pdbid;
+ }
SequenceI sq = seq;
while (sq != null && sq.getDatasetSequence() != null)
{
int newEnd = 1 + residues.elementAt(feature.getEnd() - offset).atoms
.elementAt(0).alignmentMapping;
SequenceFeature tx = new SequenceFeature(feature, newBegin, newEnd,
- feature.getFeatureGroup(), feature.getScore());
+ altPDBID, feature.getScore());
tx.setStatus(status
+ ((tx.getStatus() == null || tx.getStatus().length() == 0)
? ""
min = Math.min(min, annots[i].value);
resAnnotation.setElementAt(null, i);
}
- String tfacName = "Temperature Factor";
- if (isAlphaFoldModel())
- {
- tfacName = "Alphafold Reliability";
- }
AlignmentAnnotation tfactorann = new AlignmentAnnotation(
tfacName, tfacName + " for " + pdbid + id,
annots, min, max, AlignmentAnnotation.LINE_GRAPH);
}
}
- private boolean isAlphaFoldModel()
- {
- return alphaFoldModel;
- }
/**
* Colour start/end of bonds by charge