use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldValidateExtensionVariantOnCanonicalIsoform.
@Test
public void shouldValidateExtensionVariantOnCanonicalIsoform() throws Exception {
// RAD50-p.*1313Tyrext*66 (CAVA-VD024428)
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("RAD50-p.Ter1313Tyrext*66", AnnotationCategory.VARIANT.getApiTypeName(), ""));
assertIsoformFeatureValid(result, "NX_Q92878-1", 1313, 1313, true);
}
use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldNotValidateInvalidAminoAcidCode.
@Test
public void shouldNotValidateInvalidAminoAcidCode() throws Exception {
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("SCN11A-p.Let1158Pro", AnnotationCategory.VARIANT.getApiTypeName(), "NX_Q9UI33"));
SingleFeatureQuery query = Mockito.mock(SingleFeatureQuery.class);
when(query.getFeature()).thenReturn("SCN11A-p.Let1158Pro");
Assert.assertFalse(result.isSuccess());
Assert.assertEquals("invalid feature format: SCN11A-p.Let1158Pro", ((FeatureQueryFailureImpl) result).getError().getMessage());
Assert.assertEquals(1, ((FeatureQueryFailureImpl) result).getError().getCauses().size());
Assert.assertEquals("Let: invalid AminoAcidCode", ((FeatureQueryFailureImpl) result).getError().getCause(InvalidFeatureQueryFormatException.PARSE_ERROR_MESSAGE));
}
use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldValidateDeletionVariantOnCanonicalIsoform.
@Test
public void shouldValidateDeletionVariantOnCanonicalIsoform() throws Exception {
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("BRCA2-p.Gly2281_Asp2312del", AnnotationCategory.VARIANT.getApiTypeName(), "NX_P51587"));
assertIsoformFeatureValid(result, "NX_P51587-1", 2281, 2312, true);
}
use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldNotValidateWithMultipleAccessions.
// no more multiple accessions for gene GCNT2
// TODO: find another gene with multiple accessions
@Ignore
@Test
public void shouldNotValidateWithMultipleAccessions() throws Exception {
FeatureQueryResult result = service.validateFeature(new SingleFeatureQuery("GCNT2-p.Leu1158Pro", AnnotationCategory.VARIANT.getApiTypeName(), ""));
SingleFeatureQuery query = Mockito.mock(SingleFeatureQuery.class);
when(query.getAccession()).thenReturn("");
assertIsoformFeatureNotValid((FeatureQueryFailureImpl) result, new MultipleEntryAccessionForGeneException(query, "GCNT2", Sets.newHashSet("NX_Q06430", "NX_Q8N0V5", "NX_Q8NFS9")));
}
use of org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery in project nextprot-api by calipho-sib.
the class IsoformMappingServiceTest method shouldMap2IsoformsContainingFirstAA.
@Test
public void shouldMap2IsoformsContainingFirstAA() throws Exception {
SingleFeatureQuery query = new SingleFeatureQuery("BCL2-p.Met1ext-5", AnnotationCategory.VARIANT.getApiTypeName(), "");
FeatureQueryResult result = service.propagateFeature(query);
assertIsoformFeatureValid(result, "NX_P10415-1", 1, 1, true);
assertIsoformFeatureValid(result, "NX_P10415-2", 1, 1, true);
}
Aggregations