assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1));
// now the other way round
- try {
- seq1.setDBRefs(null);
- } catch (InvalidArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ seq1.setDBRefs(null);
seq2.addDBRef(new DBRefEntry("EMBL", "1", "A12345"));
assertTrue(AlignmentUtils.haveCrossRef(seq1, seq2));
assertTrue(AlignmentUtils.haveCrossRef(seq2, seq1));
* and others to dna coding databases
*/
sources.clear();
- try {
- seq.setDBRefs(null);
- } catch (InvalidArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ seq.setDBRefs(null);
seq.addDBRef(new DBRefEntry("UNIPROT", "0", "A1234"));
seq.addDBRef(new DBRefEntry("EMBLCDS", "0", "E2347"));
SequenceI seq2 = new Sequence("Seq2", "MGKYQARLSS");
assertTrue(primaryDBRefs.isEmpty());
// empty dbrefs
- try {
- sq.setDBRefs(new ArrayList<DBRefEntry>());
- } catch (InvalidArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ sq.setDBRefs(null);
primaryDBRefs = sq.getPrimaryDBRefs();
assertTrue(primaryDBRefs.isEmpty());
assertEquals(
"text:XYZ_1 OR text:XYZ_2 OR text:XYZ_3 OR text:XYZ_4 OR text:4kqy",
query);
- try {
- seq.setDBRefs(null);
- } catch (InvalidArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ seq.setDBRefs(null);
query = StructureChooser.buildQuery(seq);
assertEquals("text:4kqy", query);