use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariationImplTest method testBuildSubstitution.
@Test
public void testBuildSubstitution() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.ARGININE, 54).thenSubstituteWith(AminoAcidCode.CYSTEINE).build();
Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getFirstAminoAcid());
Assert.assertEquals(54, pm.getVaryingSequence().getFirstAminoAcidPos());
Assert.assertEquals(AminoAcidCode.ARGININE, pm.getVaryingSequence().getLastAminoAcid());
Assert.assertEquals(54, pm.getVaryingSequence().getLastAminoAcidPos());
Assert.assertTrue(!pm.getVaryingSequence().isMultipleAminoAcids());
Assert.assertTrue(pm.getSequenceChange() instanceof Substitution);
Assert.assertEquals(AminoAcidCode.CYSTEINE, pm.getSequenceChange().getValue());
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceModificationBedFormatTest method testFormatWith1LetterCodeAAMod.
@Test
public void testFormatWith1LetterCodeAAMod() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.CYSTEINE, 54).thenAddModification(AminoAcidModification.S_NITROSATION).build();
Assert.assertEquals("SNO-C54", 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 SequenceModificationBedFormatTest method testFormatWith3LetterCodeAAMod.
@Test
public void testFormatWith3LetterCodeAAMod() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.CYSTEINE, 54).thenAddModification(AminoAcidModification.S_NITROSATION).build();
Assert.assertEquals("SNO-Cys54", 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 testFormatExtensionTermCode1.
@Test
public void testFormatExtensionTermCode1() throws Exception {
SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.STOP, 110).thenTerminationExtension(17, AminoAcidCode.GLUTAMINE).build();
Assert.assertEquals("p.*110Qext*17", format.format(pm));
}
use of org.nextprot.api.commons.bio.variation.prot.SequenceVariation in project nextprot-api by calipho-sib.
the class SequenceVariantHGVSExtensionFormatTest method testParseTerminationExtensionCode3.
@Test
public void testParseTerminationExtensionCode3() throws Exception {
SequenceVariation pm = format.parse("p.Ter110Glnext*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());
}
Aggregations