* xref is found - not on the nucleotide sequence but on a peptide sequence in
* the alignment which which it shares a nucleotide dbref
*/
- @Test(groups = { "Functional" }, enabled = false)
+ @Test(groups = { "Functional" }, enabled = true)
public void testFindXrefSequences_indirectDbrefToProtein()
{
/*
* xref is found - not on the peptide sequence but on a nucleotide sequence in
* the alignment which which it shares a protein dbref
*/
- @Test(groups = { "Functional" }, enabled = false)
+ @Test(groups = { "Functional" }, enabled = true)
public void testFindXrefSequences_indirectDbrefToNucleotide()
{
/*
SequenceI emblSeq = new Sequence("AF039662", "GGGGCAGCACAAGAAC");
emblSeq.addDBRef(new DBRefEntry("EMBL", "0", "AF039662"));
emblSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2"));
-
+
/*
* find EMBL xrefs for peptide sequence - it has no direct
* dbrefs, but the 'corresponding' nucleotide sequence does, so is returned
* - but nucleotide with matching peptide dbref does, so is returned
*/
AlignmentI al = new Alignment(new SequenceI[] { emblSeq, uniprotSeq });
- Alignment xrefs = new CrossRef(new SequenceI[] { uniprotSeq },
- al)
- .findXrefSequences("EMBL", true);
+ Alignment xrefs = new CrossRef(new SequenceI[] { uniprotSeq }, al)
+ .findXrefSequences("EMBL", false);
assertEquals(1, xrefs.getHeight());
assertSame(emblSeq, xrefs.getSequenceAt(0));
}
SequenceI dna1 = new Sequence("AF039662", "GGGGCAGCACAAGAAC");
dna1.addDBRef(new DBRefEntry("UNIPROT", "0", "Q9ZTS2"));
SequenceI dna2 = new Sequence("AJ307031", "AAACCCTTT");
-
+
/*
* find UNIPROT xrefs for peptide sequence - it has no direct
* dbrefs, and the other sequence (which has a UNIPROT dbref) is not
* Tests for the method that searches an alignment (with one sequence
* excluded) for protein/nucleotide sequences with a given cross-reference
*/
- @Test(groups = { "Functional" }, enabled = false)
+ @Test(groups = { "Functional" }, enabled = true)
public void testSearchDataset()
{
/*
* search for a protein sequence with dbref UNIPROT:Q9ZTS2
*/
dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2");
- found = testee.searchDataset(true, dna1, dbref, result, null, true);
+ found = testee.searchDataset(!dna1.isProtein(), dna1, dbref, result,
+ null, false); // search dataset with a protein xref from a dna
+ // sequence to locate the protein product
assertTrue(found);
assertEquals(1, result.size());
assertSame(pep1, result.get(0));
*/
result.clear();
dbref = new DBRefEntry("UNIPROT", "0", "Q9ZTS2");
- found = testee.searchDataset(false, pep1, dbref, result, null, false);
+ found = testee.searchDataset(!pep1.isProtein(), pep1, dbref, result,
+ null, false); // search dataset with a protein's direct dbref to
+ // locate dna sequences with matching xref
assertTrue(found);
assertEquals(1, result.size());
assertSame(dna1, result.get(0));