+ "<uniprot xmlns=\"http://uniprot.org/uniprot\">"
+ "<entry dataset=\"TrEMBL\" created=\"2008-01-15\" modified=\"2015-03-04\" version=\"38\">"
+ "<accession>A9CKP4</accession>"
- + "<accession>A9CKP5</accession>"
- + "<name>A9CKP4_AGRT5</name>"
+ + "<accession>A9CKP5</accession>" + "<name>A9CKP4_AGRT5</name>"
+ "<name>A9CKP4_AGRT6</name>"
+ "<protein><recommendedName><fullName>Mitogen-activated protein kinase 13</fullName></recommendedName></protein>"
+ "<dbReference type=\"PDB\" id=\"2FSQ\"><property type=\"method\" value=\"X-ray\"/><property type=\"resolution\" value=\"1.40\"/></dbReference>"
sf = features.get(6);
assertEquals("sequence variant", sf.getType());
- assertEquals("Foo",
- sf.getDescription());
+ assertEquals("Foo", sf.getDescription());
assertEquals(42,
sf.getLocation().getPosition().getPosition().intValue());
assertNull(sf.getLocation().getBegin());
assertNull(sf.getLocation().getEnd());
- Assert.assertEquals(Uniprot.getDescription(sf),
- "<html>p.Met42Leu" + "<br/> "
- + "p.Met42LeuMetVal Foo</html>");
+ Assert.assertEquals(Uniprot.getDescription(sf), "<html>p.Met42Leu"
+ + "<br/> " + "p.Met42LeuMetVal Foo</html>");
sf = features.get(7);
assertNull(sf.getLocation().getPosition());
assertEquals(42, sf.getLocation().getBegin().getPosition().intValue());
assertEquals(43, sf.getLocation().getEnd().getPosition().intValue());
- Assert.assertEquals(Uniprot.getDescription(sf),
- "<html>p.MetLeu42LeuLeu" + "<br/> "
- + "p.MetLeu42LeuMetVal Foo</html>");
+ Assert.assertEquals(Uniprot.getDescription(sf), "<html>p.MetLeu42LeuLeu"
+ + "<br/> " + "p.MetLeu42LeuMetVal Foo</html>");
sf = features.get(8);
assertNull(sf.getLocation().getPosition());
assertEquals(42, sf.getLocation().getBegin().getPosition().intValue());
assertEquals(45, sf.getLocation().getEnd().getPosition().intValue());
- Assert.assertEquals(Uniprot.getDescription(sf),
- "<html>p.MLML42LeuLeu" + "<br/> "
- + "p.MLML42LMVK Foo Too</html>");
+ Assert.assertEquals(Uniprot.getDescription(sf), "<html>p.MLML42LeuLeu"
+ + "<br/> " + "p.MLML42LMVK Foo Too</html>");
/*
* Check cross-references
public void testGetUniprotSequence() throws UnsupportedEncodingException
{
InputStream is = new ByteArrayInputStream(UNIPROT_XML.getBytes());
- Entry entry = new Uniprot().getUniprotEntries(
- is).get(0);
+ Entry entry = new Uniprot().getUniprotEntries(is).get(0);
SequenceI seq = new Uniprot().uniprotEntryToSequence(entry);
assertNotNull(seq);
assertEquals(6, seq.getDBRefs().size()); // 2*Uniprot, PDB, PDBsum, 2*EMBL
assertEquals(seq.getSequenceAsString(),
seq.createDatasetSequence().getSequenceAsString());
- assertEquals(2,seq.getPrimaryDBRefs().size());
- List<DBRefEntry> res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(), "A9CKP4");
- assertEquals(1,res.size());
+ assertEquals(2, seq.getPrimaryDBRefs().size());
+ List<DBRefEntry> res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(),
+ "A9CKP4");
+ assertEquals(1, res.size());
assertTrue(res.get(0).isCanonical());
- res = DBRefUtils.searchRefsForSource(seq.getDBRefs(), DBRefSource.UNIPROT);
- assertEquals(2,res.size());
+ res = DBRefUtils.searchRefsForSource(seq.getDBRefs(),
+ DBRefSource.UNIPROT);
+ assertEquals(2, res.size());
/*
* NB this test fragile - relies on ordering being preserved
*/
* name formatted with Uniprot Entry name
*/
String expectedName = "A9CKP4_AGRT5|A9CKP4_AGRT6";
- assertEquals(expectedName,
- Uniprot.getUniprotEntryId(entry));
+ assertEquals(expectedName, Uniprot.getUniprotEntryId(entry));
}
/**