Search in sources :

Example 11 with SequenceVariation

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

the class SequenceVariantHGVSExtensionFormatTest method testParseTerminationExtensionCode1.

@Test
public void testParseTerminationExtensionCode1() throws Exception {
    SequenceVariation pm = format.parse("p.*110Glnext*17");
    Assert.assertEquals(AminoAcidCode.STOP, pm.getVaryingSequence().getFirstAminoAcid());
    Assert.assertEquals(110, pm.getVaryingSequence().getFirstAminoAcidPos());
    Assert.assertEquals(SequenceChange.Type.EXTENSION_TERM, pm.getSequenceChange().getType());
    Assert.assertEquals(17, ((ExtensionTermination) pm.getSequenceChange()).getNewPos());
    Assert.assertEquals(AminoAcidCode.GLUTAMINE, ((ExtensionTermination) pm.getSequenceChange()).getValue());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 12 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatInsertionCode1.

@Test
public void testFormatInsertionCode1() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcidRange(AminoAcidCode.CYSTEINE, 136, AminoAcidCode.ALANINE, 137).thenInsert(AminoAcidCode.GLYCINE, AminoAcidCode.METHIONINE).build();
    Assert.assertEquals("p.C136_A137insGM", format.format(pm));
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) SequenceVariationImpl(org.nextprot.api.commons.bio.variation.prot.impl.SequenceVariationImpl) Test(org.junit.Test)

Example 13 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatDeletion1AaAndInsertion1Code3.

@Test
public void testFormatDeletion1AaAndInsertion1Code3() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.THREONINE, 399).thenDeleteAndInsert(AminoAcidCode.LEUCINE).build();
    Assert.assertEquals("p.Thr399delinsLeu", format.format(pm, AminoAcidCode.CodeType.THREE_LETTER));
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) SequenceVariationImpl(org.nextprot.api.commons.bio.variation.prot.impl.SequenceVariationImpl) Test(org.junit.Test)

Example 14 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatAADeletion.

@Test
public void testFormatAADeletion() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.LYSINE, 73).thenDelete().build();
    Assert.assertEquals("p.K73del", format.format(pm));
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) SequenceVariationImpl(org.nextprot.api.commons.bio.variation.prot.impl.SequenceVariationImpl) Test(org.junit.Test)

Example 15 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatInsertionCode3.

@Test
public void testFormatInsertionCode3() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcidRange(AminoAcidCode.CYSTEINE, 136, AminoAcidCode.ALANINE, 137).thenInsert(AminoAcidCode.GLYCINE, AminoAcidCode.METHIONINE).build();
    Assert.assertEquals("p.Cys136_Ala137insGlyMet", format.format(pm, AminoAcidCode.CodeType.THREE_LETTER));
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) SequenceVariationImpl(org.nextprot.api.commons.bio.variation.prot.impl.SequenceVariationImpl) 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