use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseFrameshiftTest method testParseAANonStandardFrameshift.
@Ignore
@Test
public void testParseAANonStandardFrameshift() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.S1476fs*>9");
Assert.assertEquals(AminoAcidCode.SERINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(1476, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.FRAMESHIFT, pm.getSequenceChange().getType());
Assert.assertEquals(9, pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseInsertionTest method testParseInsertionsVariants.
@Test
public void testParseInsertionsVariants() throws ParseException {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.Met1875_Glu1876insMet");
assertProteinSequenceVariation(pm, AminoAcidCode.METHIONINE, AminoAcidCode.GLUTAMIC_ACID, 1875);
Assert.assertEquals(SequenceChange.Type.INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("M"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
Assert.assertEquals(1875, ((Insertion) pm.getSequenceChange()).getInsertAfterPos());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseInsertionTest method testParseInsertion.
@Test
public void testParseInsertion() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.C136_A137insGM");
assertProteinSequenceVariation(pm, AminoAcidCode.CYSTEINE, AminoAcidCode.ALANINE, 136);
Assert.assertEquals(SequenceChange.Type.INSERTION, pm.getSequenceChange().getType());
Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("GM"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
Assert.assertEquals(136, ((Insertion) pm.getSequenceChange()).getInsertAfterPos());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseSubstitutionTest method testParseSubstitutionStop.
@Test
public void testParseSubstitutionStop() throws Exception {
SequenceVariation pm = format.parse("p.R54*");
Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(54, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(54, pm.getVaryingSequence().getLastAminoAcidPos());
Assert.assertTrue(pm.getSequenceChange() instanceof Substitution);
Assert.assertEquals(AminoAcidCode.STOP, pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseSubstitutionTest method testParseAATerSubstitutionFixCode3.
@Test
public void testParseAATerSubstitutionFixCode3() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.Ter104Glu");
Assert.assertEquals(AminoAcidCode.STOP, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(AminoAcidCode.STOP, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(104, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertTrue(pm.getSequenceChange() instanceof Substitution);
Assert.assertEquals(AminoAcidCode.GLUTAMIC_ACID, pm.getSequenceChange().getValue());
}
Aggregations