use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSFormatterTest method testFormatDuplicationCode1.
@Test
public void testFormatDuplicationCode1() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcidRange(AminoAcidCode.CYSTEINE, 76, AminoAcidCode.GLUTAMIC_ACID, 79).thenDuplicate().build();
Assert.assertEquals("p.C76_E79dup", format.format(pm, AminoAcidCode.CodeType.ONE_LETTER));
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSFormatterTest method testFormatFrameshift.
@Test
public void testFormatFrameshift() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.METHIONINE, 682).thenFrameshift(AminoAcidCode.ALANINE, 2).build();
Assert.assertEquals("p.M682Afs*2", format.format(pm));
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSFormatterTest method testFormatSubstitutionWithStop.
@Test
public void testFormatSubstitutionWithStop() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.GLUTAMIC_ACID, 31).thenSubstituteWith(AminoAcidCode.STOP).build();
Assert.assertEquals("p.E31*", format.format(pm));
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDeletionTest method testParseAADeletionCode3.
@Test
public void testParseAADeletionCode3() throws Exception {
SequenceVariation pm = format.parse("p.Lys73del");
Assert.assertEquals(AminoAcidCode.LYSINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(73, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.DELETION, pm.getSequenceChange().getType());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSParseDeletionTest method testParseAANonStandardDeletion1.
@Test
public void testParseAANonStandardDeletion1() throws Exception {
format = new SequenceVariantHGVSFormat(ParsingMode.PERMISSIVE);
SequenceVariation pm = format.parse("p.K487_L498del12");
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());
}
Aggregations