use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDelinsTest method testParseDeletionMultiAasAndInsertion1.
@Test
public void testParseDeletionMultiAasAndInsertion1() throws Exception {
SequenceVariation pm = format.parse("p.L330_A331delinsF");
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.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDuplicationTest method testParseSimpleDuplication.
@Test
public void testParseSimpleDuplication() throws ParseException {
SequenceVariation duplication = format.parse("p.Val417dup");
Assert.assertEquals(AminoAcidCode.VALINE, duplication.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(AminoAcidCode.VALINE, duplication.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(417, duplication.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(417, duplication.getVaryingSequence().getLastAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DUPLICATION, duplication.getSequenceChange().getType());
Assert.assertEquals(417, duplication.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseFrameshiftTest method testParseFrameshift.
@Test
public void testParseFrameshift() throws Exception {
SequenceVariation pm = format.parse("p.M682Afs*2");
Assert.assertEquals(AminoAcidCode.METHIONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(682, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.FRAMESHIFT, pm.getSequenceChange().getType());
Assert.assertEquals(AminoAcidCode.ALANINE, ((Frameshift.Change) pm.getSequenceChange().getValue()).getChangedAminoAcid());
Assert.assertEquals(2, ((Frameshift.Change) pm.getSequenceChange().getValue()).getNewTerminationPosition());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseFrameshiftTest method testParseFrameshiftCode3.
@Test
public void testParseFrameshiftCode3() throws Exception {
SequenceVariation pm = format.parse("p.Met682AlafsTer2");
Assert.assertEquals(AminoAcidCode.METHIONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(682, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.FRAMESHIFT, pm.getSequenceChange().getType());
Assert.assertEquals(AminoAcidCode.ALANINE, ((Frameshift.Change) pm.getSequenceChange().getValue()).getChangedAminoAcid());
Assert.assertEquals(2, ((Frameshift.Change) pm.getSequenceChange().getValue()).getNewTerminationPosition());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseInsertionTest method testParseInsertionsVariants2.
@Test
public void testParseInsertionsVariants2() throws ParseException {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.Lys722_Ala723insTyrLys");
assertProteinSequenceVariation(pm, AminoAcidCode.LYSINE, AminoAcidCode.ALANINE, 722);
Assert.assertEquals(SequenceChange.Type.INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("YK"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
Assert.assertEquals(722, ((Insertion) pm.getSequenceChange()).getInsertAfterPos());
}
Aggregations