use of org.nextprot.api.commons.bio.AminoAcidCode in project nextprot-api by calipho-sib.
the class SequenceVariationImplTest method testBuildDeletion1AaAndInsertion1.
@Test
public void testBuildDeletion1AaAndInsertion1() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.THREONINE, 399).thenDeleteAndInsert(AminoAcidCode.LEUCINE).build();
Assert.assertEquals(AminoAcidCode.THREONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(399, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(AminoAcidCode.THREONINE, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(399, pm.getVaryingSequence().getLastAminoAcidPos());
Assert.assertTrue(pm.getSequenceChange() instanceof DeletionAndInsertion);
Assert.assertArrayEquals(new AminoAcidCode[] { AminoAcidCode.LEUCINE }, (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.AminoAcidCode in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDelinsTest method testParseDeletion1AaAndInsertion1.
// /// DELETION FOLLOWED BY INSERTIONS
@Test
public void testParseDeletion1AaAndInsertion1() throws Exception {
SequenceVariation pm = format.parse("p.T399delinsL");
Assert.assertEquals(AminoAcidCode.THREONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(399, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("L"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.AminoAcidCode in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDelinsTest method testParseDeletionMultiAasAndInsertion1Code3.
@Test
public void testParseDeletionMultiAasAndInsertion1Code3() throws Exception {
SequenceVariation pm = format.parse("p.Leu330_Ala331delinsPhe");
Assert.assertEquals(AminoAcidCode.LEUCINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(AminoAcidCode.ALANINE, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(330, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(331, pm.getVaryingSequence().getLastAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("F"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.AminoAcidCode in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDelinsTest method testParseAANonStandardDelins1.
@Test
public void testParseAANonStandardDelins1() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.T399>L");
Assert.assertEquals(AminoAcidCode.THREONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(399, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("L"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.AminoAcidCode in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDelinsTest method testParseAANonStandardDelins3.
@Test
public void testParseAANonStandardDelins3() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.W39_E40>*");
Assert.assertEquals(AminoAcidCode.TRYPTOPHAN, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(AminoAcidCode.GLUTAMIC_ACID, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(39, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(40, pm.getVaryingSequence().getLastAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("*"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
Aggregations