Search in sources :

Example 56 with SequenceVariation

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

the class SequenceVariantHGVSExtensionFormatTest method testFormatExtensionCode1.

@Test
public void testFormatExtensionCode1() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.METHIONINE, 1).thenInitiationExtension(-12, AminoAcidCode.VALINE).build();
    Assert.assertEquals("p.M1Vext-12", 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 57 with SequenceVariation

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

the class SequenceVariantHGVSExtensionFormatTest method testFormatExtensionTermCode3.

@Test
public void testFormatExtensionTermCode3() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.STOP, 110).thenTerminationExtension(17, AminoAcidCode.GLUTAMINE).build();
    Assert.assertEquals("p.Ter110Glnext*17", 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 58 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatDuplicationSimpleCode1.

@Test
public void testFormatDuplicationSimpleCode1() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcid(AminoAcidCode.CYSTEINE, 76).thenDuplicate().build();
    Assert.assertEquals("p.C76dup", format.format(pm, AminoAcidCode.CodeType.ONE_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 59 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatRangeDeletion.

@Test
public void testFormatRangeDeletion() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcidRange(AminoAcidCode.LYSINE, 487, AminoAcidCode.LEUCINE, 498).thenDelete().build();
    Assert.assertEquals("p.K487_L498del", 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 60 with SequenceVariation

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

the class SequenceVariantHGVSFormatterTest method testFormatDeletionMultiAasAndInsertion1Code3.

@Test
public void testFormatDeletionMultiAasAndInsertion1Code3() throws Exception {
    SequenceVariation pm = new SequenceVariationImpl.FluentBuilding().selectAminoAcidRange(AminoAcidCode.LEUCINE, 330, AminoAcidCode.ALANINE, 331).thenDeleteAndInsert(AminoAcidCode.PHENYLALANINE).build();
    Assert.assertEquals("p.Leu330_Ala331delinsPhe", 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