use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceModificationBedFormatTest method testParsing1LetterCodeAAFormat.
@Test
public void testParsing1LetterCodeAAFormat() throws Exception {
SequenceVariation pm = format.parse("SNO-C54");
Assert.assertEquals(AminoAcidCode.CYSTEINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(54, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(AminoAcidModification.S_NITROSATION, pm.getSequenceChange());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceModificationBedFormatTest method testParsingMultiplePtms.
// Not yet parsable !
@Test(expected = ParseException.class)
public void testParsingMultiplePtms() throws Exception {
// P-Thr265 + P-Thr269 + P-Thr273
SequenceVariation pm = format.parse("P-Thr265-Thr269-Thr273");
Assert.assertEquals(AminoAcidCode.CYSTEINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(54, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(AminoAcidModification.S_NITROSATION, pm.getSequenceChange());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSExtensionFormatTest method testParseInitiationExtensionCode1.
@Test
public void testParseInitiationExtensionCode1() throws Exception {
SequenceVariation pm = format.parse("p.M1Vext-12");
Assert.assertEquals(AminoAcidCode.METHIONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(1, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.EXTENSION_INIT, pm.getSequenceChange().getType());
Assert.assertEquals(-12, ((ExtensionInitiation) pm.getSequenceChange()).getNewPos());
Assert.assertEquals(AminoAcidCode.VALINE, ((ExtensionInitiation) pm.getSequenceChange()).getValue());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSExtensionFormatTest method testFormatExtensionCode3.
@Test
public void testFormatExtensionCode3() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.METHIONINE, 1).thenInitiationExtension(-12, AminoAcidCode.VALINE).build();
Assert.assertEquals("p.Met1Valext-12", format.format(pm, AminoAcidCode.CodeType.THREE_LETTER));
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSExtensionFormatTest method testParseInitiationExtensionCode3.
@Test
public void testParseInitiationExtensionCode3() throws Exception {
SequenceVariation pm = format.parse("p.Met1Valext-12");
Assert.assertEquals(AminoAcidCode.METHIONINE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(1, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(SequenceChange.Type.EXTENSION_INIT, pm.getSequenceChange().getType());
Assert.assertEquals(-12, ((ExtensionInitiation) pm.getSequenceChange()).getNewPos());
Assert.assertEquals(AminoAcidCode.VALINE, ((ExtensionInitiation) pm.getSequenceChange()).getValue());
}
Aggregations