Search in sources :

Example 16 with Protein

use of de.bioforscher.jstructure.model.structure.Protein in project jstructure by JonStargaryen.

the class ProteinParserTest method shouldParseAlternativePositions.

@Test
public void shouldParseAlternativePositions() {
    Protein protein = ProteinParser.source("4bpm").parse();
    protein.select().pdbSerial(61).asAtom();
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 17 with Protein

use of de.bioforscher.jstructure.model.structure.Protein in project jstructure by JonStargaryen.

the class ProteinParserTest method shouldHandleProteinWithOligopeptide.

@Test
public void shouldHandleProteinWithOligopeptide() {
    Protein protein = ProteinParser.source("1lyb").parse();
    // contains peptide-like groups - ought to be an AminoAcid
    AminoAcid statine = (AminoAcid) protein.select().groupName("STA").asGroup();
    Assert.assertTrue(statine.getPolymerType() == GroupPrototype.PolymerType.PEPTIDE_LIKE);
    Assert.assertTrue(statine.isAminoAcid());
    Assert.assertFalse(statine.isLigand());
    Assert.assertTrue(protein.aminoAcids().collect(Collectors.toList()).contains(statine));
}
Also used : AminoAcid(de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid) Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 18 with Protein

use of de.bioforscher.jstructure.model.structure.Protein in project jstructure by JonStargaryen.

the class UniProtAnnotatorTest method shouldAnnotate4lgd.

@Test
public void shouldAnnotate4lgd() {
    Protein protein = ProteinParser.source("4lgd").parse();
    uniProtAnnotator.process(protein);
    protein.select().chainName("A", "B", "C", "D").asFilteredChains().forEach(chain -> {
        UniProtAnnotationContainer container = chain.getFeatureContainer().getFeature(UniProtAnnotationContainer.class);
    });
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 19 with Protein

use of de.bioforscher.jstructure.model.structure.Protein in project jstructure by JonStargaryen.

the class SiftsMappingAnnotatorTest method shouldDetermineUniProtNumbering.

@Test
public void shouldDetermineUniProtNumbering() {
    Protein protein = ProteinParser.source("1acj").parse();
    annotator.process(protein);
    ChainMapping chainSiftsMapping = protein.getChains().get(0).getFeatureContainer().getFeature(ChainMapping.class);
    Assert.assertEquals("P04058", chainSiftsMapping.getUniProtId());
    Assert.assertEquals("3.1.1.7", chainSiftsMapping.getEcNumber());
    Assert.assertEquals("PF00135", chainSiftsMapping.getPfamId());
    protein.aminoAcids().forEach(group -> Assert.assertTrue(group.getFeatureContainer().getFeatureOptional(ResidueMapping.class).isPresent()));
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 20 with Protein

use of de.bioforscher.jstructure.model.structure.Protein in project jstructure by JonStargaryen.

the class PLIPAnnotatorTest method shouldAnnotateProteinWithHalogenBond.

@Test
public void shouldAnnotateProteinWithHalogenBond() {
    Protein protein = ProteinParser.source("4BPM").parse();
    plipAnnotator.process(protein);
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Aggregations

Protein (de.bioforscher.jstructure.model.structure.Protein)32 Test (org.junit.Test)25 IOException (java.io.IOException)10 ProteinParser (de.bioforscher.jstructure.parser.ProteinParser)8 Collectors (java.util.stream.Collectors)8 Group (de.bioforscher.jstructure.model.structure.Group)7 List (java.util.List)6 AbstractFeatureProvider (de.bioforscher.jstructure.model.feature.AbstractFeatureProvider)5 FeatureProviderRegistry (de.bioforscher.jstructure.model.feature.FeatureProviderRegistry)5 Assert (org.junit.Assert)5 Before (org.junit.Before)4 AminoAcid (de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid)3 UncheckedIOException (java.io.UncheckedIOException)3 Paths (java.nio.file.Paths)3 Stream (java.util.stream.Stream)3 LoopFraction (de.bioforscher.jstructure.feature.loopfraction.LoopFraction)2 Atom (de.bioforscher.jstructure.model.structure.Atom)2 Chain (de.bioforscher.jstructure.model.structure.Chain)2 Files (java.nio.file.Files)2 Path (java.nio.file.Path)2