Search in sources :

Example 1 with Substitution

use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution 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());
}
Also used : Substitution(org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution) SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 2 with Substitution

use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution 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());
}
Also used : Substitution(org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution) SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 3 with Substitution

use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution in project nextprot-api by calipho-sib.

the class SequenceVariantHGVSParseSubstitutionTest method testParseAATerSubstitutionFixCode1.

@Test
public void testParseAATerSubstitutionFixCode1() throws Exception {
    format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
    SequenceVariation pm = format.parse("p.*104E");
    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());
}
Also used : Substitution(org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution) SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 4 with Substitution

use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution in project nextprot-api by calipho-sib.

the class SequenceVariantHGVSParseSubstitutionTest method testParseSubstitutionCode3.

@Test
public void testParseSubstitutionCode3() throws Exception {
    SequenceVariation pm = format.parse("p.Arg54Cys");
    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.CYSTEINE, pm.getSequenceChange().getValue());
}
Also used : Substitution(org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution) SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 5 with Substitution

use of org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution in project nextprot-api by calipho-sib.

the class SequenceVariantHGVSParseSubstitutionTest method testPermissiveParserCorrectlyParseStandardSubstitution.

@Test
public void testPermissiveParserCorrectlyParseStandardSubstitution() throws Exception {
    format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
    SequenceVariation pm = format.parse("p.R54C");
    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.CYSTEINE, pm.getSequenceChange().getValue());
}
Also used : Substitution(org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution) SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 SequenceVariation (org.nextprot.api.commons.bio.variation.prot.SequenceVariation)6 Substitution (org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution)6