Search in sources :

Example 31 with Protein

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

the class ProteinParserTest method shouldHandleProteinWithNonStandardAminoAcids.

@Test
public void shouldHandleProteinWithNonStandardAminoAcids() {
    Protein protein = ProteinParser.source(NON_STANDARD_PDB_ID).parse();
    // ensure that the initial selenomethionine stored as HETATM is correctly parsed
    System.out.println(protein.getAminoAcidSequence());
    Assert.assertThat(protein.getAminoAcidSequence(), startsWith("M"));
}
Also used : Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 32 with Protein

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

the class ProteinParserTest method shouldParseInsertedAminoAcids.

@Test
public void shouldParseInsertedAminoAcids() {
    Protein protein = ProteinParser.source("2w0l").parse();
    List<Group> groups = protein.select().chainName("A").residueNumber(95).asFilteredGroups().collect(Collectors.toList());
    Assert.assertEquals(2, groups.size());
    groups.forEach(System.out::println);
}
Also used : Group(de.bioforscher.jstructure.model.structure.Group) 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