Search in sources :

Example 51 with SequenceVariation

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());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 52 with SequenceVariation

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());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 53 with SequenceVariation

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());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) Test(org.junit.Test)

Example 54 with SequenceVariation

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));
}
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 55 with SequenceVariation

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());
}
Also used : SequenceVariation(org.nextprot.api.commons.bio.variation.prot.SequenceVariation) 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