Search in sources :

Example 86 with SequenceVariation

use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation 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 87 with SequenceVariation

use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation 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)

Example 88 with SequenceVariation

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

the class SequenceVariantHGVSParseSubstitutionTest method testParseSubstitution.

// /// SUBSTITUTIONS
@Test
public void testParseSubstitution() throws Exception {
    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

SequenceVariation (org.nextprot.api.commons.bio.variation.prot.SequenceVariation)88 Test (org.junit.Test)85 SequenceVariationImpl (org.nextprot.api.commons.bio.variation.prot.impl.SequenceVariationImpl)31 AminoAcidCode (org.nextprot.api.commons.bio.AminoAcidCode)18 Substitution (org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Substitution)6 Ignore (org.junit.Ignore)2 Frameshift (org.nextprot.api.commons.bio.variation.prot.impl.seqchange.Frameshift)2 Isoform (org.nextprot.api.core.domain.Isoform)2 GeneMasterCodonPosition (org.nextprot.api.core.utils.seqmap.GeneMasterCodonPosition)2 SequenceFeature (org.nextprot.api.isoform.mapper.domain.SequenceFeature)1 SingleFeatureQuery (org.nextprot.api.isoform.mapper.domain.SingleFeatureQuery)1