use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class FeatureQuerySuccessTest method testOnSuccess.
@Test
public void testOnSuccess() throws FeatureQueryException, ParseException {
SingleFeatureQuery query = new SingleFeatureQuery("NX_Q9UI33", "SCN11A-p.Leu1158Pro", AnnotationCategory.VARIANT.getApiTypeName());
SequenceVariant sequenceVariant = new SequenceVariant("SCN11A-p.Leu1158Pro");
String seqIso1 = "MDDRCYPVIFPDERNFRPFTSDSLAAIEKRIAIQKEKKKSKDQTGEVPQPRPQLDLKASRKLPKLYGDIPRELIGKPLEDLDPFYRNHKTFMVLNRKRTIYRFSAKHALFIFGPFNSIRSLAIRVSVHSLFSMFIIGTVIINCVFMATGPAKNSNSNNTDIAECVFTGIYIFEALIKILARGFILDEFSFLRDPWNWLDSIVIGIAIVSYIPGITIKLLPLRTFRVFRALKAISVVSRLKVIVGALLRSVKKLVNVIILTFFCLSIFALVGQQLFMGSLNLKCISRDCKNISNPEAYDHCFEKKENSPEFKMCGIWMGNSACSIQYECKHTKINPDYNYTNFDNFGWSFLAMFRLMTQDSWEKLYQQTLRTTGLYSVFFFIVVIFLGSFYLINLTLAVVTMAYEEQNKNVAAEIEAKEKMFQEAQQLLKEEKEALVAMGIDRSSLTSLETSYFTPKKRKLFGNKKRKSFFLRESGKDQPPGSDSDEDCQKKPQLLEQTKRLSQNLSLDHFDEHGDPLQRQRALSAVSILTITMKEQEKSQEPCLPCGENLASKYLVWNCCPQWLCVKKVLRTVMTDPFTELAITICIIINTVFLAMEHHKMEASFEKMLNIGNLVFTSIFIAEMCLKIIALDPYHYFRRGWNIFDSIVALLSFADVMNCVLQKRSWPFLRSFRVLRVFKLAKSWPTLNTLIKIIGNSVGALGSLTVVLVIVIFIFSVVGMQLFGRSFNSQKSPKLCNPTGPTVSCLRHWHMGDFWHSFLVVFRILCGEWIENMWECMQEANASSSLCVIVFILITVIGKLVVLNLFIALLLNSFSNEERNGNLEGEARKTKVQLALDRFRRAFC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QQKEVAGGCAAQSKDIIPLVMEMKRGSETQEELGILTSVPKTLGVRHDWTWLAPLAEEEDDVEFSGEDNAQRITQPEPEQQKSDVTSILSECSTIDLQDGFGWLPEMVPKKQPERCLPKGFGCCFPCCSVDKRKPPWVIWWNLRKTCYQIVKHSWFESFIIFVILLSSGALIFEDVHLENQPKIQELLNCTDIIFTHIFILEMVLKWVAFGFGKYFTSAWCCLDFIIVIVSVTTLINLMELKSFRTLRALRPLRALSQFEGMKVVVNALIGAIPAILNVLLVCLIFWLVFCILGVYFFSGKFGKCINGTDSVINYTIITNKSQCESGNFSWINQKVNFDNVGNAYLALLQVATFKGWMDIIYAAVDSTEKEQQPEFESNSLGYIYFVVFIIFGSFFTLNLFIGVIIDNFNQQQKKLGGQDIFMTEEQKKYYNAMKKLGSKKPQKPIPRPLNKCQGLVFDIVTSQIFDIIIISLIILNMISMMAESYNQPKAMKSILDHLNWVFVVIFTLECLIKIFALRQYYFTNGWNLFDCVVVLLSIVSTMISTLENQEHIPFPPTLFRIVRLARIGRILRLVRAARGIRTLLFALMMSLPSLFNIGLLLFLIMFIYAILGMNWFSKVNPESGIDDIFNFKTFASSMLCLFQISTSAGWDSLLSPMLRSKESCNSSSENCHLPGIATSYFVSYIIISFLIVVNMYIAVILENFNTATEESEDPLGEDDFDIFYEVWEKFDPEATQFIKYSALSDFADALPEPLRVAKPNKYQFLVMDLPMVSEDRLHCMDILFAFTARVLGGSDGLDSMKAMMEEKFMEANPLKKLYEPIVTTTKRKEEERGAAIIQKAFRKYMMKVTKGDQGDQNDLENGPHSPLQTLCNGDLSSFGVAKGKVHCD";
Isoform iso1 = SequenceVariantTest.mockIsoform("NX_Q9UI33-1", "Iso 1", true, seqIso1);
Isoform iso2 = SequenceVariantTest.mockIsoform("NX_Q9UI33-2", "Iso 2", false, seqIso2);
Isoform iso3 = SequenceVariantTest.mockIsoform("NX_Q9UI33-3", "Iso 3", false, seqIso3);
Entry entry = SequenceVariantTest.mockEntry("NX_Q9UI33", iso1, iso2, iso3);
SingleFeatureQuerySuccessImpl result = new SingleFeatureQuerySuccessImpl(entry, query, sequenceVariant);
result.addMappedFeature(iso1, 1158, 1158);
result.addMappedFeature(iso2, 1158, 1158);
result.addMappedFeature(iso3, 1120, 1120);
result.addUnmappedFeature(SequenceVariantTest.mockIsoform("NX_Q9UI33-23", "Iso 23", false, ""));
Assert.assertEquals("SCN11A-iso1-p.Leu1158Pro", result.getData().get("NX_Q9UI33-1").getIsoSpecificFeature());
Assert.assertEquals("SCN11A-iso2-p.Leu1158Pro", result.getData().get("NX_Q9UI33-2").getIsoSpecificFeature());
Assert.assertEquals("SCN11A-iso3-p.Leu1120Pro", result.getData().get("NX_Q9UI33-3").getIsoSpecificFeature());
Assert.assertNull(result.getData().get("NX_Q9UI33-23").getIsoSpecificFeature());
}
Aggregations