public void setVersion(String version);
/**
- *
- * @param startRes
- * index of start residue in the source DB
- */
- public void setStartRes(int startRes);
-
- /**
- *
- * @return index of start residue in the source DB
- */
- public int getStartRes();
-
- /**
- *
- * @param endRes
- * index of end residue in the source DB
- */
- public void setEndRes(int endRes);
-
- /**
- *
- * @return index of end residue in the source DB
- */
- public int getEndRes();
-
- /**
* access a mapping, if present that can be used to map positions from the
* associated dataset sequence to the DBRef's sequence frame.
*
public class DBRefEntry implements DBRefEntryI
{
String source = "", version = "", accessionId = "";
-
- private int startRes, endRes;
/**
* maps from associated sequence to the database sequence's coordinate system
*/
{
return getSrcAccString();
}
-
- @Override
- public int getStartRes()
- {
- return startRes;
- }
-
- @Override
- public void setStartRes(int startRes)
- {
- this.startRes = startRes;
- }
-
- @Override
- public int getEndRes()
- {
- return endRes;
- }
-
- @Override
- public void setEndRes(int endRes)
- {
- this.endRes = endRes;
- }
}
DBRefEntry sourceDBRef = new DBRefEntry();
sourceDBRef.setAccessionId(getId());
sourceDBRef.setSource(DBRefSource.PDB);
- sourceDBRef.setStartRes(pdbSequence.getStart());
- sourceDBRef.setEndRes(pdbSequence.getEnd());
pdbSequence.setSourceDBRef(sourceDBRef);
pdbSequence.addPDBId(entry);
pdbSequence.addDBRef(sourceDBRef);
// TODO delete when auto-fetching of DBRefEntry is implemented
DBRefEntry dbRef = new DBRefEntry("uniprot", "", "P00221");
- dbRef.setStartRes(1);
- dbRef.setEndRes(147);
testSeq.addDBRef(dbRef);
// testSeq.setSourceDBRef(dbRef);
DBRefEntryI expectedDBRef = new DBRefEntry();
expectedDBRef.setSource(DBRefSource.UNIPROT);
expectedDBRef.setAccessionId("P00221");
- expectedDBRef.setStartRes(1);
- expectedDBRef.setEndRes(147);
expectedDBRef.setVersion("");
Assert.assertEquals(actualValidSrcDBRef, expectedDBRef);
} catch (Exception e)
DBRefEntryI validDBRef = new DBRefEntry();
validDBRef.setSource(DBRefSource.UNIPROT);
validDBRef.setAccessionId("P00221");
- validDBRef.setStartRes(1);
- validDBRef.setEndRes(147);
validDBRef.setVersion("");
Assert.assertTrue(siftsClient.isValidDBRefEntry(validDBRef));
}