Search in sources :

Example 21 with Protein

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

the class SecondaryStructureAnnotatorTest method getSecondaryStructureAnnotation.

private String getSecondaryStructureAnnotation(String id) {
    // load structure
    Protein protein = ProteinParser.source(id).parse();
    // assign states
    featureProvider.process(protein);
    // return complete DSSP annotation string from jstructrue
    return protein.aminoAcids().map(residue -> residue.getFeatureContainer().getFeature(SecondaryStructure.class)).map(SecondaryStructure::getSecondaryStructure).map(SecondaryStructureElement::getOneLetterRepresentation).map(character -> character.equals("c") ? " " : character).collect(Collectors.joining());
}
Also used : AbstractFeatureProvider(de.bioforscher.jstructure.model.feature.AbstractFeatureProvider) ProteinParser(de.bioforscher.jstructure.parser.ProteinParser) Test(org.junit.Test) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) StructureException(org.biojava.nbio.structure.StructureException) SecStrucState(org.biojava.nbio.structure.secstruc.SecStrucState) Group(org.biojava.nbio.structure.Group) Structure(org.biojava.nbio.structure.Structure) SecStrucCalc(org.biojava.nbio.structure.secstruc.SecStrucCalc) Protein(de.bioforscher.jstructure.model.structure.Protein) Assert(org.junit.Assert) GroupType(org.biojava.nbio.structure.GroupType) PDBFileReader(org.biojava.nbio.structure.io.PDBFileReader) FeatureProviderRegistry(de.bioforscher.jstructure.model.feature.FeatureProviderRegistry) Before(org.junit.Before) Protein(de.bioforscher.jstructure.model.structure.Protein)

Example 22 with Protein

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

the class AccessibleSurfaceAreaCalculatorTest method getJStructureASA.

private static List<Double> getJStructureASA(String id) {
    // load structure
    Protein protein = ProteinParser.source(id).parse();
    // assign states
    FeatureProviderRegistry.resolve(AccessibleSurfaceArea.class).process(protein);
    // return complete DSSP annotation string from jstructrue
    return protein.aminoAcids().map(residue -> residue.getFeatureContainer().getFeature(AccessibleSurfaceArea.class).getAccessibleSurfaceArea()).collect(Collectors.toList());
}
Also used : Arrays(java.util.Arrays) ProteinParser(de.bioforscher.jstructure.parser.ProteinParser) AsaCalculator(org.biojava.nbio.structure.asa.AsaCalculator) Combinatorics(de.bioforscher.jstructure.model.Combinatorics) Test(org.junit.Test) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) GroupAsa(org.biojava.nbio.structure.asa.GroupAsa) StructureException(org.biojava.nbio.structure.StructureException) List(java.util.List) Structure(org.biojava.nbio.structure.Structure) Protein(de.bioforscher.jstructure.model.structure.Protein) Assert(org.junit.Assert) PDBFileReader(org.biojava.nbio.structure.io.PDBFileReader) FeatureProviderRegistry(de.bioforscher.jstructure.model.feature.FeatureProviderRegistry) Protein(de.bioforscher.jstructure.model.structure.Protein)

Example 23 with Protein

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

the class PLIPAnnotatorTest method shouldProteinWithIllReference.

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

Example 24 with Protein

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

the class UniProtAnnotatorTest method shouldAnnotate4lg6.

@Test
public void shouldAnnotate4lg6() {
    Protein protein = ProteinParser.source("4lg6").parse();
    uniProtAnnotator.process(protein);
    protein.select().chainName("A").asFilteredChains().forEach(chain -> {
        UniProtAnnotationContainer container = chain.getFeatureContainer().getFeature(UniProtAnnotationContainer.class);
        Assert.assertTrue(container.getReferences().size() == 6);
        Assert.assertTrue(container.getMutagenesisSites().size() == 3);
        Assert.assertTrue(container.getNaturalVariants().size() == 0);
    });
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 25 with Protein

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

the class EnergyProfileCalculatorTest method shouldProcessStructure.

@Test
public void shouldProcessStructure() {
    Protein protein = ProteinParser.source("1ATI").parse();
    featureProvider.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