use of org.nextprot.api.isoform.mapper.domain.FeatureQueryResult in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldPropagateVariantToAllIsoforms.
@Test
public void shouldPropagateVariantToAllIsoforms() throws Exception {
FeatureQueryResult result = service.propagateFeature(new SingleFeatureQuery("SCN11A-p.Leu1158Pro", AnnotationCategory.VARIANT.getApiTypeName(), "NX_Q9UI33"));
assertIsoformFeatureValid(result, "NX_Q9UI33-1", 1158, 1158, true);
assertIsoformFeatureValid(result, "NX_Q9UI33-2", 1158, 1158, true);
assertIsoformFeatureValid(result, "NX_Q9UI33-3", 1120, 1120, true);
}
use of org.nextprot.api.isoform.mapper.domain.FeatureQueryResult in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldValidateVariantOnCanonicalIsoform.
@Test
public void shouldValidateVariantOnCanonicalIsoform() throws Exception {
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("SCN11A-p.Leu1158Pro", AnnotationCategory.VARIANT.getApiTypeName(), "NX_Q9UI33"));
assertIsoformFeatureValid(result, "NX_Q9UI33-1", 1158, 1158, true);
}
use of org.nextprot.api.isoform.mapper.domain.FeatureQueryResult in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldNotValidateIncorrectAAVariantIsoform.
@Test
public void shouldNotValidateIncorrectAAVariantIsoform() throws Exception {
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("SCN11A-p.Met1158Pro", AnnotationCategory.VARIANT.getApiTypeName(), "NX_Q9UI33"));
SingleFeatureQuery query = Mockito.mock(SingleFeatureQuery.class);
when(query.getAccession()).thenReturn("NX_Q9UI33");
when(query.getFeature()).thenReturn("SCN11A-p.Met1158Pro");
assertIsoformFeatureNotValid((FeatureQueryFailure) result, new UnexpectedFeatureQueryAminoAcidException(query, 1158, new AminoAcidCode[] { AminoAcidCode.LEUCINE }, new AminoAcidCode[] { AminoAcidCode.METHIONINE }));
}
use of org.nextprot.api.isoform.mapper.domain.FeatureQueryResult in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldNotMap1IsoformsContainingFirstAA.
@Test
public void shouldNotMap1IsoformsContainingFirstAA() throws Exception {
SingleFeatureQuery query = new SingleFeatureQuery("TESPA1-p.Met1ext-5", AnnotationCategory.VARIANT.getApiTypeName(), "");
FeatureQueryResult result = service.propagateFeature(query);
assertIsoformFeatureValid(result, "NX_A2RU30-1", 1, 1, true);
assertIsoformFeatureValid(result, "NX_A2RU30-2", null, null, false);
assertIsoformFeatureValid(result, "NX_A2RU30-3", null, null, false);
}
use of org.nextprot.api.isoform.mapper.domain.FeatureQueryResult in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldNotMapMet1_Arg406Deletion.
@Test
public void shouldNotMapMet1_Arg406Deletion() throws Exception {
SingleFeatureQuery query = new SingleFeatureQuery("BARD1-p.Met1_Arg406del", AnnotationCategory.VARIANT.getApiTypeName(), "");
FeatureQueryResult result = service.propagateFeature(query);
assertIsoformFeatureValid(result, "NX_Q99728-1", 1, 406, true);
assertIsoformFeatureValid(result, "NX_Q99728-2", null, null, false);
assertIsoformFeatureValid(result, "NX_Q99728-3", null, null, false);
assertIsoformFeatureValid(result, "NX_Q99728-4", null, null, false);
}
Aggregations