Cache.applicationProperties.setProperty("ADD_SS_ANN",
Boolean.TRUE.toString());
- sf = new SequenceFetcher(false);
+ sf = new SequenceFetcher();
}
/**
private void testRetrieveProteinSeqFromPDB() throws Exception
{
List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
+ StringBuilder errors = new StringBuilder();
for (TestRetrieveObject str : toRetrieve)
{
AlignmentI response = sps.get(0).getSequenceRecords(str.id);
sq.getAllPDBEntries().size() > 0);
// FIXME: should test that all residues extracted as sequences from
// chains in structure have a mapping to data in the structure
- StringBuilder errors = new StringBuilder();
List<SequenceFeature> prev = null;
int lastp = -1;
- for (int rs = sq.getStart(); rs < sq.getStart()
- + sq.getLength(); rs++)
+ for (int col = 1; col <= sq.getLength(); col++)
{
- List<SequenceFeature> sf = sq.findFeatures(rs, rs, "RESNUM");
+ List<SequenceFeature> sf = sq.findFeatures(col, col, "RESNUM");
if (sf.size() != 1)
{
errors.append(
- "Expected feature at " + rs + ": saw " + sf.size());
+ str.id + ": " +
+ "Expected one feature at column (position): "
+ + (col - 1)
+ + " (" + sq.findPosition(col - 1) + ")"
+ + ": saw "
+ + sf.size());
errors.append("\n");
if (prev != null)
{
- errors.append("Last Feature was at " + lastp + ": "
+ errors.append("Last Feature was at position " + lastp + ": "
+ prev.get(0).toString());
errors.append("\n");
}
else
{
prev = sf;
- lastp = rs;
+ lastp = sq.findPosition(col - 1);
}
}
- if (errors.length() > 0)
- {
- Assert.fail(errors.toString());
- }
}
}
+ if (errors.length() > 0)
+ {
+ Assert.fail(errors.toString());
+ }
}
}