Search in sources :

Example 26 with Protein

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

the class PLIPAnnotatorTest method shouldAnnotateSingleProtein.

@Test
public void shouldAnnotateSingleProtein() throws IOException {
    Protein protein = ProteinParser.source("4BPM").parse();
    plipAnnotator.process(protein);
    PLIPInteractionContainer plipInteractionContainer = protein.getFeatureContainer().getFeature(PLIPInteractionContainer.class);
    plipInteractionContainer.getInteractions().forEach(System.out::println);
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 27 with Protein

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

the class SiftsMappingAnnotatorTest method shouldHandle5tgl.

@Test
public void shouldHandle5tgl() {
    Protein protein = ProteinParser.source("5tgl").parse();
    annotator.process(protein);
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 28 with Protein

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

the class EnergyProfileCalculatorTest method shouldProcessStructureWithMPH.

@Test
public void shouldProcessStructureWithMPH() {
    Protein protein = ProteinParser.source("1P7P").parse();
    featureProvider.process(protein);
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 29 with Protein

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

the class AbstractItemSetMinerDataSetComposer method handleLine.

private String handleLine(Protein protein, String line, boolean functional) {
    try {
        String[] sectionSplit = line.split("_");
        PLIPInteractionContainer container = protein.getFeatureContainer().getFeature(PLIPInteractionContainer.class);
        // extract peculiar residues
        List<Group> groups = Stream.of(sectionSplit).skip(1).map(residueSection -> extractResidue(protein, residueSection)).collect(Collectors.toList());
        return groups.stream().map(group -> mapToString(container, group)).collect(Collectors.joining(",", line + ",", "," + (functional ? "" : "non-") + "functional"));
    } catch (Exception e) {
        e.fillInStackTrace();
        // thrown upon missing backbone atoms during secondary structure assignment
        return "";
    }
}
Also used : AbstractFeatureProvider(de.bioforscher.jstructure.model.feature.AbstractFeatureProvider) EnergyProfile(de.bioforscher.jstructure.feature.energyprofile.EnergyProfile) ProteinParser(de.bioforscher.jstructure.parser.ProteinParser) LoopFraction(de.bioforscher.jstructure.feature.loopfraction.LoopFraction) Files(java.nio.file.Files) FileWriter(java.io.FileWriter) DecimalFormat(java.text.DecimalFormat) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) PLIPInteractionContainer(de.bioforscher.jstructure.feature.interactions.PLIPInteractionContainer) List(java.util.List) AccessibleSurfaceArea(de.bioforscher.jstructure.feature.asa.AccessibleSurfaceArea) PLIPInteraction(de.bioforscher.jstructure.feature.interactions.PLIPInteraction) Stream(java.util.stream.Stream) Paths(java.nio.file.Paths) Group(de.bioforscher.jstructure.model.structure.Group) Map(java.util.Map) Protein(de.bioforscher.jstructure.model.structure.Protein) FeatureProviderRegistry(de.bioforscher.jstructure.model.feature.FeatureProviderRegistry) Group(de.bioforscher.jstructure.model.structure.Group) PLIPInteractionContainer(de.bioforscher.jstructure.feature.interactions.PLIPInteractionContainer) IOException(java.io.IOException)

Example 30 with Protein

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

the class LinkInteractionsToTopologyAndSequenceMotifs method handleLine.

private static void handleLine(String line) {
    System.out.println(line);
    // load protein, calculate features
    Protein protein = ProteinParser.source(line.split("_")[0]).parse();
    plipAnnotator.process(protein);
    sequenceMotifAnnotator.process(protein);
    topologyAnnotator.process(protein);
    // select wanted chain
    Chain chain = protein.select().chainName(line.split("_")[1]).asChain();
    System.out.println(chain.getAminoAcidSequence());
}
Also used : Chain(de.bioforscher.jstructure.model.structure.Chain) Protein(de.bioforscher.jstructure.model.structure.Protein)

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