Search in sources :

Example 76 with SequenceVariation

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

the class SequenceVariantHGVSParseDeletionTest method testParseRangeDeletion.

@Test
public void testParseRangeDeletion() throws Exception {
    SequenceVariation pm = format.parse("p.K487_L498del");
    Assert.assertEquals(AminoAcidCode.LYSINE, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(AminoAcidCode.LEUCINE, pm.getVaryingSequence().getLastAminoAcid());
    Assert.assertEquals(487, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(498, pm.getVaryingSequence().getLastAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.DELETION, pm.getSequenceChange().getType());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 77 with SequenceVariation

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

the class SequenceVariantHGVSParseDeletionTest method testParseAANonStandardDeletion2.

@Test
public void testParseAANonStandardDeletion2() throws Exception {
    format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
    SequenceVariation pm = format.parse("p.K487_L498delPRAL");
    Assert.assertEquals(AminoAcidCode.LYSINE, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(487, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(AminoAcidCode.LEUCINE, pm.getVaryingSequence().getLastAminoAcid());
    Assert.assertEquals(498, pm.getVaryingSequence().getLastAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.DELETION, pm.getSequenceChange().getType());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 78 with SequenceVariation

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

the class SequenceVariantHGVSParseDelinsTest method testParseAmbiguousAminoAcidsFixCALIPHOMISC568.

@Test
public void testParseAmbiguousAminoAcidsFixCALIPHOMISC568() throws Exception {
    format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
    SequenceVariation pm = format.parse("p.Phe709delinsXaaTrpXaa");
    Assert.assertEquals(AminoAcidCode.PHENYLALANINE, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(AminoAcidCode.PHENYLALANINE, pm.getVaryingSequence().getLastAminoAcid());
    Assert.assertEquals(709, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(709, pm.getVaryingSequence().getLastAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
    Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("XWX"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) AminoAcidCode(org.nextprot.api.commons.bio.AminoAcidCode) Test(org.junit.Test)

Example 79 with SequenceVariation

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

the class SequenceVariantHGVSParseDelinsTest method testParseDeletionMultiAndInsertionMultiCode3.

@Test
public void testParseDeletionMultiAndInsertionMultiCode3() throws Exception {
    SequenceVariation pm = format.parse("p.Asp419_Arg420delinsSerSerAspGly");
    Assert.assertEquals(AminoAcidCode.ASPARTIC_ACID, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getLastAminoAcid());
    Assert.assertEquals(419, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(420, pm.getVaryingSequence().getLastAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
    Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("SSDG"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) AminoAcidCode(org.nextprot.api.commons.bio.AminoAcidCode) Test(org.junit.Test)

Example 80 with SequenceVariation

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

the class SequenceVariantHGVSParseDelinsTest method testParseDeletionMultiAndInsertionMulti.

@Test
public void testParseDeletionMultiAndInsertionMulti() throws Exception {
    SequenceVariation pm = format.parse("p.D419_R420delinsSSDG");
    Assert.assertEquals(AminoAcidCode.ASPARTIC_ACID, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getLastAminoAcid());
    Assert.assertEquals(419, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(420, pm.getVaryingSequence().getLastAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.DELETION_INSERTION, pm.getSequenceChange().getType());
    Assert.assertArrayEquals(AminoAcidCode.valueOfAminoAcidCodeSequence("SSDG"), (AminoAcidCode[]) pm.getSequenceChange().getValue());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) AminoAcidCode(org.nextprot.api.commons.bio.AminoAcidCode) 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