├── .gitignore ├── paxtools-query ├── src │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── biopax │ │ │ └── paxtools │ │ │ └── query │ │ │ ├── wrapperL3 │ │ │ ├── package-info.java │ │ │ ├── Filter.java │ │ │ ├── DataSourceFilter.java │ │ │ ├── UbiqueFilter.java │ │ │ ├── OrganismFilter.java │ │ │ └── EdgeL3.java │ │ │ ├── wrapperL3undirected │ │ │ ├── package-info.java │ │ │ └── EdgeL3.java │ │ │ ├── model │ │ │ ├── package-info.java │ │ │ ├── Edge.java │ │ │ ├── GraphObject.java │ │ │ └── Graph.java │ │ │ ├── algorithm │ │ │ ├── package-info.java │ │ │ └── LimitType.java │ │ │ └── package-info.java │ └── test │ │ └── resources │ │ └── logback-test.xml └── pom.xml ├── gsea-converter ├── src │ ├── test │ │ └── resources │ │ │ ├── pc14test.owl.gz │ │ │ └── logback-test.xml │ └── main │ │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── io │ │ └── gsea │ │ └── package-info.java └── pom.xml ├── psimi-converter └── src │ ├── test │ └── resources │ │ ├── human_31.xml.gz │ │ ├── 10523676-compact.xml.gz │ │ └── logback-test.xml │ └── main │ └── java │ └── org │ └── biopax │ └── paxtools │ └── converter │ └── psi │ └── package-info.java ├── paxtools-core ├── src │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── biopax │ │ │ │ └── paxtools │ │ │ │ ├── model │ │ │ │ ├── level2 │ │ │ │ │ ├── dna.java │ │ │ │ │ ├── rna.java │ │ │ │ │ ├── protein.java │ │ │ │ │ ├── transport.java │ │ │ │ │ ├── utilityClass.java │ │ │ │ │ ├── unificationXref.java │ │ │ │ │ ├── sequenceLocation.java │ │ │ │ │ ├── PositionStatusType.java │ │ │ │ │ ├── externalReferenceUtilityClass.java │ │ │ │ │ ├── transportWithBiochemicalReaction.java │ │ │ │ │ ├── modulation.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ ├── pathwayComponent.java │ │ │ │ │ ├── relationshipXref.java │ │ │ │ │ ├── physicalInteraction.java │ │ │ │ │ ├── sequenceSite.java │ │ │ │ │ ├── interaction.java │ │ │ │ │ ├── sequenceEntity.java │ │ │ │ │ ├── openControlledVocabulary.java │ │ │ │ │ ├── Level2Element.java │ │ │ │ │ ├── ControlType.java │ │ │ │ │ ├── SpontaneousType.java │ │ │ │ │ ├── XReferrable.java │ │ │ │ │ ├── dataSource.java │ │ │ │ │ ├── physicalEntity.java │ │ │ │ │ ├── InteractionParticipant.java │ │ │ │ │ ├── sequenceInterval.java │ │ │ │ │ ├── sequenceParticipant.java │ │ │ │ │ ├── xref.java │ │ │ │ │ ├── pathway.java │ │ │ │ │ ├── kPrime.java │ │ │ │ │ ├── smallMolecule.java │ │ │ │ │ ├── deltaGprimeO.java │ │ │ │ │ ├── conversion.java │ │ │ │ │ ├── Direction.java │ │ │ │ │ ├── experimentalForm.java │ │ │ │ │ ├── control.java │ │ │ │ │ ├── pathwayStep.java │ │ │ │ │ ├── physicalEntityParticipant.java │ │ │ │ │ ├── publicationXref.java │ │ │ │ │ ├── bioSource.java │ │ │ │ │ ├── sequenceFeature.java │ │ │ │ │ ├── evidence.java │ │ │ │ │ ├── process.java │ │ │ │ │ ├── confidence.java │ │ │ │ │ ├── chemicalStructure.java │ │ │ │ │ └── complexAssembly.java │ │ │ │ ├── level3 │ │ │ │ │ ├── Rna.java │ │ │ │ │ ├── Protein.java │ │ │ │ │ ├── Transport.java │ │ │ │ │ ├── UtilityClass.java │ │ │ │ │ ├── RnaReference.java │ │ │ │ │ ├── SmallMolecule.java │ │ │ │ │ ├── PositionStatusType.java │ │ │ │ │ ├── StructureFormatType.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ ├── TemplateReactionRegulation.java │ │ │ │ │ ├── NucleicAcid.java │ │ │ │ │ ├── TransportWithBiochemicalReaction.java │ │ │ │ │ ├── StepDirection.java │ │ │ │ │ ├── RnaRegionReference.java │ │ │ │ │ ├── PhenotypeVocabulary.java │ │ │ │ │ ├── TemplateDirectionType.java │ │ │ │ │ ├── SequenceEntity.java │ │ │ │ │ ├── XReferrable.java │ │ │ │ │ ├── ConversionDirectionType.java │ │ │ │ │ ├── TissueVocabulary.java │ │ │ │ │ ├── Observable.java │ │ │ │ │ ├── EntityReferenceTypeVocabulary.java │ │ │ │ │ ├── RnaRegion.java │ │ │ │ │ ├── RelationshipTypeVocabulary.java │ │ │ │ │ ├── CellVocabulary.java │ │ │ │ │ ├── DnaRegionReference.java │ │ │ │ │ ├── Process.java │ │ │ │ │ ├── SequenceLocation.java │ │ │ │ │ ├── CellularLocationVocabulary.java │ │ │ │ │ ├── DnaRegion.java │ │ │ │ │ ├── Dna.java │ │ │ │ │ ├── SequenceInterval.java │ │ │ │ │ ├── SequenceSite.java │ │ │ │ │ ├── InteractionVocabulary.java │ │ │ │ │ ├── SequenceRegionVocabulary.java │ │ │ │ │ ├── NucleicAcidReference.java │ │ │ │ │ ├── NucleicAcidRegionReference.java │ │ │ │ │ ├── TemplateReaction.java │ │ │ │ │ ├── Controller.java │ │ │ │ │ ├── EvidenceCodeVocabulary.java │ │ │ │ │ ├── SmallMoleculeReference.java │ │ │ │ │ ├── Provenance.java │ │ │ │ │ ├── Xref.java │ │ │ │ │ ├── Degradation.java │ │ │ │ │ ├── DnaReference.java │ │ │ │ │ ├── PublicationXref.java │ │ │ │ │ ├── PathwayStep.java │ │ │ │ │ ├── ProteinReference.java │ │ │ │ │ ├── CatalysisDirectionType.java │ │ │ │ │ ├── SequenceModificationVocabulary.java │ │ │ │ │ ├── MolecularInteraction.java │ │ │ │ │ ├── FragmentFeature.java │ │ │ │ │ ├── ExperimentalFormVocabulary.java │ │ │ │ │ ├── SimplePhysicalEntity.java │ │ │ │ │ ├── ComplexAssembly.java │ │ │ │ │ └── CovalentBindingFeature.java │ │ │ │ └── package-info.java │ │ │ │ ├── impl │ │ │ │ ├── package-info.java │ │ │ │ ├── level2 │ │ │ │ │ ├── package-info.java │ │ │ │ │ ├── rnaImpl.java │ │ │ │ │ ├── transportWithBiochemicalReactionImpl.java │ │ │ │ │ ├── dnaImpl.java │ │ │ │ │ ├── proteinImpl.java │ │ │ │ │ ├── transportImpl.java │ │ │ │ │ ├── unificationXrefImpl.java │ │ │ │ │ ├── complexAssemblyImpl.java │ │ │ │ │ ├── SequenceEntityImpl.java │ │ │ │ │ ├── BioPAXLevel2ElementImpl.java │ │ │ │ │ ├── relationshipXrefImpl.java │ │ │ │ │ └── modulationImpl.java │ │ │ │ └── level3 │ │ │ │ │ ├── package-info.java │ │ │ │ │ ├── NucleicAcidImpl.java │ │ │ │ │ ├── DegradationImpl.java │ │ │ │ │ ├── CellVocabularyImpl.java │ │ │ │ │ ├── TissueVocabularyImpl.java │ │ │ │ │ ├── TransportImpl.java │ │ │ │ │ ├── ProteinReferenceImpl.java │ │ │ │ │ ├── DnaRegionReferenceImpl.java │ │ │ │ │ ├── DnaReferenceImpl.java │ │ │ │ │ ├── InteractionVocabularyImpl.java │ │ │ │ │ ├── TemplateReactionRegulationImpl.java │ │ │ │ │ ├── EvidenceCodeVocabularyImpl.java │ │ │ │ │ ├── SequenceRegionVocabularyImpl.java │ │ │ │ │ ├── CellularLocationVocabularyImpl.java │ │ │ │ │ ├── ExperimentalFormVocabularyImpl.java │ │ │ │ │ ├── RelationshipTypeVocabularyImpl.java │ │ │ │ │ ├── EntityReferenceTypeVocabularyImpl.java │ │ │ │ │ ├── SequenceModificationVocabularyImpl.java │ │ │ │ │ ├── TransportWithBiochemicalReactionImpl.java │ │ │ │ │ ├── RnaReferenceImpl.java │ │ │ │ │ ├── ComplexAssemblyImpl.java │ │ │ │ │ ├── RnaRegionReferenceImpl.java │ │ │ │ │ ├── UnificationXrefImpl.java │ │ │ │ │ ├── GeneImpl.java │ │ │ │ │ ├── PhenotypeVocabularyImpl.java │ │ │ │ │ ├── FragmentFeatureImpl.java │ │ │ │ │ ├── ModulationImpl.java │ │ │ │ │ ├── SequenceLocationImpl.java │ │ │ │ │ ├── RnaImpl.java │ │ │ │ │ ├── ScoreImpl.java │ │ │ │ │ ├── MolecularInteractionImpl.java │ │ │ │ │ ├── RnaRegionImpl.java │ │ │ │ │ ├── DnaImpl.java │ │ │ │ │ ├── L3ElementImpl.java │ │ │ │ │ ├── ProteinImpl.java │ │ │ │ │ ├── DnaRegionImpl.java │ │ │ │ │ ├── NucleicAcidReferenceImpl.java │ │ │ │ │ └── DeltaGImpl.java │ │ │ │ ├── converter │ │ │ │ └── package-info.java │ │ │ │ ├── command │ │ │ │ ├── package-info.java │ │ │ │ ├── Command.java │ │ │ │ ├── AddCommand.java │ │ │ │ ├── RemoveCommand.java │ │ │ │ ├── AbstractPropertyCommand.java │ │ │ │ └── AbstractAddRemoveCommand.java │ │ │ │ ├── controller │ │ │ │ ├── package-info.java │ │ │ │ ├── ModelFilter.java │ │ │ │ ├── DataPropertyEditor.java │ │ │ │ ├── PropertyFilterBilinked.java │ │ │ │ ├── IDFetcher.java │ │ │ │ ├── DecoratingPropertyAccessor.java │ │ │ │ ├── StringPropertyEditor.java │ │ │ │ ├── Visitor.java │ │ │ │ └── EnumeratedPropertyEditor.java │ │ │ │ ├── io │ │ │ │ └── package-info.java │ │ │ │ └── util │ │ │ │ ├── package-info.java │ │ │ │ ├── AutoComplete.java │ │ │ │ ├── BioPaxIOException.java │ │ │ │ ├── Filter.java │ │ │ │ ├── IllegalBioPAXArgumentException.java │ │ │ │ ├── AccessibleSet.java │ │ │ │ └── ClassFilterSet.java │ │ └── resources │ │ │ └── org │ │ │ └── biopax │ │ │ └── paxtools │ │ │ └── controller │ │ │ └── L3Editor.properties.fetchOrder │ └── test │ │ ├── resources │ │ └── logback-test.xml │ │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ ├── impl │ │ └── level3 │ │ │ └── ModelCoverageTest.java │ │ └── controller │ │ └── EditorMapImplTest.java └── pom.xml ├── pattern ├── src │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── biopax │ │ │ │ └── paxtools │ │ │ │ └── pattern │ │ │ │ ├── util │ │ │ │ ├── package.html │ │ │ │ ├── RelType.java │ │ │ │ └── ProgressWatcher.java │ │ │ │ ├── package.html │ │ │ │ ├── constraint │ │ │ │ ├── package.html │ │ │ │ ├── MultiPathConstraint.java │ │ │ │ ├── NonUbique.java │ │ │ │ ├── Equality.java │ │ │ │ ├── ActivityConstraint.java │ │ │ │ ├── Type.java │ │ │ │ ├── NOT.java │ │ │ │ └── IDConstraint.java │ │ │ │ └── miner │ │ │ │ ├── SIFToText.java │ │ │ │ ├── SimpleIDFetcher.java │ │ │ │ ├── package.html │ │ │ │ ├── ControlsTransportMiner.java │ │ │ │ ├── SIFType.java │ │ │ │ ├── ControlsPhosphorylationMiner.java │ │ │ │ ├── ControlsProductionOfMiner.java │ │ │ │ ├── CustomFormat.java │ │ │ │ ├── NeighborOfMiner.java │ │ │ │ ├── ReactsWithMiner.java │ │ │ │ ├── UsedToProduceMiner.java │ │ │ │ ├── InteractsWithMiner.java │ │ │ │ ├── InComplexWithMiner.java │ │ │ │ ├── Miner.java │ │ │ │ └── CSCOThroughDegradationMiner.java │ │ └── resources │ │ │ └── org │ │ │ └── biopax │ │ │ └── paxtools │ │ │ └── pattern │ │ │ └── miner │ │ │ └── blacklist-names.txt │ └── test │ │ ├── resources │ │ └── logback-test.xml │ │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── pattern │ │ └── constraint │ │ └── TestParent.java ├── README.md └── pom.xml ├── paxtools-console └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── biopax │ │ │ └── paxtools │ │ │ └── examples │ │ │ ├── package-info.java │ │ │ ├── tutorial-pom-examples.xml │ │ │ ├── PublicationStatisticsAnalyzer.java │ │ │ ├── Macros.java │ │ │ └── PathwayComponentLister.java │ └── resources │ │ └── logback.xml │ └── test │ └── java │ └── org │ └── biopax │ └── paxtools │ └── CommandsTest.java ├── sbgn-converter └── src │ ├── main │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── io │ │ └── sbgn │ │ ├── package-info.java │ │ ├── UbiqueDetector.java │ │ ├── FeatureDecorator.java │ │ ├── ListUbiqueDetector.java │ │ └── VCompound.java │ └── test │ └── resources │ └── logback-test.xml ├── normalizer ├── src │ ├── test │ │ └── resources │ │ │ └── logback-test.xml │ └── main │ │ └── resources │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── normalizer │ │ └── readme.md └── pom.xml ├── json-converter ├── src │ ├── test │ │ └── resources │ │ │ └── logback-test.xml │ └── main │ │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── io │ │ └── jsonld │ │ ├── JsonldConverter.java │ │ └── package-info.java └── pom.xml ├── paxtools-trove ├── src │ ├── test │ │ ├── resources │ │ │ └── logback-test.xml │ │ └── java │ │ │ └── org │ │ │ └── biopax │ │ │ └── paxtools │ │ │ └── trove │ │ │ └── TSetBuilderTest.java │ └── main │ │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── trove │ │ └── TProvider.java └── pom.xml ├── src ├── main │ └── java │ │ └── org │ │ └── biopax │ │ └── paxtools │ │ └── package-info.java └── site │ └── apt │ └── index.apt ├── .github └── workflows │ └── maven.yml └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .classpath 3 | .project 4 | .settings 5 | target 6 | *.iml 7 | .idea 8 | *.versionsBackup 9 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.biopax.paxtools.query.wrapperL3; -------------------------------------------------------------------------------- /gsea-converter/src/test/resources/pc14test.owl.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioPAX/Paxtools/HEAD/gsea-converter/src/test/resources/pc14test.owl.gz -------------------------------------------------------------------------------- /psimi-converter/src/test/resources/human_31.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioPAX/Paxtools/HEAD/psimi-converter/src/test/resources/human_31.xml.gz -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.biopax.paxtools.query.wrapperL3undirected; -------------------------------------------------------------------------------- /psimi-converter/src/test/resources/10523676-compact.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioPAX/Paxtools/HEAD/psimi-converter/src/test/resources/10523676-compact.xml.gz -------------------------------------------------------------------------------- /psimi-converter/src/main/java/org/biopax/paxtools/converter/psi/package-info.java: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @author rodche 4 | * 5 | */ 6 | package org.biopax.paxtools.converter.psi; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/dna.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | public interface dna extends sequenceEntity 4 | { 5 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/rna.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface rna extends sequenceEntity 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Rna.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface Rna extends NucleicAcid 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the default BioPAX Model implementations. 3 | */ 4 | package org.biopax.paxtools.impl; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/protein.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface protein extends sequenceEntity 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/transport.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface transport extends conversion 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/utilityClass.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | public interface utilityClass extends Level2Element 4 | { 5 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Protein.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface Protein extends SequenceEntity 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Transport.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface Transport extends Conversion 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/unificationXref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface unificationXref extends xref 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the SIF rules for BioPAX Level 3. 3 | */ 4 | package org.biopax.paxtools.query.model; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/converter/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains a tools for upgrading BioPAX L1 and L2 to L3. 3 | */ 4 | package org.biopax.paxtools.converter; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/UtilityClass.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | public interface UtilityClass extends Level3Element 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the SIF rules for BioPAX Level 3. 3 | */ 4 | package org.biopax.paxtools.query.algorithm; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains classes for implementing undoable editing the model. 3 | */ 4 | package org.biopax.paxtools.command; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the default implementation for BioPAX Level 2. 3 | */ 4 | package org.biopax.paxtools.impl.level2; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the default implementation for BioPAX Level 3. 3 | */ 4 | package org.biopax.paxtools.impl.level3; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceLocation.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface sequenceLocation extends utilityClass 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/RnaReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | public interface RnaReference extends NucleicAcidReference 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/Command.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.command; 2 | 3 | public interface Command 4 | { 5 | public boolean undo(); 6 | 7 | public boolean redo(); 8 | } 9 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SmallMolecule.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface SmallMolecule extends SimplePhysicalEntity 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/PositionStatusType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | public enum PositionStatusType 4 | { 5 | EQUAL, 6 | LESS_THAN, 7 | GREATER_THAN 8 | } 9 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/PositionStatusType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | public enum PositionStatusType 4 | { 5 | EQUAL, 6 | LESS_THAN, 7 | GREATER_THAN 8 | } 9 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains various methods and algorithms for traversing and manipulating the model. 3 | */ 4 | package org.biopax.paxtools.controller; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/externalReferenceUtilityClass.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface externalReferenceUtilityClass extends utilityClass 5 | { 6 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/StructureFormatType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public enum StructureFormatType 5 | { 6 | CML, 7 | SMILES, 8 | InChI 9 | } 10 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the interfaces that maps to the OWL classes defined in the BioPAX specification. 3 | */ 4 | package org.biopax.paxtools.model; -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/util/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Package for several utility classes. 9 | 10 | 11 | -------------------------------------------------------------------------------- /paxtools-console/src/main/java/org/biopax/paxtools/examples/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains several examples that uses Paxtools to demonstrate basic functionality. 3 | */ 4 | package org.biopax.paxtools.examples; 5 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/io/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains classes that handle IO operations including reading and writing BioPAX from files and streams.. 3 | */ 4 | package org.biopax.paxtools.io; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the interfaces that maps classes defined in the BioPAX Level 3 specification. 3 | */ 4 | package org.biopax.paxtools.model.level3; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains various collections and utilities that is used by the other packages and modules of paxtools. 3 | */ 4 | package org.biopax.paxtools.util; 5 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/TemplateReactionRegulation.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | */ 5 | public interface TemplateReactionRegulation extends Control 6 | { 7 | 8 | 9 | } 10 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/transportWithBiochemicalReaction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface transportWithBiochemicalReaction 5 | extends biochemicalReaction, transport 6 | 7 | { 8 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/NucleicAcid.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Tagger interface for DNA and RNA 5 | */ 6 | public interface NucleicAcid extends SequenceEntity 7 | { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/TransportWithBiochemicalReaction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface TransportWithBiochemicalReaction 5 | extends BiochemicalReaction, Transport 6 | 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains a BioPAX to SBGN-PD converter and associated classes. 3 | * It can also optionally perform graph layout (COSE). 4 | */ 5 | package org.biopax.paxtools.io.sbgn; 6 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/util/RelType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.util; 2 | 3 | /** 4 | * Distinguishes between input and output. 5 | * 6 | * @author Ozgun Babur 7 | */ 8 | public enum RelType 9 | { 10 | INPUT, 11 | OUTPUT 12 | } 13 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/StepDirection.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Catalysis direction controlled vocabulary 5 | */ 6 | public enum StepDirection 7 | { 8 | LEFT_TO_RIGHT, 9 | RIGHT_TO_LEFT, 10 | } 11 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/RnaRegionReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * A RNA region reference 5 | */ 6 | 7 | public interface RnaRegionReference extends NucleicAcidRegionReference 8 | { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/PhenotypeVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface PhenotypeVocabulary extends ControlledVocabulary 5 | { 6 | public String getPatoData(); 7 | 8 | public void setPatoData(String patoData); 9 | } -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Main package. Contains the Pattern class, an interface for Constraint, and a Searcher that 9 | implements iterative search. 10 | 11 | 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/TemplateDirectionType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * TODO:Class description User: demir Date: Aug 7, 2009 Time: 10:39:36 AM 5 | */ 6 | public enum TemplateDirectionType 7 | { 8 | FORWARD, 9 | REVERSE 10 | } 11 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/modulation.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * get controlled should be catalysis 5 | */ 6 | 7 | public interface modulation extends control 8 | { 9 | // --------------------- ACCESORS and MUTATORS--------------------- 10 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/ModelFilter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.Model; 4 | 5 | /** 6 | * A generic filter interface for Models. 7 | */ 8 | public interface ModelFilter { 9 | 10 | Model filter(final Model model); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Graph-theoretic querying module in Paxtools is used for identifying paths between molecules or identifying other 3 | * molecules that is reachable through some specific paths using the BioPAX data model. 4 | */ 5 | package org.biopax.paxtools.query; -------------------------------------------------------------------------------- /gsea-converter/src/main/java/org/biopax/paxtools/io/gsea/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package is a tool to convert a BioPAX model to the GMT format, 3 | * which can be then analysed with the standard GSEA software and other tools 4 | * (because the result is a simple TSV text). 5 | * 6 | */ 7 | package org.biopax.paxtools.io.gsea; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceEntity.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Tagger interface for macromolecules that are related to a genetic sequence: DNA, RNA, Protein. 5 | */ 6 | public interface SequenceEntity extends SimplePhysicalEntity 7 | { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Package for constraints. ConBox is a special class, not a constraint, but has static methods for 9 | creation of frequently used constraints. 10 | 11 | 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/DataPropertyEditor.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | /** 6 | * Created by igor on 13/08/15. 7 | */ 8 | public interface DataPropertyEditor extends PropertyEditor { 9 | } 10 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/NucleicAcidImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.NucleicAcid; 4 | 5 | 6 | public abstract class NucleicAcidImpl extends SimplePhysicalEntityImpl implements NucleicAcid 7 | { 8 | public NucleicAcidImpl() 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This package contains the interfaces that maps to the BioPAX level 2 specification. 3 | * 4 | * Note that although BioPAX level 2 is not camel case we have opted to use the capitalization style directly to 5 | * avoid any confusions. 6 | */ 7 | package org.biopax.paxtools.model.level2; -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/XReferrable.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | */ 7 | public interface XReferrable extends Level3Element 8 | { 9 | 10 | // Property XREF 11 | 12 | Set getXref(); 13 | 14 | void addXref(Xref xref); 15 | 16 | void removeXref(Xref xref); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/ConversionDirectionType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * This enum is used for specifying the direction of a Conversion. 5 | * @see Conversion#getConversionDirection() 6 | * 7 | */ 8 | public enum ConversionDirectionType 9 | { 10 | LEFT_TO_RIGHT, 11 | RIGHT_TO_LEFT, 12 | REVERSIBLE 13 | } 14 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/PropertyFilterBilinked.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.util.Filter; 4 | 5 | /** 6 | * A generic interface for bidirectional property filter 7 | */ 8 | public interface PropertyFilterBilinked extends Filter 9 | { 10 | boolean filterInverse(PropertyEditor editor); 11 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/TissueVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A reference to the BRENDA 5 | * @see Browse BRENDA 6 | */ 7 | public interface TissueVocabulary extends ControlledVocabulary { 8 | } 9 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/pathwayComponent.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Interface for pathway steps and processes 7 | */ 8 | public interface pathwayComponent extends Level2Element 9 | { 10 | // -------------------------- OTHER METHODS -------------------------- 11 | 12 | Set isPATHWAY_COMPONENTSof(); 13 | } 14 | -------------------------------------------------------------------------------- /paxtools-console/src/main/java/org/biopax/paxtools/examples/tutorial-pom-examples.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ossrh 4 | OSSRH Repository 5 | https://oss.sonatype.org/content/groups/public/ 6 | 7 | 8 | 9 | org.biopax.paxtools 10 | paxtools-core 11 | 6.0.0-SNAPSHOT 12 | 13 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/relationshipXref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface relationshipXref extends xref 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | // --------------------- ACCESORS and MUTATORS--------------------- 9 | String getRELATIONSHIP_TYPE(); 10 | 11 | void setRELATIONSHIP_TYPE(String RELATIONSHIP_TYPE); 12 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Observable.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * User: demir Date: Aug 17, 2007 Time: 5:47:27 PM 7 | */ 8 | public interface Observable extends Level3Element 9 | { 10 | 11 | Set getEvidence(); 12 | 13 | void addEvidence(Evidence newEvidence); 14 | 15 | void removeEvidence(Evidence oldEvidence); 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DegradationImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Degradation; 4 | 5 | 6 | public class DegradationImpl extends ConversionImpl implements Degradation 7 | { 8 | public DegradationImpl() { 9 | } 10 | 11 | public Class getModelInterface() 12 | { 13 | return Degradation.class; 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/EntityReferenceTypeVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definiiton: A reference to a term from an entity reference group ontology. As of the writing of this 6 | * documentation, there is no standard ontology of these terms, though a common type is ‘homology’. 7 | */ 8 | public interface EntityReferenceTypeVocabulary extends ControlledVocabulary 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/CellVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.CellVocabulary; 4 | 5 | 6 | public class CellVocabularyImpl extends ControlledVocabularyImpl 7 | implements CellVocabulary 8 | { 9 | public CellVocabularyImpl() { 10 | } 11 | 12 | public Class getModelInterface() { 13 | return CellVocabulary.class; 14 | } 15 | } -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFToText.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | /** 4 | * An interface for converting a SIF interaction to text. 5 | * 6 | * @author Ozgun Babur 7 | */ 8 | public interface SIFToText 9 | { 10 | /** 11 | * Creates the textual data corresponding to the given binary interaction. 12 | * @param inter the interaction 13 | * @return text data 14 | */ 15 | String convert(SIFInteraction inter); 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/RnaRegion.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A region on a RNA molecule. 5 | * 6 | * Usage: RNARegion is not a pool of independent molecules but a subregion on these molecules. As such, every RNARegion 7 | * has a defining RNA molecule. 8 | * 9 | * Examples: CDS, 3' UTR, Hairpin 10 | */ 11 | public interface RnaRegion extends NucleicAcid { 12 | } 13 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/IDFetcher.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * @author Ozgun Babur 9 | */ 10 | public interface IDFetcher 11 | { 12 | /** 13 | * Finds a String ID for the given element. 14 | * @param ele element to fetch the ID from 15 | * @return some identifiers 16 | */ 17 | Set fetchID(BioPAXElement ele); 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/AutoComplete.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | 6 | /** 7 | * Interface for demarcating excise-able boundaries of the object graph. 8 | * @author Ozgun Babur 9 | */ 10 | @Retention(RetentionPolicy.RUNTIME) 11 | public @interface AutoComplete 12 | { 13 | boolean forward() default true; 14 | boolean backward() default false; 15 | } 16 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/RelationshipTypeVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Vocabulary for defining relationship Xref types. A reference to the 5 | * PSI Molecular Interaction ontology 6 | * Cross Reference type. 7 | */ 8 | public interface RelationshipTypeVocabulary extends ControlledVocabulary { 9 | } 10 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/TissueVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.TissueVocabulary; 4 | 5 | 6 | public class TissueVocabularyImpl extends ControlledVocabularyImpl 7 | implements TissueVocabulary 8 | { 9 | public TissueVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return TissueVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/TransportImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Transport; 4 | 5 | 6 | public class TransportImpl extends ConversionImpl implements Transport 7 | { 8 | public TransportImpl() { 9 | } 10 | 11 | // --------------------- Interface BioPAXElement --------------------- 12 | 13 | public Class getModelInterface() 14 | { 15 | return Transport.class; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ProteinReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.ProteinReference; 4 | 5 | 6 | public class ProteinReferenceImpl extends SequenceEntityReferenceImpl 7 | implements ProteinReference 8 | { 9 | public ProteinReferenceImpl() { 10 | } 11 | 12 | public Class getModelInterface() 13 | { 14 | return ProteinReference.class; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DnaRegionReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.DnaRegionReference; 4 | 5 | 6 | public class DnaRegionReferenceImpl extends NucleicAcidRegionReferenceImpl implements DnaRegionReference 7 | { 8 | public DnaRegionReferenceImpl() 9 | { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() 14 | { 15 | return DnaRegionReference.class; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/UbiqueDetector.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.io.sbgn; 2 | 3 | import org.biopax.paxtools.model.level3.Entity; 4 | 5 | /** 6 | * Interface for ubiquitous molecule detection. 7 | * 8 | * @author Ozgun Babur 9 | */ 10 | public interface UbiqueDetector 11 | { 12 | /** 13 | * Checks if the PhysicalEntity is a ubiquitous molecule. 14 | * @param e PhysicalEntity or Gene to check 15 | * @return true if ubique 16 | */ 17 | boolean isUbique(Entity e); 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DnaReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.DnaReference; 4 | 5 | 6 | public class DnaReferenceImpl extends NucleicAcidReferenceImpl implements 7 | DnaReference 8 | { 9 | public DnaReferenceImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() 14 | { 15 | return DnaReference.class; 16 | } 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/CellVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A reference to the Cell Type Ontology (CL). 5 | * 6 | * Homepage at Ontology Lookup Service - GO. 7 | * Browse at Ontology Lookup Service - CL. 8 | */ 9 | public interface CellVocabulary extends ControlledVocabulary 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/DnaRegionReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A DNARegionReference is a grouping of several DNARegion entities that are common in sequence and 5 | * genomic position. Members can differ in cellular location, sequence features, SNPs, mutations and bound partners. 6 | * @see EntityReference 7 | */ 8 | 9 | public interface DnaRegionReference extends NucleicAcidRegionReference 10 | { 11 | 12 | 13 | } 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Process.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | import java.util.Set; 5 | 6 | /** 7 | * Tagging interface for entities that can participate in a pathway 8 | * and can be targeted by a control : Pathway and Interaction 9 | */ 10 | public interface Process extends Entity 11 | { 12 | public Set getControlledOf(); 13 | 14 | public Set getPathwayComponentOf(); 15 | 16 | public Set getStepProcessOf(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceLocation.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A location on a nucleotide or amino acid sequence. 5 | * 6 | * Usage: For most purposes it is more appropriate to use subclasses of this class. Direct instances 7 | * of SequenceLocation can be used for unknown locations that can not be classified neither as an 8 | * interval nor a site. 9 | */ 10 | public interface SequenceLocation extends UtilityClass 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/InteractionVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.InteractionVocabulary; 4 | 5 | 6 | public class InteractionVocabularyImpl extends ControlledVocabularyImpl 7 | implements InteractionVocabulary 8 | { 9 | public InteractionVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return InteractionVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/TemplateReactionRegulationImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.TemplateReactionRegulation; 4 | 5 | 6 | public class TemplateReactionRegulationImpl extends ControlImpl implements TemplateReactionRegulation 7 | { 8 | public TemplateReactionRegulationImpl() { 9 | } 10 | 11 | public Class getModelInterface() 12 | { 13 | return TemplateReactionRegulation.class; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/CellularLocationVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A reference to the Gene Ontology Cellular Component (GO CC) ontology. Homepage at http://www geneontology.org. Browse at Ontology Lookup Service. 8 | */ 9 | public interface CellularLocationVocabulary extends ControlledVocabulary 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/EvidenceCodeVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.EvidenceCodeVocabulary; 4 | 5 | 6 | public class EvidenceCodeVocabularyImpl extends ControlledVocabularyImpl 7 | implements EvidenceCodeVocabulary 8 | { 9 | public EvidenceCodeVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return EvidenceCodeVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/physicalInteraction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface physicalInteraction extends interaction 7 | { 8 | 9 | void addINTERACTION_TYPE(openControlledVocabulary INTERACTION_TYPE); 10 | 11 | Set getINTERACTION_TYPE(); 12 | 13 | void removeINTERACTION_TYPE( 14 | openControlledVocabulary INTERACTION_TYPE); 15 | 16 | void setINTERACTION_TYPE(Set INTERACTION_TYPE); 17 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/DnaRegion.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A region on a DNA molecule. 5 | * 6 | * Usage: DNARegion is not a pool of independent molecules but a subregion on these molecules. As such, 7 | * every DNARegion has a defining DNA molecule. This is defined at the EntityReference level. 8 | * 9 | * Examples: Protein encoding region, promoter 10 | * @see DnaRegionReference 11 | */ 12 | public interface DnaRegion extends NucleicAcid 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/SequenceRegionVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.SequenceRegionVocabulary; 4 | 5 | 6 | public class SequenceRegionVocabularyImpl extends ControlledVocabularyImpl 7 | implements SequenceRegionVocabulary 8 | { 9 | public SequenceRegionVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return SequenceRegionVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceSite.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface sequenceSite extends sequenceLocation 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | PositionStatusType getPOSITION_STATUS(); 9 | // --------------------- ACCESORS and MUTATORS--------------------- 10 | 11 | int getSEQUENCE_POSITION(); 12 | 13 | void setPOSITION_STATUS(PositionStatusType POSITION_STATUS); 14 | 15 | void setSEQUENCE_POSITION(int SEQUENCE_POSITION); 16 | } -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/SimpleIDFetcher.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.controller.IDFetcher; 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | 6 | import java.util.Collections; 7 | import java.util.Set; 8 | 9 | /** 10 | * Simple gets the URI (of an entity reference); 11 | */ 12 | public class SimpleIDFetcher implements IDFetcher 13 | { 14 | @Override 15 | public Set fetchID(BioPAXElement ele) 16 | { 17 | return Collections.singleton(ele.getUri()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/util/ProgressWatcher.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.util; 2 | 3 | /** 4 | * This interface is to use for tracking progress of a process. 5 | * @author Ozgun Babur 6 | */ 7 | public interface ProgressWatcher 8 | { 9 | /** 10 | * Sets how many ticks are there in total. 11 | * @param total total number of ticks 12 | */ 13 | public void setTotalTicks(int total); 14 | 15 | /** 16 | * Ticks the progress watcher. 17 | * @param times times to tick 18 | */ 19 | public void tick(int times); 20 | } 21 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/rnaImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.rna; 5 | 6 | class rnaImpl extends SequenceEntityImpl implements rna 7 | { 8 | // ------------------------ INTERFACE METHODS ------------------------ 9 | 10 | 11 | // --------------------- Interface BioPAXElement --------------------- 12 | 13 | public Class getModelInterface() 14 | { 15 | return rna.class; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/transportWithBiochemicalReactionImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.transportWithBiochemicalReaction; 5 | 6 | class transportWithBiochemicalReactionImpl 7 | extends biochemicalReactionImpl 8 | implements transportWithBiochemicalReaction 9 | { 10 | @Override public Class getModelInterface() 11 | { 12 | return transportWithBiochemicalReaction.class; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Dna.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A physical entity consisting of a sequence of deoxyribonucleotide monophosphates; a deoxyribonucleic 5 | * acid. 6 | * 7 | * Usage: DNA should be used for pools of individual DNA molecules. For describing subregions on those molecules use 8 | * DNARegion. 9 | * 10 | * Examples: a chromosome, a plasmid. A specific example is chromosome 7 of Homo sapiens. 11 | */ 12 | public interface Dna extends NucleicAcid 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/CellularLocationVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.CellularLocationVocabulary; 4 | 5 | 6 | public class CellularLocationVocabularyImpl extends ControlledVocabularyImpl 7 | implements CellularLocationVocabulary 8 | { 9 | public CellularLocationVocabularyImpl() { 10 | } 11 | 12 | public Class getModelInterface() { 13 | return CellularLocationVocabulary.class; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/interaction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface interaction extends process 7 | { 8 | // --------------------- ACCESORS and MUTATORS--------------------- 9 | 10 | void addPARTICIPANTS(InteractionParticipant aParticipant); 11 | 12 | Set getPARTICIPANTS(); 13 | 14 | void removePARTICIPANTS(InteractionParticipant aParticipant); 15 | 16 | void setPARTICIPANTS(Set PARTICIPANTS); 17 | 18 | } -------------------------------------------------------------------------------- /pattern/README.md: -------------------------------------------------------------------------------- 1 | # pattern 2 | ## Pattern search for BioPAX models 3 | 4 | Please read the [wiki](https://github.com/BioPAX/Paxtools/wiki/Pattern). 5 | 6 | If biopax-pattern framework was useful for your research, please cite the below article in your publications. 7 | 8 | Ö Babur, BA Aksoy, I Rodchenkov, SO Sümer, C Sander, E Demir [Pattern search in BioPAX models](http://bioinformatics.oxfordjournals.org/content/30/1/139.full.html) Bioinformatics (2014) 30 (1): 139-140. 9 | doi: 10.1093/bioinformatics/btt539 10 | 11 | ### Contact ### 12 | patternsearch@cbio.mskcc.org 13 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ExperimentalFormVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.ExperimentalFormVocabulary; 4 | 5 | 6 | public class ExperimentalFormVocabularyImpl extends ControlledVocabularyImpl 7 | implements ExperimentalFormVocabulary 8 | { 9 | public ExperimentalFormVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return ExperimentalFormVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Package for pattern miner utility. This package is not an essential part of the framework, but an 9 | example implementation of pattern search software using the framework. Each miner class is capable 10 | of creating the pattern and writing the result to a text output. The Dialog class is a GUI that 11 | executes the selected miner class on a selected model and writes output to the given file. 12 | 13 | 14 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/dnaImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.dna; 5 | 6 | /** 7 | */ 8 | class dnaImpl extends SequenceEntityImpl implements dna 9 | { 10 | // ------------------------ INTERFACE METHODS ------------------------ 11 | 12 | 13 | // --------------------- Interface BioPAXElement --------------------- 14 | 15 | public Class getModelInterface() 16 | { 17 | return dna.class; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceEntity.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * User: root Date: Aug 7, 2006 Time: 4:51:19 PM_DOT 5 | */ 6 | public interface sequenceEntity extends physicalEntity 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | bioSource getORGANISM(); 11 | // --------------------- ACCESORS and MUTATORS--------------------- 12 | 13 | String getSEQUENCE(); 14 | 15 | void setORGANISM(bioSource ORGANISM); 16 | 17 | void setSEQUENCE(String SEQUENCE); 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/proteinImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.protein; 5 | 6 | class proteinImpl extends SequenceEntityImpl implements protein 7 | { 8 | // ------------------------ INTERFACE METHODS ------------------------ 9 | 10 | 11 | // --------------------- Interface BioPAXElement --------------------- 12 | 13 | public Class getModelInterface() 14 | { 15 | return protein.class; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/openControlledVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface openControlledVocabulary 7 | extends externalReferenceUtilityClass, XReferrable 8 | { 9 | // -------------------------- OTHER METHODS -------------------------- 10 | 11 | void addTERM(String TERM); 12 | // --------------------- ACCESORS and MUTATORS--------------------- 13 | 14 | Set getTERM(); 15 | 16 | void removeTERM(String TERM); 17 | 18 | void setTERM(Set TERM); 19 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/RelationshipTypeVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.RelationshipTypeVocabulary; 4 | 5 | 6 | public class RelationshipTypeVocabularyImpl extends ControlledVocabularyImpl 7 | implements RelationshipTypeVocabulary { 8 | 9 | public RelationshipTypeVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return RelationshipTypeVocabulary.class; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/Level2Element.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Created by IntelliJ IDEA. 9 | * User: Emek 10 | * Date: Feb 9, 2008 11 | * Time: 11:41:04 PM 12 | * 13 | */ 14 | public interface Level2Element extends BioPAXElement 15 | { 16 | Set getCOMMENT(); 17 | 18 | void setCOMMENT(Set COMMENT); 19 | 20 | void addCOMMENT(String COMMENT); 21 | 22 | void removeCOMMENT(String COMMENT); 23 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceInterval.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface SequenceInterval extends SequenceLocation 5 | { 6 | 7 | // Property SEQUENCE-INTERVAL-BEGIN 8 | 9 | SequenceSite getSequenceIntervalBegin(); 10 | 11 | void setSequenceIntervalBegin(SequenceSite newSEQUENCE_INTERVAL_BEGIN); 12 | 13 | 14 | // Property SEQUENCE-INTERVAL-END 15 | 16 | SequenceSite getSequenceIntervalEnd(); 17 | 18 | void setSequenceIntervalEnd(SequenceSite newSEQUENCE_INTERVAL_END); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/EntityReferenceTypeVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.EntityReferenceTypeVocabulary; 4 | 5 | 6 | public class EntityReferenceTypeVocabularyImpl extends ControlledVocabularyImpl 7 | implements EntityReferenceTypeVocabulary 8 | { 9 | public EntityReferenceTypeVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return EntityReferenceTypeVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceSite.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | public interface SequenceSite extends SequenceLocation 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | // Property POSITION-STATUS 9 | 10 | PositionStatusType getPositionStatus(); 11 | 12 | void setPositionStatus(PositionStatusType positionStatusType); 13 | 14 | 15 | // Property SEQUENCE-POSITION 16 | 17 | int getSequencePosition(); 18 | 19 | void setSequencePosition(int sequencePosition); 20 | } 21 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/InteractionVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * A reference to the PSI Molecular Interaction ontology (MI) interaction type. 6 | * 7 | * Homepage at http://www.psidev.info/. 9 | * 10 | * Browse at Ontology 12 | * Lookup Service. 13 | */ 14 | public interface InteractionVocabulary extends ControlledVocabulary 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/BioPaxIOException.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | /** 4 | * This exception is thrown if a problem occurs during an input/output operation related to BioPAX Handlers. 5 | */ 6 | public class BioPaxIOException extends RuntimeException 7 | { 8 | public BioPaxIOException(Throwable cause) 9 | { 10 | super(cause); 11 | } 12 | 13 | public BioPaxIOException(String message) 14 | { 15 | super(message); 16 | } 17 | 18 | public BioPaxIOException(String message, Throwable e) { 19 | super(message, e); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/transportImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.transport; 5 | 6 | /** 7 | */ 8 | class transportImpl extends conversionImpl implements transport 9 | { 10 | // ------------------------ INTERFACE METHODS ------------------------ 11 | 12 | 13 | // --------------------- Interface BioPAXElement --------------------- 14 | 15 | public Class getModelInterface() 16 | { 17 | return transport.class; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/SequenceModificationVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.SequenceModificationVocabulary; 4 | 5 | 6 | public class SequenceModificationVocabularyImpl extends ControlledVocabularyImpl 7 | implements SequenceModificationVocabulary 8 | { 9 | public SequenceModificationVocabularyImpl() { 10 | } 11 | 12 | @Override 13 | public Class getModelInterface() { 14 | return SequenceModificationVocabulary.class; 15 | } 16 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/TransportWithBiochemicalReactionImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.TransportWithBiochemicalReaction; 4 | 5 | 6 | public class TransportWithBiochemicalReactionImpl extends BiochemicalReactionImpl 7 | implements TransportWithBiochemicalReaction 8 | { 9 | public TransportWithBiochemicalReactionImpl() {} 10 | 11 | public Class getModelInterface() 12 | { 13 | return TransportWithBiochemicalReaction.class; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/ControlType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * User: root Date: Aug 1, 2006 Time: 5:37:34 PM_DOT 5 | */ 6 | public enum ControlType 7 | { 8 | ACTIVATION, 9 | INHIBITION, 10 | ACTIVATION_UNKMECH, //LEVEL 1 workarounds 11 | INHIBITION_UNKMECH, //LEVEL 1 workarounds 12 | INHIBITION_ALLOSTERIC, 13 | INHIBITION_COMPETITIVE, 14 | INHIBITION_IRREVERSIBLE, 15 | INHIBITION_NONCOMPETITIVE, 16 | INHIBITION_OTHER, 17 | INHIBITION_UNCOMPETITIVE, 18 | ACTIVATION_NONALLOSTERIC, 19 | ACTIVATION_ALLOSTERIC; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/RnaReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.RnaReference; 4 | 5 | 6 | public class RnaReferenceImpl extends NucleicAcidReferenceImpl 7 | implements RnaReference 8 | { 9 | 10 | public RnaReferenceImpl() { 11 | } 12 | 13 | // 14 | // utilityClass interface implementation 15 | // 16 | //////////////////////////////////////////////////////////////////////////// 17 | 18 | public Class getModelInterface() 19 | { 20 | return RnaReference.class; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/SpontaneousType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | */ 5 | public enum SpontaneousType 6 | { 7 | L_R, 8 | R_L, 9 | NOT_SPONTANEOUS; 10 | 11 | // To string is also used for exporting to BioPAX - breaks the writer 12 | // This is better handled in L3- sorry Dude.. 13 | // public String toString() 14 | // { 15 | // if (this == L_R) return "Left to Right"; 16 | // else if (this == R_L) return "Right to Left"; 17 | // else if (this == NOT_SPONTANEOUS) return "NOT_SPONTANEOUS"; 18 | // else return null; 19 | // } 20 | } 21 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/XReferrable.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | */ 7 | public interface XReferrable extends Level2Element 8 | { 9 | 10 | void addXREF(xref XREF); 11 | 12 | Set getXREF(); 13 | 14 | void removeXREF(xref XREF); 15 | 16 | void setXREF(Set XREF); 17 | 18 | Set findCommonUnifications(XReferrable that); 19 | 20 | Set findCommonRelationships(XReferrable that); 21 | 22 | Set findCommonPublications(XReferrable that); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceRegionVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A reference to a controlled vocabulary of sequence regions, such as InterPro or Sequence Ontology (SO) 6 | * Homepage at http://www.sequenceontology.org. Browse at http://www 8 | * .ebi.ac.uk/ontology-lookup/browse.do?ontName=SO 9 | */ 10 | public interface SequenceRegionVocabulary extends ControlledVocabulary 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/dataSource.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * XREF Should be only unification and publication xrefs 7 | */ 8 | public interface dataSource extends externalReferenceUtilityClass, XReferrable 9 | { 10 | // -------------------------- OTHER METHODS -------------------------- 11 | 12 | void addNAME(String NAME); 13 | // --------------------- ACCESORS and MUTATORS--------------------- 14 | 15 | 16 | Set getNAME(); 17 | 18 | void removeNAME(String NAME); 19 | 20 | void setNAME(Set NAME); 21 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/physicalEntity.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface physicalEntity extends entity 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | Set isPHYSICAL_ENTITYof(); 11 | 12 | Set getAllInteractions(); 13 | Set getAllInteractions( 14 | Class ofType); 15 | 16 | void addPHYSICAL_ENTITYof(physicalEntityParticipant pep); 17 | 18 | void removePHYSICAL_ENTITYof(physicalEntityParticipant pep); 19 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/InteractionParticipant.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * marker interface for entities and PEPs 7 | */ 8 | public interface InteractionParticipant extends Level2Element 9 | { 10 | // -------------------------- OTHER METHODS -------------------------- 11 | 12 | /** 13 | * This method returns the interaction that this entity/pep takes part in. 14 | * Contents of this set should not be modified. 15 | * 16 | * @return a set of interactions that 17 | */ 18 | Set isPARTICIPANTSof(); 19 | } 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceInterval.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface sequenceInterval extends sequenceLocation 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | sequenceSite getSEQUENCE_INTERVAL_BEGIN(); 9 | 10 | // --------------------- ACCESORS and MUTATORS--------------------- 11 | 12 | sequenceSite getSEQUENCE_INTERVAL_END(); 13 | 14 | void setSEQUENCE_INTERVAL_BEGIN( 15 | sequenceSite SEQUENCE_INTERVAL_BEGIN); 16 | 17 | void setSEQUENCE_INTERVAL_END(sequenceSite SEQUENCE_INTERVAL_END); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/NucleicAcidReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | import java.util.Set; 5 | 6 | /** 7 | * Role interface for NucleicAcidReferences, namely DNA and RNA. They share the common behaviour of having "regions" 8 | * on them. 9 | * @see NucleicAcidRegionReference 10 | */ 11 | public interface NucleicAcidReference extends SequenceEntityReference 12 | { 13 | Set getSubRegion(); 14 | 15 | void addSubRegion(NucleicAcidRegionReference regionReference); 16 | 17 | void removeSubRegion(NucleicAcidRegionReference regionReference); 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ComplexAssemblyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.ComplexAssembly; 4 | 5 | 6 | public class ComplexAssemblyImpl extends ConversionImpl 7 | implements ComplexAssembly 8 | { 9 | public ComplexAssemblyImpl() { 10 | } 11 | 12 | // ------------------------ INTERFACE METHODS ------------------------ 13 | 14 | 15 | // --------------------- Interface BioPAXElement --------------------- 16 | 17 | @Override 18 | public Class getModelInterface() 19 | { 20 | return ComplexAssembly.class; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/NucleicAcidRegionReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | import java.util.Set; 3 | 4 | /** 5 | */ 6 | public interface NucleicAcidRegionReference 7 | extends NucleicAcidReference 8 | { 9 | 10 | 11 | public Set getSubRegionOf(); 12 | 13 | SequenceLocation getAbsoluteRegion(); 14 | 15 | void setAbsoluteRegion(SequenceLocation absoluteRegion); 16 | 17 | 18 | Set getRegionType(); 19 | 20 | void addRegionType(SequenceRegionVocabulary regionType); 21 | 22 | void removeRegionType(SequenceRegionVocabulary regionType); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/TemplateReaction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | public interface TemplateReaction extends Interaction { 6 | // Property Product 7 | 8 | Set getProduct(); 9 | 10 | void addProduct(PhysicalEntity product); 11 | 12 | void removeProduct(PhysicalEntity product); 13 | 14 | // Property template 15 | 16 | NucleicAcid getTemplate(); 17 | 18 | void setTemplate(NucleicAcid template); 19 | 20 | TemplateDirectionType getTemplateDirection(); 21 | 22 | void setTemplateDirection(TemplateDirectionType templateD1nmirection); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/Filter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3; 2 | 3 | import org.biopax.paxtools.model.level3.Level3Element; 4 | 5 | /** 6 | * This is the base filter class that can be applied to any level 3 element. The query will traverse 7 | * only the objects that this filter lets. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public abstract class Filter 12 | { 13 | /** 14 | * Checks if it is ok to traverse the given level 3 element. 15 | * @param ele level 3 element to check 16 | * @return true if ok to traverse 17 | */ 18 | public abstract boolean okToTraverse(Level3Element ele); 19 | } 20 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/DecoratingPropertyAccessor.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | /** 6 | */ 7 | public abstract class DecoratingPropertyAccessor extends PropertyAccessorAdapter 8 | { 9 | 10 | protected PropertyAccessor impl; 11 | 12 | protected DecoratingPropertyAccessor(PropertyAccessor impl) 13 | { 14 | super(impl.getDomain(),impl.getRange(),impl.isMultipleCardinality()); 15 | this.impl=impl; 16 | } 17 | 18 | @Override public boolean isUnknown(Object value) 19 | { 20 | return impl.isUnknown(value); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/unificationXrefImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.unificationXref; 5 | 6 | /** 7 | * User: root Date: Apr 26, 2006 Time: 3:12:15 PM_DOT 8 | */ 9 | class unificationXrefImpl extends xrefImpl implements unificationXref 10 | { 11 | // ------------------------ INTERFACE METHODS ------------------------ 12 | 13 | 14 | // --------------------- Interface BioPAXElement --------------------- 15 | 16 | public Class getModelInterface() 17 | { 18 | return unificationXref.class; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceParticipant.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | public interface sequenceParticipant extends physicalEntityParticipant 6 | { 7 | // -------------------------- OTHER METHODS -------------------------- 8 | 9 | void addSEQUENCE_FEATURE_LIST(sequenceFeature SEQUENCE_FEATURE); 10 | // --------------------- ACCESORS and MUTATORS--------------------- 11 | 12 | Set getSEQUENCE_FEATURE_LIST(); 13 | 14 | void removeSEQUENCE_FEATURE_LIST(sequenceFeature SEQUENCE_FEATURE); 15 | 16 | void setSEQUENCE_FEATURE_LIST(Set SEQUENCE_FEATURE_LIST); 17 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/RnaRegionReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.RnaRegionReference; 4 | 5 | 6 | public class RnaRegionReferenceImpl extends NucleicAcidRegionReferenceImpl implements RnaRegionReference 7 | { 8 | // 9 | // utilityClass interface implementation 10 | // 11 | //////////////////////////////////////////////////////////////////////////// 12 | 13 | public RnaRegionReferenceImpl() { 14 | } 15 | 16 | @Override 17 | public Class getModelInterface() 18 | { 19 | return RnaRegionReference.class; 20 | } 21 | 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/complexAssemblyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.complexAssembly; 5 | 6 | /** 7 | * User: root Date: Apr 13, 2006 Time: 2:22:39 PM_DOT 8 | */ 9 | class complexAssemblyImpl extends conversionImpl 10 | implements complexAssembly 11 | { 12 | // ------------------------ INTERFACE METHODS ------------------------ 13 | 14 | 15 | // --------------------- Interface BioPAXElement --------------------- 16 | 17 | public Class getModelInterface() 18 | { 19 | return complexAssembly.class; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/xref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface xref extends externalReferenceUtilityClass 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | // --------------------- ACCESORS and MUTATORS--------------------- 11 | String getDB(); 12 | 13 | String getDB_VERSION(); 14 | 15 | String getID(); 16 | 17 | String getID_VERSION(); 18 | 19 | Set isXREFof(); 20 | 21 | void setDB(String DB); 22 | 23 | void setDB_VERSION(String DB_VERSION); 24 | 25 | void setID(String ID); 26 | 27 | void setID_VERSION(String ID_VERSION); 28 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/UnificationXrefImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level3.UnificationXref; 5 | 6 | 7 | public class UnificationXrefImpl extends XrefImpl implements UnificationXref { 8 | 9 | public UnificationXrefImpl() { 10 | } 11 | 12 | public Class getModelInterface() { 13 | return UnificationXref.class; 14 | } 15 | 16 | @Override 17 | protected boolean semanticallyEquivalent(BioPAXElement other) { 18 | return (other instanceof UnificationXref) && super.semanticallyEquivalent(other); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/GeneImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.BioSource; 4 | import org.biopax.paxtools.model.level3.Gene; 5 | 6 | 7 | public class GeneImpl extends EntityImpl implements Gene 8 | { 9 | private BioSource organism; 10 | 11 | public GeneImpl() { 12 | } 13 | 14 | public Class getModelInterface() 15 | { 16 | return Gene.class; 17 | } 18 | 19 | public BioSource getOrganism() 20 | { 21 | return organism; 22 | } 23 | 24 | public void setOrganism(BioSource source) 25 | { 26 | this.organism = source; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/FeatureDecorator.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.io.sbgn; 2 | 3 | import org.biopax.paxtools.model.level3.EntityFeature; 4 | import org.sbgn.bindings.Glyph; 5 | import org.sbgn.bindings.ObjectFactory; 6 | 7 | /** 8 | * Generates a State class representing an entity feature. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public interface FeatureDecorator 13 | { 14 | /** 15 | * Creates the State for the given EntityFeature. 16 | * @param ef the feature 17 | * @param factory factory that can create State class 18 | * @return State representing the feature 19 | */ 20 | Glyph.State createStateVar(EntityFeature ef, ObjectFactory factory); 21 | } 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/Filter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | 4 | /** 5 | * Generic interface for defining filter decorators. Filters are useful for defining restrictions on 6 | * properties, selecting subsets of objects or defining the behaviour of traversers. 7 | */ 8 | public interface Filter 9 | { 10 | /** 11 | * Can e.g., analyze, modify or convert the given object (or model) to another format. 12 | * 13 | * @param object to be filtered 14 | * @return true/false, depending on whether the object satisfied a criteria defined by this Filter; 15 | * or - conversion/analysis was successful/unsuccessful. 16 | */ 17 | boolean filter(T object); 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/pathway.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface pathway extends process 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addPATHWAY_COMPONENTS(pathwayComponent PATHWAY_COMPONENT); 11 | 12 | 13 | bioSource getORGANISM(); 14 | // --------------------- ACCESORS and MUTATORS--------------------- 15 | 16 | 17 | Set getPATHWAY_COMPONENTS(); 18 | 19 | void removePATHWAY_COMPONENTS(pathwayComponent PATHWAY_COMPONENT); 20 | 21 | void setORGANISM(bioSource ORGANISM); 22 | 23 | void setPATHWAY_COMPONENTS(Set PATHWAY_COMPONENTS); 24 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Controller.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * This is a role interface for pathway elements that can control processes, namely {@link Pathway} and {@link 7 | * PhysicalEntity}. 8 | */ 9 | public interface Controller extends Entity 10 | { 11 | /** 12 | * This method returns the list of {@link Control} interactions that this entity controls. Reverse method of 13 | * {@link Control#getController()}. Contents of this set is automatically maintained and should not be modified. 14 | * @return list of {@link Control} interactions that this entity controls. 15 | */ 16 | public Set getControllerOf(); 17 | } 18 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/EvidenceCodeVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A reference to the PSI Molecular Interaction ontology 6 | * experimental method types, including "interaction detection method", "participant identification method", 7 | * "feature detection method". 8 | * Terms from the Pathway Tools Evidence Ontology may 9 | * also be used. 10 | * 11 | * @see Browse PSI-MI 12 | * 13 | */ 14 | public interface EvidenceCodeVocabulary extends ControlledVocabulary { 15 | } 16 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/MultiPathConstraint.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.pattern.MappedConst; 4 | 5 | /** 6 | * Logical OR of several PathConstraints. 7 | * 8 | * @author Ozgun Babur 9 | */ 10 | public class MultiPathConstraint extends OR 11 | { 12 | /** 13 | * Constructor with specifier string of the path constraints. 14 | * @param paths constructor strings for the path constraints 15 | */ 16 | public MultiPathConstraint(String ... paths) 17 | { 18 | con = new MappedConst[paths.length]; 19 | 20 | for (int i = 0; i < con.length; i++) 21 | { 22 | con[i] = new MappedConst(new PathConstraint(paths[i]), 0, 1); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/PhenotypeVocabularyImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.PhenotypeVocabulary; 4 | 5 | 6 | public class PhenotypeVocabularyImpl extends ControlledVocabularyImpl 7 | implements PhenotypeVocabulary 8 | { 9 | private String patoData; 10 | 11 | public PhenotypeVocabularyImpl() { 12 | } 13 | 14 | @Override 15 | public Class getModelInterface() { 16 | return PhenotypeVocabulary.class; 17 | } 18 | 19 | public String getPatoData() 20 | { 21 | return patoData; 22 | } 23 | 24 | public void setPatoData(String patoData) 25 | { 26 | this.patoData = patoData; 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/kPrime.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface kPrime extends utilityClass 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | float getIONIC_STRENGTH(); 9 | // --------------------- ACCESORS and MUTATORS--------------------- 10 | 11 | float getK_PRIME(); 12 | 13 | 14 | float getPH(); 15 | 16 | 17 | float getPMG(); 18 | 19 | 20 | float getTEMPERATURE(); 21 | 22 | 23 | void setIONIC_STRENGTH(float IONIC_STRENGTH); 24 | 25 | 26 | void setK_PRIME(float K_PRIME); 27 | 28 | 29 | void setPH(float PH); 30 | 31 | 32 | void setPMG(float PMG); 33 | 34 | 35 | void setTEMPERATURE(float TEMPERATURE); 36 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/smallMolecule.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface smallMolecule extends physicalEntity 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addSTRUCTURE(chemicalStructure STRUCTURE); 11 | 12 | String getCHEMICAL_FORMULA(); 13 | 14 | 15 | double getMOLECULAR_WEIGHT(); 16 | 17 | 18 | Set getSTRUCTURE(); 19 | 20 | void removeSTRUCTURE(chemicalStructure STRUCTURE); 21 | 22 | void setCHEMICAL_FORMULA(String CHEMICAL_FORMULA); 23 | 24 | void setMOLECULAR_WEIGHT(double MOLECULAR_WEIGHT); 25 | 26 | void setSTRUCTURE(Set STRUCTURE); 27 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SmallMoleculeReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | public interface SmallMoleculeReference extends EntityReference 4 | { 5 | // -------------------------- OTHER METHODS -------------------------- 6 | 7 | // Property CHEMICAL-FORMULA 8 | 9 | String getChemicalFormula(); 10 | 11 | void setChemicalFormula(String newCHEMICAL_FORMULA); 12 | 13 | 14 | // Property MOLECULAR-WEIGHT 15 | 16 | float getMolecularWeight(); 17 | 18 | void setMolecularWeight(float newMOLECULAR_WEIGHT); 19 | 20 | 21 | // Property STRUCTURE 22 | 23 | ChemicalStructure getStructure(); 24 | 25 | void setStructure(ChemicalStructure newSTRUCTURE); 26 | } 27 | -------------------------------------------------------------------------------- /paxtools-console/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Provenance.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: The direct source of a pathway data or score. This does not store 5 | * the trail of sources from the generation of the data to this point, only the 6 | * last known source, such as a database. The XREF property may contain a 7 | * publicationXref referencing a publication describing the data source (e.g. a 8 | * database publication). A unificationXref may be used e.g. when pointing to an 9 | * entry in a database of databases describing this database. Examples: A 10 | * database, scoring method or person name. 11 | */ 12 | public interface Provenance extends UtilityClass, XReferrable,Named 13 | { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /pattern/src/main/resources/org/biopax/paxtools/pattern/miner/blacklist-names.txt: -------------------------------------------------------------------------------- 1 | water 2 | h2o 3 | proton 4 | h+ 5 | hydron 6 | dioxygen 7 | o2 I 8 | nadph(4-) 9 | nad(p)h 10 | nadph 11 | nadp(3-) 12 | nadp(+) 13 | nad(p)(+) 14 | tpn 15 | nadp 16 | nad(p) 17 | atp(4-) I 18 | atp I 19 | adp O 20 | adp(3-) O 21 | nadh(2-) 22 | nadh 23 | nadh+h+ 24 | nad(1-) 25 | nad(+) 26 | nad 27 | carbon dioxide O 28 | co2 O 29 | diphosphoric acid O 30 | diphosphate O 31 | diphosphate group O 32 | diphosphate(4-) O 33 | pyrophosphate O 34 | hydrogenphosphate O 35 | phosphate ion O 36 | phosphate(3-) O 37 | orthophosphate O 38 | pi O 39 | phosphoric acid O 40 | amp 41 | adenosine 2'-phosphate(2-) 42 | 3'-amp 43 | amp(2-) 44 | fadh2(2-) 45 | fadh2 46 | gdp 47 | gdp(3-) 48 | gtp(4-) 49 | gtp 50 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Xref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface Xref extends UtilityClass 7 | { 8 | // Property DB 9 | 10 | String getDb(); 11 | 12 | void setDb(String db); 13 | 14 | 15 | // Property DB-VERSION 16 | 17 | String getDbVersion(); 18 | 19 | void setDbVersion(String dbVersion); 20 | 21 | 22 | // Property ID 23 | 24 | String getId(); 25 | 26 | 27 | void setId(String id); 28 | 29 | 30 | // Property ID-VERSION 31 | 32 | String getIdVersion(); 33 | 34 | void setIdVersion(String idVersion); 35 | 36 | 37 | // Inverse of property XREF 38 | 39 | public Set getXrefOf(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/LimitType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.algorithm; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | 5 | /** 6 | * Specifies whether the length limit is a normal limit or shortest_plus_k limit. PathsFromToQuery 7 | * use this as a parameter. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public enum LimitType 12 | { 13 | NORMAL, 14 | SHORTEST_PLUS_K; 15 | 16 | public static LimitType typeOf(String tag) 17 | { 18 | if(StringUtils.isBlank(tag)) 19 | return null; 20 | 21 | LimitType type = null; 22 | try { 23 | tag = tag.toUpperCase().replaceAll("-", "_"); 24 | type = valueOf(tag); 25 | } 26 | catch (IllegalArgumentException e){} 27 | 28 | return type; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/ControlsTransportMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the controls-transport pattern. 8 | * @author Ozgun Babur 9 | */ 10 | public class ControlsTransportMiner extends ControlsStateChangeOfMiner 11 | { 12 | /** 13 | * Constructor that sets name and description. 14 | */ 15 | public ControlsTransportMiner() 16 | { 17 | super(SIFEnum.CONTROLS_TRANSPORT_OF); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.controlsTransport(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/deltaGprimeO.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface deltaGprimeO extends utilityClass 5 | { 6 | // -------------------------- OTHER METHODS -------------------------- 7 | 8 | // --------------------- ACCESORS and MUTATORS--------------------- 9 | float getDELTA_G_PRIME_O(); 10 | 11 | 12 | float getIONIC_STRENGTH(); 13 | 14 | 15 | float getPH(); 16 | 17 | 18 | float getPMG(); 19 | 20 | 21 | float getTEMPERATURE(); 22 | 23 | 24 | void setDELTA_G_PRIME_O(float DELTA_G_PRIME_O); 25 | 26 | 27 | void setIONIC_STRENGTH(float IONIC_STRENGTH); 28 | 29 | 30 | void setPH(float PH); 31 | 32 | 33 | void setPMG(float PMG); 34 | 35 | 36 | void setTEMPERATURE(float TEMPERATURE); 37 | } -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/model/Edge.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.model; 2 | 3 | /** 4 | * Wrapper interface for edges in a graph to be queried. 5 | * 6 | * @author Ozgun Babur 7 | */ 8 | public interface Edge extends GraphObject 9 | { 10 | /** 11 | * @return The target node 12 | */ 13 | Node getTargetNode(); 14 | 15 | /** 16 | * @return The source node 17 | */ 18 | Node getSourceNode(); 19 | 20 | /** 21 | * Algorithms may need a sign for the edge. 1: positive, -1 negative, 0: signless. 22 | * @return The sign of the edge 23 | */ 24 | public int getSign(); 25 | 26 | /** 27 | * @return Whether this edge indicates a transcriptional relation 28 | */ 29 | public boolean isTranscription(); 30 | } 31 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/conversion.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface conversion extends physicalInteraction 7 | { 8 | Set getLEFT(); 9 | 10 | Set getRIGHT(); 11 | 12 | SpontaneousType getSPONTANEOUS(); 13 | 14 | void addLEFT(physicalEntityParticipant LEFT); 15 | 16 | void addRIGHT(physicalEntityParticipant RIGHT); 17 | 18 | void removeLEFT(physicalEntityParticipant LEFT); 19 | 20 | void removeRIGHT(physicalEntityParticipant RIGHT); 21 | 22 | void setLEFT(Set LEFT); 23 | 24 | void setRIGHT(Set RIGHT); 25 | 26 | void setSPONTANEOUS(SpontaneousType SPONTANEOUS); 27 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/IllegalBioPAXArgumentException.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | /** 4 | * This exception is thrown typically when BioPAX domain or cardinality restrictions are violated. It may also be 5 | * thrown when a class or property lookup by name fails. 6 | */ 7 | public class IllegalBioPAXArgumentException extends IllegalArgumentException 8 | { 9 | 10 | public IllegalBioPAXArgumentException() 11 | { 12 | } 13 | 14 | public IllegalBioPAXArgumentException(Throwable cause) 15 | { 16 | super(cause); 17 | } 18 | 19 | public IllegalBioPAXArgumentException(String s) 20 | { 21 | super(s); 22 | } 23 | 24 | public IllegalBioPAXArgumentException(String message, Throwable cause) 25 | { 26 | super(message, cause); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/model/GraphObject.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.model; 2 | 3 | /** 4 | * A graph object is the common interface for nodes and edges in a graph. 5 | * 6 | * @author Ozgun Babur 7 | */ 8 | public interface GraphObject 9 | { 10 | /** 11 | * Every graph object should have an owner graph. 12 | * 13 | * @return The owner graph 14 | */ 15 | Graph getGraph(); 16 | 17 | /** 18 | * This method is used for storing the object in a Map. The key should be uniquely generated for 19 | * each edge in a graph. 20 | * 21 | * @return The key 22 | */ 23 | String getKey(); 24 | 25 | /** 26 | * This method should clear any analysis specific labels on the object. 27 | */ 28 | void clear(); 29 | } 30 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/Degradation.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: A conversion in which a pool of macromolecules are degraded into their elementary 5 | * units. 6 | * 7 | * Usage: This conversion always has a direction of left-to-right and is irreversible. Degraded 8 | * molecules are always represented on the left, degradation products on the right. 9 | * 10 | * Comments: Degradation is a complex abstraction over multiple reactions. Although it obeys law of 11 | * mass conservation and stoichiometric, the products are rarely specified since they are 12 | * ubiquitous. 13 | * 14 | * Example: Degradation of a protein to amino acids. 15 | */ 16 | public interface Degradation extends Conversion 17 | { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /paxtools-console/src/main/java/org/biopax/paxtools/examples/PublicationStatisticsAnalyzer.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.examples; 2 | 3 | import org.biopax.paxtools.model.Model; 4 | import org.biopax.paxtools.model.level3.PublicationXref; 5 | 6 | import java.io.FileNotFoundException; 7 | 8 | /** 9 | * A simple method that prints the publication statistics. 10 | * 11 | */ 12 | public class PublicationStatisticsAnalyzer 13 | { 14 | public static void main(String[] args) throws FileNotFoundException 15 | { 16 | if(args.length != 2) { 17 | System.out.println("\nUse Parameters: " + 18 | "biopaxFile pathwayFullRdfId\n"); 19 | System.exit(-1); 20 | } 21 | 22 | Model model = Macros.open(args[0]); 23 | int size = model.getObjects(PublicationXref.class).size(); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /paxtools-query/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /pattern/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /paxtools-core/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /gsea-converter/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /normalizer/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/Direction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * Catalysis direction controlled vocabulary 5 | */ 6 | public enum Direction 7 | { 8 | REVERSIBLE, 9 | PHYSIOL_LEFT_TO_RIGHT, 10 | PHYSIOL_RIGHT_TO_LEFT, 11 | IRREVERSIBLE_LEFT_TO_RIGHT, 12 | IRREVERSIBLE_RIGHT_TO_LEFT; 13 | 14 | public String toString() 15 | { 16 | if (this == REVERSIBLE) return "REVERSIBLE"; 17 | else if (this == PHYSIOL_LEFT_TO_RIGHT) return "PHYSIOL_LEFT_TO_RIGHT"; 18 | else if (this == PHYSIOL_RIGHT_TO_LEFT) return "PHYSIOL_RIGHT_TO_LEFT"; 19 | else if (this == IRREVERSIBLE_LEFT_TO_RIGHT) return "IRREVERSIBLE_LEFT_TO_RIGHT"; 20 | else if (this == IRREVERSIBLE_RIGHT_TO_LEFT) return "IRREVERSIBLE_RIGHT_TO_LEFT"; 21 | else return null; 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /psimi-converter/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /sbgn-converter/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /json-converter/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %d %-5level [%thread] %logger{25} - %msg%n 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/SIFType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Ozgun Babur 7 | */ 8 | public interface SIFType 9 | { 10 | /** 11 | * Tag of a SIF type is derived from the enum name. 12 | * @return tag 13 | */ 14 | public String getTag(); 15 | 16 | /** 17 | * Asks if the edge is directed. 18 | * @return true if directed 19 | */ 20 | public boolean isDirected(); 21 | 22 | /** 23 | * Gets the description of the SIF type. 24 | * @return description 25 | */ 26 | public String getDescription(); 27 | 28 | /** 29 | * Gets the list of SIFMiner classes that can search this type of SIF edge in a BioPAX model. 30 | * @return SIF miners 31 | */ 32 | public List> getMiners(); 33 | } 34 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/DataSourceFilter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3; 2 | 3 | import org.biopax.paxtools.controller.PathAccessor; 4 | import org.biopax.paxtools.model.level3.Entity; 5 | 6 | /** 7 | * Filter by data source. Applied to Entity. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public class DataSourceFilter extends StringFieldFilter 12 | { 13 | /** 14 | * Constructor. 15 | * @param sources organisms to select 16 | */ 17 | public DataSourceFilter(String[] sources) 18 | { 19 | super(true, sources); 20 | } 21 | 22 | /** 23 | * Creates the accessor from Entity to its data source name. 24 | */ 25 | @Override 26 | public void createFieldAccessors() 27 | { 28 | addAccessor(new PathAccessor("Entity/dataSource/name"), Entity.class); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/NonUbique.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.model.level3.PhysicalEntity; 4 | import org.biopax.paxtools.pattern.Match; 5 | import org.biopax.paxtools.pattern.util.Blacklist; 6 | 7 | /** 8 | * This is a non-generative constraint that checks if the small molecule is ubiquitous in any 9 | * context. 10 | * 11 | * Var0 - PhysicalEntity 12 | * 13 | * @author Ozgun Babur 14 | */ 15 | public class NonUbique extends ConstraintAdapter 16 | { 17 | public NonUbique(Blacklist blacklist) 18 | { 19 | super(1, blacklist); 20 | } 21 | 22 | @Override 23 | public boolean satisfies(Match match, int... ind) 24 | { 25 | PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]); 26 | return !blacklist.isUbique(pe); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /paxtools-console/src/main/java/org/biopax/paxtools/examples/Macros.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.examples; 2 | 3 | import org.biopax.paxtools.io.BioPAXIOHandler; 4 | import org.biopax.paxtools.io.SimpleIOHandler; 5 | import org.biopax.paxtools.model.Model; 6 | 7 | import java.io.FileInputStream; 8 | import java.io.FileNotFoundException; 9 | 10 | /** 11 | * Created with IntelliJ IDEA. 12 | * User: emek 13 | * Date: 10/8/13 14 | * Time: 3:00 PM 15 | * To change this template use File | Settings | File Templates. 16 | */ 17 | public class Macros 18 | 19 | { 20 | public static Model open(String filename) throws FileNotFoundException 21 | { 22 | 23 | BioPAXIOHandler handler = new SimpleIOHandler(); 24 | FileInputStream fileInputStream = new FileInputStream(filename); 25 | return handler.convertFromOWL(fileInputStream); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /paxtools-trove/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | %d %-5level [%thread] %logger{25} - %msg%n 15 | true 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/ListUbiqueDetector.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.io.sbgn; 2 | 3 | import org.biopax.paxtools.model.level3.Entity; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Detects ubiquitous molecules using a given ID set. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class ListUbiqueDetector implements UbiqueDetector 13 | { 14 | Set uris; 15 | 16 | /** 17 | * Contructor. 18 | * 19 | * @param uris URIs of ubiques 20 | */ 21 | public ListUbiqueDetector(Set uris) 22 | { 23 | this.uris = uris; 24 | } 25 | 26 | /** 27 | * Checks if the ID of the PhysicalEntity is in the set. 28 | * @param e PhysicalEntity or Gene to check 29 | * @return true if ubique 30 | */ 31 | public boolean isUbique(Entity e) 32 | { 33 | return uris.contains(e.getUri()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/DnaReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * A DNA reference is a grouping of several DNA entities that are common in 5 | * sequence and genomic position. Members can differ in celular location, 6 | * sequence features, SNPs, mutations and bound partners. For more detailed 7 | * information on semantics see {@link EntityReference}. 8 | * 9 | * Comments : Note that this is not a reference gene. A gene can possibly span 10 | * multiple DNA molecules, sometimes even across chromosomes due to regulatory 11 | * regions. Similarly a gene is not necessarily made up of deoxyribonucleic acid 12 | * and can be present in multiple copies ( which are different DNA molecules). 13 | */ 14 | 15 | public interface DnaReference extends NucleicAcidReference 16 | { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/experimentalForm.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface experimentalForm extends utilityClass 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addEXPERIMENTAL_FORM_TYPE( 11 | openControlledVocabulary EXPERIMENTAL_FORM_TYPE); 12 | 13 | Set getEXPERIMENTAL_FORM_TYPE(); 14 | // --------------------- ACCESORS and MUTATORS--------------------- 15 | 16 | physicalEntityParticipant getPARTICIPANT(); 17 | 18 | void removeEXPERIMENTAL_FORM_TYPE( 19 | openControlledVocabulary EXPERIMENTAL_FORM_TYPE); 20 | 21 | void setEXPERIMENTAL_FORM_TYPE( 22 | Set EXPERIMENTAL_FORM_TYPE); 23 | 24 | void setPARTICIPANT(physicalEntityParticipant PARTICIPANT); 25 | } -------------------------------------------------------------------------------- /paxtools-trove/src/main/java/org/biopax/paxtools/trove/TProvider.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.trove; 2 | 3 | 4 | import gnu.trove.map.hash.THashMap; 5 | import gnu.trove.set.hash.THashSet; 6 | import org.biopax.paxtools.util.BPCollections; 7 | 8 | import java.util.Map; 9 | import java.util.Set; 10 | 11 | /** 12 | * A Trove4j based java collections (Set, Map) provider for the paxtools-core BioPAX model. 13 | * 14 | * Enabled by adding the JVM option: 15 | * -Dpaxtools.CollectionProvider=org.biopax.paxtools.trove.TProvider 16 | * when running Paxtools or another paxtools-based JAR. 17 | */ 18 | public class TProvider implements BPCollections.CollectionProvider 19 | { 20 | 21 | public Set createSet() 22 | { 23 | return new THashSet(); 24 | } 25 | 26 | public Map createMap() 27 | { 28 | return new THashMap(4); 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/ControlsPhosphorylationMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the controls-phosphorylation pattern. 8 | * @author Ozgun Babur 9 | */ 10 | public class ControlsPhosphorylationMiner extends ControlsStateChangeOfMiner 11 | { 12 | /** 13 | * Constructor that sets the type. 14 | */ 15 | public ControlsPhosphorylationMiner() 16 | { 17 | super("phosphorylation", 18 | SIFEnum.CONTROLS_PHOSPHORYLATION_OF.getDescription()); 19 | setType(SIFEnum.CONTROLS_PHOSPHORYLATION_OF); 20 | } 21 | 22 | /** 23 | * Constructs the pattern. 24 | * @return pattern 25 | */ 26 | @Override 27 | public Pattern constructPattern() 28 | { 29 | return PatternBox.controlsPhosphorylation(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/AccessibleSet.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | import java.util.HashSet; 4 | 5 | 6 | /** 7 | * This is a decorator set for capturing a set member that is equal to the given parameter. This is a workaround to 8 | * avoid O(n) checks. 9 | */ 10 | public class AccessibleSet extends HashSet 11 | { 12 | public E access(final E element) 13 | { 14 | E value = null; 15 | if (element != null) 16 | { 17 | final Object[] trap = new Object[]{null}; 18 | if(this.contains(new Object() 19 | { 20 | public int hashCode() 21 | { 22 | return element.hashCode(); 23 | } 24 | 25 | public boolean equals(Object other) 26 | { 27 | return other != null && element.equals(trap[0] = other); 28 | } 29 | })) 30 | { 31 | value= (E) trap[0]; 32 | } 33 | } 34 | return value; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /normalizer/src/main/resources/org/biopax/paxtools/normalizer/readme.md: -------------------------------------------------------------------------------- 1 | # XRegistry resources 2 | 3 | ## registry.json 4 | The Consensus Registry JSON file downloaded from https://bioregistry.io/download, 5 | https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/registry/registry.json 6 | Contains the metadata about the collections of bio identifiers, such as the prefix, regexp, name, synonyms, etc. 7 | 8 | ## spellmap.json 9 | An additional mapping from identifier db/type name spelling variants 10 | (non-alphanumeric chars are removed) to the corresponding Prefix. 11 | All the keys and values should be upper case. In addition to the predefined map entries, 12 | each prefix, name, synonym (removing non-alphanumeric chars) in the registry 13 | will be also auto-added to this map at run time. 14 | 15 | ## synonymap.json 16 | An additional mapping from names/synonyms to the Bioregistry Prefixes. 17 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/FragmentFeatureImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level3.FragmentFeature; 5 | 6 | 7 | public class FragmentFeatureImpl extends EntityFeatureImpl implements FragmentFeature 8 | { 9 | public FragmentFeatureImpl() {} 10 | 11 | @Override 12 | public Class getModelInterface() 13 | { 14 | return FragmentFeature.class; 15 | } 16 | 17 | @Override 18 | protected boolean semanticallyEquivalent(BioPAXElement element) 19 | { 20 | if(!(element instanceof FragmentFeature)) 21 | return false; 22 | else 23 | return super.atEquivalentLocation(((FragmentFeature) element)); 24 | } 25 | 26 | @Override 27 | public String toString() 28 | { 29 | return "Fragment:"+this.getFeatureLocation(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ModulationImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Catalysis; 4 | import org.biopax.paxtools.model.level3.Modulation; 5 | import org.biopax.paxtools.model.level3.Process; 6 | 7 | 8 | public class ModulationImpl extends ControlImpl implements Modulation 9 | { 10 | 11 | public ModulationImpl() { 12 | } 13 | 14 | // ------------------------ INTERFACE METHODS ------------------------ 15 | 16 | 17 | // --------------------- Interface BioPAXElement --------------------- 18 | 19 | @Override 20 | public Class getModelInterface() 21 | { 22 | return Modulation.class; 23 | } 24 | 25 | // -------------------------- OTHER METHODS -------------------------- 26 | 27 | protected boolean checkControlled(Process controlled) 28 | { 29 | return controlled instanceof Catalysis; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/control.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | public interface control extends physicalInteraction 6 | { 7 | // -------------------------- OTHER METHODS -------------------------- 8 | 9 | void addCONTROLLED(process CONTROLLED); 10 | 11 | void addCONTROLLER(physicalEntityParticipant CONTROLLER); 12 | 13 | Set getCONTROLLED(); 14 | 15 | Set getCONTROLLER(); 16 | // --------------------- ACCESORS and MUTATORS--------------------- 17 | 18 | ControlType getCONTROL_TYPE(); 19 | 20 | void removeCONTROLLED(process CONTROLLED); 21 | 22 | void removeCONTROLLER(physicalEntityParticipant CONTROLLER); 23 | 24 | void setCONTROLLED(Set CONTROLLED); 25 | 26 | void setCONTROLLER(Set CONTROLLER); 27 | 28 | void setCONTROL_TYPE(ControlType CONTROL_TYPE); 29 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/pathwayStep.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * This represents a set of pathway events. 7 | */ 8 | public interface pathwayStep extends utilityClass, pathwayComponent 9 | { 10 | // -------------------------- OTHER METHODS -------------------------- 11 | 12 | void addNEXT_STEP(pathwayStep NEXT_STEP); 13 | 14 | void addSTEP_INTERACTIONS(process processStep); 15 | 16 | 17 | Set getNEXT_STEP(); 18 | // --------------------- ACCESORS and MUTATORS--------------------- 19 | 20 | Set getSTEP_INTERACTIONS(); 21 | 22 | Set isNEXT_STEPof(); 23 | 24 | void removeNEXT_STEP(pathwayStep NEXT_STEP); 25 | 26 | void removeSTEP_INTERACTIONS(process processStep); 27 | 28 | void setNEXT_STEP(Set NEXT_STEP); 29 | 30 | void setSTEP_INTERACTIONS(Set STEP_INTERACTIONS); 31 | } -------------------------------------------------------------------------------- /json-converter/src/main/java/org/biopax/paxtools/io/jsonld/JsonldConverter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.io.jsonld; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | 7 | public interface JsonldConverter { 8 | 9 | /** 10 | * Convert inputstream in owl/rdf format to outputsream in jsonld format. 11 | * 12 | * @param in input stream (BioPAX RDF/XML data) 13 | * @param os output stream (to write the JSON-LD result) 14 | * @throws IOException when an I/O error occurs 15 | */ 16 | public void convertToJsonld(InputStream in, OutputStream os) throws IOException; 17 | 18 | /** 19 | * Convert inputstream in jsonld format to outputsream in owl/rdf format. 20 | * 21 | * @param in input stream (JSON-LD data) 22 | * @param out output stream (to write the BioPAX RDF/XML result) 23 | */ 24 | public void convertFromJsonld(InputStream in, OutputStream out); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/SequenceLocationImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.SequenceLocation; 4 | import org.biopax.paxtools.model.level3.SequenceRegionVocabulary; 5 | import org.biopax.paxtools.util.BPCollections; 6 | 7 | import java.util.Set; 8 | 9 | 10 | public class SequenceLocationImpl extends L3ElementImpl 11 | implements SequenceLocation 12 | { 13 | private Set regionType; 14 | 15 | /** 16 | * Constructor. 17 | */ 18 | public SequenceLocationImpl() 19 | { 20 | this.regionType = BPCollections.I.createSafeSet(); 21 | } 22 | 23 | // 24 | // BioPAXElement interface implementation 25 | // 26 | //////////////////////////////////////////////////////////////////////////// 27 | public Class getModelInterface() 28 | { 29 | return SequenceLocation.class; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/biopax/paxtools/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Paxtools is Java library that contains algorithms, software components and converters for biological pathways 3 | * represented in the standard BioPAX language. Paxtools allows scientists to focus on their scientific problem by 4 | * removing technical barriers to access and analyse pathway information. 5 | 6 | * Paxtools can run on any platform that has a Java Runtime Environment and was tested on most modern operating 7 | * systems.Paxtools is open source and is available under the Lesser GNU public license (LGPL). The sources 8 | * and release bundles can be obtained from http://github.com/BioPAX/Paxtools, http://www.biopax.org/downloads/. 9 | * 10 | * This is the root package for all Paxtools modules. It also contains PaxtoolsMain which exposes the 11 | * most frequently used Paxtools functionality as a console application. 12 | */ 13 | package org.biopax.paxtools; 14 | 15 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/PublicationXref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface PublicationXref extends Xref 7 | { 8 | // Property AUTHORS 9 | 10 | Set getAuthor(); 11 | 12 | void addAuthor(String author); 13 | 14 | void removeAuthor(String author); 15 | 16 | 17 | 18 | 19 | // Property SOURCE 20 | 21 | Set getSource(); 22 | 23 | void addSource(String source); 24 | 25 | void removeSource(String source); 26 | 27 | 28 | 29 | // Property TITLE 30 | 31 | String getTitle(); 32 | 33 | void setTitle(String title); 34 | 35 | 36 | // Property URL 37 | 38 | Set getUrl(); 39 | 40 | void addUrl(String url); 41 | 42 | void removeUrl(String url); 43 | 44 | 45 | 46 | 47 | // Property YEAR 48 | 49 | int getYear(); 50 | 51 | void setYear(int year); 52 | } 53 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/PathwayStep.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | import org.biopax.paxtools.util.AutoComplete; 5 | 6 | import java.util.Set; 7 | 8 | /** 9 | * This represents a set of pathway events. 10 | */ 11 | public interface PathwayStep extends UtilityClass,Observable 12 | { 13 | 14 | // Property NEXT-STEP 15 | 16 | @AutoComplete(forward = false) 17 | Set getNextStep(); 18 | 19 | void addNextStep(PathwayStep newNEXT_STEP); 20 | 21 | void removeNextStep(PathwayStep oldNEXT_STEP); 22 | 23 | 24 | // Inverse of Property NEXT-STEP 25 | 26 | Set getNextStepOf(); 27 | 28 | // Property STEP-INTERACTION 29 | 30 | Set getStepProcess(); 31 | 32 | void addStepProcess(Process newSTEP_INTERACTIONS); 33 | 34 | void removeStepProcess(Process oldSTEP_INTERACTIONS); 35 | 36 | 37 | Pathway getPathwayOrderOf(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/physicalEntityParticipant.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | public interface physicalEntityParticipant 5 | extends utilityClass, InteractionParticipant 6 | 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | // --------------------- ACCESORS and MUTATORS--------------------- 11 | 12 | physicalEntity getPHYSICAL_ENTITY(); 13 | void setPHYSICAL_ENTITY(physicalEntity PHYSICAL_ENTITY); 14 | 15 | double getSTOICHIOMETRIC_COEFFICIENT(); 16 | void setSTOICHIOMETRIC_COEFFICIENT( 17 | double STOICHIOMETRIC_COEFFICIENT); 18 | 19 | complex isCOMPONENTof(); 20 | void setCOMPONENTSof(complex aComplex); 21 | 22 | openControlledVocabulary getCELLULAR_LOCATION(); 23 | 24 | void setCELLULAR_LOCATION( 25 | openControlledVocabulary CELLULAR_LOCATION); 26 | 27 | 28 | boolean isInEquivalentState(physicalEntityParticipant that); 29 | int stateCode(); 30 | } 31 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven 3 | name: Java CI with Maven 4 | 5 | on: 6 | push: 7 | branches: 8 | - master 9 | - paxtools-5-2-1 10 | pull_request: 11 | branches: 12 | - master 13 | workflow_call: 14 | 15 | jobs: 16 | build-with-maven: 17 | runs-on: ubuntu-latest 18 | env: 19 | JDK_JAVA_OPTIONS: "--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED" 20 | steps: 21 | - uses: actions/checkout@v3 22 | - uses: actions/setup-java@v3 23 | with: 24 | java-version: 21 25 | distribution: 'temurin' 26 | cache: maven 27 | - name: Build with Maven and JDK-21 28 | run: mvn --batch-mode --update-snapshots verify 29 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/AddCommand.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.command; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.Model; 5 | 6 | import java.util.Set; 7 | 8 | /** 9 | */ 10 | public class AddCommand extends AbstractAddRemoveCommand 11 | { 12 | 13 | public AddCommand(Model model, Set bpes) 14 | { 15 | super(model, bpes); 16 | } 17 | 18 | @Override 19 | protected void undoAction(BioPAXElement bpe) 20 | { 21 | model.remove(bpe); 22 | } 23 | 24 | @Override 25 | protected void redoAction(BioPAXElement bpe) 26 | { 27 | model.add(bpe); 28 | 29 | } 30 | 31 | 32 | public String getPresentationName() 33 | { 34 | return "Add objects to model"; 35 | } 36 | 37 | public String getUndoPresentationName() 38 | { 39 | return "Remove objects from model"; 40 | } 41 | 42 | public String getRedoPresentationName() 43 | { 44 | return "Readd objects to the model"; 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /json-converter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | paxtools 5 | org.biopax.paxtools 6 | 6.0.1-SNAPSHOT 7 | 8 | json-converter 9 | BioPAX JSON-LD 10 | Converts BioPAX model/file to or from JSON-LD format 11 | 12 | https://biopax.github.io/Paxtools 13 | 14 | 15 | 16 | org.apache.jena 17 | apache-jena-libs 18 | 3.17.0 19 | pom 20 | 21 | 22 | org.biopax.paxtools 23 | paxtools-core 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/RemoveCommand.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.command; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.Model; 5 | 6 | import java.util.Set; 7 | 8 | /** 9 | */ 10 | public class RemoveCommand extends AbstractAddRemoveCommand 11 | { 12 | 13 | public RemoveCommand(Model model, Set bpes) 14 | { 15 | super(model, bpes); 16 | } 17 | 18 | @Override 19 | protected void undoAction(BioPAXElement bpe) 20 | { 21 | model.add(bpe); 22 | } 23 | 24 | @Override 25 | protected void redoAction(BioPAXElement bpe) 26 | { 27 | model.remove(bpe); 28 | } 29 | 30 | 31 | public String getPresentationName() 32 | { 33 | return "Remove objects from model"; 34 | } 35 | 36 | public String getUndoPresentationName() 37 | { 38 | return "Add objects to model"; 39 | } 40 | 41 | public String getRedoPresentationName() 42 | { 43 | return "Re-remove objects from model"; 44 | } 45 | 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/UbiqueFilter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3; 2 | 3 | import org.biopax.paxtools.model.level3.Level3Element; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Filters out ubiquitous entities, whose IDs are supplied by user. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class UbiqueFilter extends Filter 13 | { 14 | /** 15 | * IDs of ubiquitous entities. 16 | */ 17 | private Set ubiqueIDs; 18 | 19 | /** 20 | * Constructor. 21 | * @param ubiqueIDs IDS of ubiquitous entities 22 | */ 23 | public UbiqueFilter(Set ubiqueIDs) 24 | { 25 | this.ubiqueIDs = ubiqueIDs; 26 | } 27 | 28 | /** 29 | * Checks if the ID of the given element is in the black list. 30 | * @param ele level 3 element to check 31 | * @return true if the element is not black-listed 32 | */ 33 | @Override 34 | public boolean okToTraverse(Level3Element ele) 35 | { 36 | return !ubiqueIDs.contains(ele.getUri()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/publicationXref.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface publicationXref extends xref 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addAUTHORS(String AUTHORS); 11 | 12 | void addSOURCE(String SOURCE); 13 | 14 | void addURL(String URL); 15 | 16 | 17 | Set getAUTHORS(); 18 | 19 | // --------------------- ACCESORS and MUTATORS--------------------- 20 | 21 | Set getSOURCE(); 22 | 23 | 24 | String getTITLE(); 25 | 26 | 27 | Set getURL(); 28 | 29 | 30 | int getYEAR(); 31 | 32 | void removeAUTHORS(String AUTHORS); 33 | 34 | void removeSOURCE(String SOURCE); 35 | 36 | void removeURL(String URL); 37 | 38 | void setAUTHORS(Set AUTHORS); 39 | 40 | void setSOURCE(Set SOURCE); 41 | 42 | void setTITLE(String TITLE); 43 | 44 | void setURL(Set URL); 45 | 46 | void setYEAR(int YEAR); 47 | } -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/ControlsProductionOfMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the controls-production-of pattern. 8 | * @author Ozgun Babur 9 | */ 10 | public class ControlsProductionOfMiner extends ConsumptionControlledByMiner 11 | { 12 | /** 13 | * Constructor that sets name, description and type. 14 | */ 15 | public ControlsProductionOfMiner() 16 | { 17 | super(SIFEnum.CONTROLS_PRODUCTION_OF); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.controlsMetabolicCatalysis(blacklist, false); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "controller ER"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "part SMR"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/CustomFormat.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | /** 4 | * Used for customizing the columns in the SIF text output. 5 | * @author Ozgun Babur 6 | */ 7 | public class CustomFormat implements SIFToText 8 | { 9 | /** 10 | * Value generators for custom columns. 11 | */ 12 | private OutputColumn[] columns; 13 | 14 | public CustomFormat(String... cols) 15 | { 16 | columns = new OutputColumn[cols.length]; 17 | 18 | for (int i = 0; i < cols.length; i++) 19 | { 20 | columns[i] = new OutputColumn(cols[i]); 21 | } 22 | } 23 | 24 | /** 25 | * Prepares the line in the output file for the given interaction. 26 | * @param inter the interaction 27 | * @return output line. 28 | */ 29 | @Override 30 | public String convert(SIFInteraction inter) 31 | { 32 | String s = inter.toString(); 33 | 34 | for (OutputColumn column : columns) 35 | { 36 | s += "\t" + column.getColumnValue(inter); 37 | } 38 | 39 | return s; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/StringPropertyEditor.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | /** 8 | * Provides an String class compatible editor by extending the {@link 9 | * PropertyEditor}. 10 | * 11 | * @see PropertyEditor 12 | */ 13 | public class StringPropertyEditor extends AbstractPropertyEditor 14 | implements DataPropertyEditor 15 | { 16 | // --------------------------- CONSTRUCTORS --------------------------- 17 | 18 | public StringPropertyEditor(String property, Method getMethod, 19 | Class domain, 20 | boolean multipleCardinality) 21 | { 22 | super(property, 23 | getMethod, 24 | domain, 25 | String.class, 26 | multipleCardinality); 27 | } 28 | 29 | @Override 30 | protected String parseValueFromString(String value) 31 | { 32 | return value; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/RnaImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.RnaReference; 4 | import org.biopax.paxtools.model.level3.EntityReference; 5 | import org.biopax.paxtools.model.level3.Rna; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class RnaImpl extends NucleicAcidImpl implements Rna 10 | { 11 | 12 | public RnaImpl() { 13 | } 14 | 15 | @Override 16 | public void setEntityReference(EntityReference entityReference) { 17 | if(entityReference instanceof RnaReference || entityReference == null) 18 | super.setEntityReference(entityReference); 19 | else 20 | throw new IllegalBioPAXArgumentException("setEntityReference failed: " 21 | + entityReference.getUri() + " is not a RnaReference."); 22 | } 23 | 24 | // --------------------- Interface BioPAXElement --------------------- 25 | 26 | public Class getModelInterface() 27 | { 28 | return Rna.class; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ScoreImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Provenance; 4 | import org.biopax.paxtools.model.level3.Score; 5 | 6 | 7 | public class ScoreImpl extends XReferrableImpl implements Score { 8 | 9 | private String value; 10 | private Provenance scoreSource; 11 | 12 | public ScoreImpl() { 13 | } 14 | 15 | // 16 | // BioPAXElement interface implementation 17 | // 18 | 19 | public Class getModelInterface() { 20 | return Score.class; 21 | } 22 | 23 | 24 | // 25 | // confidence interface implementation 26 | // 27 | 28 | public String getValue() { 29 | return value; 30 | } 31 | 32 | public void setValue(String value) { 33 | this.value = value; 34 | } 35 | 36 | public Provenance getScoreSource() { 37 | return scoreSource; 38 | } 39 | 40 | public void setScoreSource(Provenance scoreSource) { 41 | this.scoreSource = scoreSource; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/bioSource.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * The biological source of an entity (e.g. protein, RNA or DNA). Some entities 5 | * are considered source-neutral (e.g. small molecules), and the biological 6 | * source of others can be deduced from their constituentss (e.g. complex, 7 | * pathway). 8 | * 9 | * Examples: HeLa cells, human, and mouse liver tissue. 10 | */ 11 | public interface bioSource extends externalReferenceUtilityClass 12 | { 13 | 14 | // --------------------- ACCESORS and MUTATORS--------------------- 15 | 16 | openControlledVocabulary getCELLTYPE(); 17 | 18 | void setCELLTYPE(openControlledVocabulary CELLTYPE); 19 | 20 | 21 | String getNAME(); 22 | 23 | void setNAME(String NAME); 24 | 25 | 26 | unificationXref getTAXON_XREF(); 27 | 28 | void setTAXON_XREF(unificationXref TAXON_XREF); 29 | 30 | 31 | openControlledVocabulary getTISSUE(); 32 | 33 | void setTISSUE(openControlledVocabulary TISSUE); 34 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/SequenceEntityImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.level2.bioSource; 4 | 5 | abstract class SequenceEntityImpl extends physicalEntityImpl 6 | { 7 | // ------------------------------ FIELDS ------------------------------ 8 | 9 | private String SEQUENCE; 10 | private bioSource ORGANISM; 11 | 12 | // -------------------------- OTHER METHODS -------------------------- 13 | 14 | public bioSource getORGANISM() 15 | { 16 | return ORGANISM; 17 | } 18 | 19 | // --------------------- ACCESORS and MUTATORS--------------------- 20 | 21 | public String getSEQUENCE() 22 | { 23 | return SEQUENCE; 24 | } 25 | 26 | /** 27 | * ORGANISM of origin for this sequence entity 28 | * 29 | * @param ORGANISM- set null for cannonical 30 | */ 31 | public void setORGANISM(bioSource ORGANISM) 32 | { 33 | this.ORGANISM = ORGANISM; 34 | } 35 | 36 | public void setSEQUENCE(String SEQUENCE) 37 | { 38 | this.SEQUENCE = SEQUENCE; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /paxtools-console/src/test/java/org/biopax/paxtools/CommandsTest.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools; 2 | 3 | import org.biopax.paxtools.io.SimpleIOHandler; 4 | import org.biopax.paxtools.model.Model; 5 | import org.junit.jupiter.api.Disabled; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import java.io.FileInputStream; 9 | import java.io.IOException; 10 | import java.util.zip.GZIPInputStream; 11 | 12 | import static org.junit.jupiter.api.Assertions.*; 13 | 14 | @Disabled 15 | public class CommandsTest { 16 | 17 | static Model m; 18 | 19 | static { 20 | try { 21 | m = new SimpleIOHandler().convertFromOWL(new GZIPInputStream( 22 | new FileInputStream("~/pc14test.owl.gz")) 23 | ); 24 | } catch (IOException e) { 25 | fail("Cannot import test data file: {}", e); 26 | } 27 | } 28 | 29 | @Test 30 | public void mapUriToIds() throws IOException { 31 | Commands.mapUriToIds(m, System.out); 32 | } 33 | 34 | @Test 35 | void summarize() throws IOException { 36 | Commands.summarize(m, System.out); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /gsea-converter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.biopax.paxtools 4 | paxtools 5 | 6.0.1-SNAPSHOT 6 | 7 | 4.0.0 8 | 9 | gsea-converter 10 | BioPAX to GSEA/GMT 11 | Converts BioPAX model/data to the GESA/GMT (.gmt) format 12 | 13 | https://biopax.github.io/Paxtools 14 | 15 | 16 | 17 | org.biopax.paxtools 18 | paxtools-core 19 | 20 | 21 | org.biopax.paxtools 22 | normalizer 23 | ${project.version} 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /pattern/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.biopax.paxtools 7 | paxtools 8 | 6.0.1-SNAPSHOT 9 | 10 | 11 | pattern 12 | BioPAX Pattern 13 | 14 | BioPAX Pattern Search library. Also, converts BioPAX model to SIF (simple binary interactions) text format. 15 | 16 | 17 | https://biopax.github.io/Paxtools 18 | 19 | 20 | 21 | ${project.groupId} 22 | paxtools-core 23 | 24 | 25 | ${project.groupId} 26 | normalizer 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Equality.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.pattern.Match; 4 | 5 | /** 6 | * Checks identity of two elements. 7 | * Size = 2. 8 | * Checks if e1 == e2. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class Equality extends ConstraintAdapter 13 | { 14 | /** 15 | * Desired output. 16 | */ 17 | private boolean equals; 18 | 19 | /** 20 | * Constructor with the desired output. 21 | * @param equals the desired output 22 | */ 23 | public Equality(boolean equals) 24 | { 25 | super(2); 26 | this.equals = equals; 27 | } 28 | 29 | /** 30 | * Checks if the two elements are identical or not identical as desired. 31 | * @param match current pattern match 32 | * @param ind mapped indices 33 | * @return true if identity checks equals the desired value 34 | */ 35 | @Override 36 | public boolean satisfies(Match match, int... ind) 37 | { 38 | assert ind.length == 2; 39 | 40 | return (match.get(ind[0]) == match.get(ind[1])) == equals; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/ProteinReference.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Description: A protein reference is a grouping of several protein entities that are encoded by the same 5 | * genetic sequence. Members can differ in any combination of cellular location, sequence features and bound partners. 6 | * 7 | * Rationale: Protein molecules, encoded by the same genetic sequence can be present in (combinatorially many) 8 | * different states, as a result of post translational modifications and non-covalent bonds. Each state, chemically, is 9 | * a different pool of molecules. They are, however, related to each other because: 10 | * 11 | *
  • They all share the same "base" genetic sequence.
  • They can only be converted to each other but 12 | * not to any other protein
13 | * 14 | * Comments:Most Protein databases, including UniProt would map one to one with ProteinReferences in BioPAX. 15 | */ 16 | public interface ProteinReference extends SequenceEntityReference { 17 | } 18 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/MolecularInteractionImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Entity; 4 | import org.biopax.paxtools.model.level3.MolecularInteraction; 5 | import org.biopax.paxtools.model.level3.PhysicalEntity; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class MolecularInteractionImpl extends InteractionImpl 10 | implements MolecularInteraction 11 | { 12 | public MolecularInteractionImpl() { 13 | } 14 | 15 | public Class getModelInterface() 16 | { 17 | return MolecularInteraction.class; 18 | } 19 | 20 | public void addParticipant(Entity participant) 21 | { 22 | if (participant != null) { 23 | if (participant instanceof PhysicalEntity) { 24 | super.addParticipant(participant); 25 | } else { 26 | throw new IllegalBioPAXArgumentException( 27 | "Participants of a molecular interaction should be " 28 | + "of type PhysicalEntity but " + participant + " is not."); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/RnaRegionImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.EntityReference; 4 | import org.biopax.paxtools.model.level3.RnaRegionReference; 5 | import org.biopax.paxtools.model.level3.RnaRegion; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class RnaRegionImpl extends NucleicAcidImpl implements RnaRegion 10 | { 11 | public RnaRegionImpl() { 12 | } 13 | 14 | 15 | @Override 16 | public void setEntityReference(EntityReference entityReference) { 17 | if(entityReference instanceof RnaRegionReference || entityReference == null) 18 | super.setEntityReference(entityReference); 19 | else 20 | throw new IllegalBioPAXArgumentException("setEntityReference failed: " 21 | + entityReference.getUri() + " is not a RnaRegionReference."); 22 | } 23 | // --------------------- Interface BioPAXElement --------------------- 24 | 25 | @Override 26 | public Class getModelInterface() 27 | { 28 | return RnaRegion.class; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /paxtools-trove/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.biopax.paxtools 7 | paxtools 8 | 6.0.1-SNAPSHOT 9 | 10 | 11 | paxtools-trove 12 | Paxtools-Trove 13 | Trove4j based collections provider for BioPAX model 14 | jar 15 | 16 | https://biopax.github.io/Paxtools 17 | 18 | 19 | 20 | org.biopax.paxtools 21 | paxtools-core 22 | ${project.version} 23 | 24 | 25 | net.sf.trove4j 26 | trove4j 27 | 3.0.3 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/OrganismFilter.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3; 2 | 3 | import org.biopax.paxtools.controller.PathAccessor; 4 | import org.biopax.paxtools.model.level3.PhysicalEntity; 5 | 6 | /** 7 | * Filter by organism. Applied to PhysicalEntity. Checks if their EntityReference is associated with 8 | * one of the given organisms. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class OrganismFilter extends StringFieldFilter 13 | { 14 | /** 15 | * Constructor. 16 | * @param organism organisms to select 17 | */ 18 | public OrganismFilter(String[] organism) 19 | { 20 | super(true, organism); 21 | } 22 | 23 | /** 24 | * Creates the accessor from PhysicalEntity to the organism of related EntityReference. 25 | */ 26 | @Override 27 | public void createFieldAccessors() 28 | { 29 | addAccessor(new PathAccessor("PhysicalEntity/entityReference/organism/name"), 30 | PhysicalEntity.class); 31 | addAccessor(new PathAccessor("PhysicalEntity/entityReference/organism/xref:UnificationXref/id"), 32 | PhysicalEntity.class); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ActivityConstraint.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.model.level3.PhysicalEntity; 4 | import org.biopax.paxtools.pattern.Match; 5 | 6 | /** 7 | * Checks if the PhysicalEntity controls anything. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public class ActivityConstraint extends ConstraintAdapter 12 | { 13 | /** 14 | * Desired activity. 15 | */ 16 | boolean active; 17 | 18 | /** 19 | * Constructor with the desired activity. 20 | * @param active desires activity 21 | */ 22 | public ActivityConstraint(boolean active) 23 | { 24 | super(1); 25 | this.active = active; 26 | } 27 | 28 | /** 29 | * Checks if the PhysicalEntity controls anything. 30 | * @param match current match to validate 31 | * @param ind mapped index 32 | * @return true if it controls anything 33 | */ 34 | @Override 35 | public boolean satisfies(Match match, int... ind) 36 | { 37 | PhysicalEntity pe = (PhysicalEntity) match.get(ind[0]); 38 | 39 | return pe.getControllerOf().isEmpty() == active; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/sequenceFeature.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface sequenceFeature extends utilityClass, XReferrable 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addFEATURE_LOCATION(sequenceLocation FEATURE_LOCATION); 11 | 12 | void addSYNONYMS(String SYNONYMS); 13 | 14 | Set getFEATURE_LOCATION(); 15 | // --------------------- ACCESORS and MUTATORS--------------------- 16 | 17 | openControlledVocabulary getFEATURE_TYPE(); 18 | 19 | String getNAME(); 20 | 21 | String getSHORT_NAME(); 22 | 23 | Set getSYNONYMS(); 24 | 25 | void removeFEATURE_LOCATION(sequenceLocation FEATURE_LOCATION); 26 | 27 | void removeSYNONYMS(String SYNONYMS); 28 | 29 | void setFEATURE_LOCATION(Set FEATURE_LOCATION); 30 | 31 | void setFEATURE_TYPE(openControlledVocabulary FEATURE_TYPE); 32 | 33 | void setNAME(String NAME); 34 | 35 | void setSHORT_NAME(String SHORT_NAME); 36 | 37 | void setSYNONYMS(Set SYNONYMS); 38 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/CatalysisDirectionType.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * This enum represents the direction of a catalysis under all physiological conditions if there is one. 5 | * Note that chemically a catalyst will increase the rate of the reaction in both directions. In biology, 6 | * however, there are cases where the enzyme is expressed only when the controlled bidirectional conversion is 7 | * on one side of the chemical equilibrium. olled bidirectional conversion is on one side of the chemical 8 | * equilibrium. For example E.Coli's lac operon ensures that lacZ gene is only synthesized when there is enough 9 | * lactose in the medium. If that is the case and the controller, under biological conditions, 10 | * is always catalyzing the conversion in one direction then this fact can be captured using this property. If 11 | * the enzyme is active for both directions, or the conversion is not bidirectional, 12 | * this property should be left empty. 13 | */ 14 | public enum CatalysisDirectionType 15 | { 16 | LEFT_TO_RIGHT, 17 | RIGHT_TO_LEFT 18 | } -------------------------------------------------------------------------------- /sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/VCompound.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.io.sbgn; 2 | 3 | import java.util.List; 4 | import java.util.ArrayList; 5 | import org.ivis.layout.LGraphObject; 6 | import org.ivis.layout.LGraphObject; 7 | import org.ivis.layout.LNode; 8 | import org.ivis.layout.Updatable; 9 | import org.sbgn.bindings.Glyph; 10 | import org.sbgn.bindings.Bbox; 11 | import org.ivis.layout.cose.CoSEGraph; 12 | 13 | 14 | /** 15 | * VCompound Class 16 | * @author: Istemi Bahceci 17 | */ 18 | class VCompound extends VNode implements Updatable 19 | { 20 | public List children; 21 | 22 | /** 23 | * Default Constructor, creates a VCompound node by given glyph 24 | * @param g Glyph object that VCompound object will be created from. 25 | * */ 26 | public VCompound(Glyph g) 27 | { 28 | super(g); 29 | this.children = new ArrayList(); 30 | } 31 | 32 | /** 33 | * Returns the child list of this VCompound 34 | * @return child list of this VCompound. 35 | * */ 36 | public List getChildren() 37 | { 38 | return children; 39 | } 40 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/BioPAXLevel2ElementImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.impl.BioPAXElementImpl; 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | 6 | import java.util.HashSet; 7 | import java.util.Set; 8 | 9 | /** 10 | * Created by IntelliJ IDEA. 11 | * User: Emek 12 | * Date: Feb 12, 2008 13 | * Time: 11:08:01 AM 14 | */ 15 | abstract class BioPAXLevel2ElementImpl extends BioPAXElementImpl 16 | implements BioPAXElement 17 | { 18 | private Set COMMENT; 19 | 20 | BioPAXLevel2ElementImpl() 21 | { 22 | this.COMMENT = new HashSet<>(); 23 | } 24 | 25 | public Set getCOMMENT() 26 | { 27 | return this.COMMENT; 28 | } 29 | 30 | public void setCOMMENT(Set COMMENT) 31 | { 32 | this.COMMENT = COMMENT; 33 | } 34 | 35 | public void removeCOMMENT(String COMMENT) 36 | { 37 | this.COMMENT.remove(COMMENT); 38 | } 39 | 40 | public void addCOMMENT(String COMMENT) 41 | { 42 | this.COMMENT.add(COMMENT); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 BioPAX 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DnaImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.Dna; 4 | import org.biopax.paxtools.model.level3.DnaReference; 5 | import org.biopax.paxtools.model.level3.EntityReference; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class DnaImpl extends NucleicAcidImpl implements Dna 10 | { 11 | 12 | public DnaImpl() { 13 | } 14 | 15 | // ------------------------ INTERFACE METHODS ------------------------ 16 | 17 | @Override 18 | public void setEntityReference(EntityReference entityReference) { 19 | if(entityReference instanceof DnaReference || entityReference == null) 20 | super.setEntityReference(entityReference); 21 | else 22 | throw new IllegalBioPAXArgumentException("setEntityReference failed: " 23 | + entityReference.getUri() + " is not a DnaReference."); 24 | } 25 | 26 | // --------------------- Interface BioPAXElement --------------------- 27 | 28 | @Override 29 | public Class getModelInterface() 30 | { 31 | return Dna.class; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /normalizer/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | normalizer 6 | BioPAX Normalizer 7 | BioPAX Model/URIs Normalizer and BIO Identifiers Resolver 8 | 2009 9 | 10 | paxtools 11 | org.biopax.paxtools 12 | 6.0.1-SNAPSHOT 13 | 14 | 15 | https://biopax.github.io/Paxtools 16 | 17 | 18 | 19 | ${project.groupId} 20 | paxtools-core 21 | 22 | 23 | com.fasterxml.jackson.core 24 | jackson-databind 25 | 26 | 27 | org.projectlombok 28 | lombok 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/relationshipXrefImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.relationshipXref; 5 | 6 | /** 7 | */ 8 | class relationshipXrefImpl extends xrefImpl implements relationshipXref 9 | { 10 | // ------------------------------ FIELDS ------------------------------ 11 | 12 | private String RELATIONSHIP_TYPE; 13 | 14 | // ------------------------ INTERFACE METHODS ------------------------ 15 | 16 | 17 | // --------------------- Interface BioPAXElement --------------------- 18 | 19 | 20 | public Class getModelInterface() 21 | { 22 | return relationshipXref.class; 23 | } 24 | 25 | // --------------------- Interface relationshipXref --------------------- 26 | 27 | // --------------------- ACCESORS and MUTATORS--------------------- 28 | 29 | public String getRELATIONSHIP_TYPE() 30 | { 31 | return RELATIONSHIP_TYPE; 32 | } 33 | 34 | public void setRELATIONSHIP_TYPE(String RELATIONSHIP_TYPE) 35 | { 36 | this.RELATIONSHIP_TYPE = RELATIONSHIP_TYPE; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /json-converter/src/main/java/org/biopax/paxtools/io/jsonld/package-info.java: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @author yurishiyanov, rodche (polished, re-factored, moved here) 4 | * 5 | * Re-factored and added to Paxtools from the 6 | * original https://github.com/BaderLab/biopax-jsonld project. 7 | * 8 | * A BioPAX to/from JSON-LD format converter. 9 | * 10 | * Requirements: 11 | * 12 | * Needs jdk 1.7 and Jena library verion 2.12.0 or later. 13 | * All dependencies outlined in maven pom.xml file. 14 | * 15 | * Maximum tested size of owl file is 400M, it needs PC with minimum 12 G memory 16 | * as processing of the file involved creation Jena model in the memory. 17 | * This step is very memory intensive. 18 | * 19 | * In short: 20 | * To convert owl/rdf file to jsonld format use method convertToJsonld in interface JsonldConverter: 21 | * 22 | * convertToJsonld(InputStream in, OutputStream os). 23 | * 24 | * To convert jsonld file from jsonld to RDF format use method convertFromJsonld in interface JsonldConverter: 25 | * 26 | * convertFromJsonld(InputStream in, OutputStream out) 27 | * 28 | */ 29 | package org.biopax.paxtools.io.jsonld; 30 | 31 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/evidence.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | 6 | public interface evidence extends utilityClass, XReferrable 7 | { 8 | // -------------------------- OTHER METHODS -------------------------- 9 | 10 | void addCONFIDENCE(confidence CONFIDENCE); 11 | 12 | void addEVIDENCE_CODE(openControlledVocabulary EVIDENCE_CODE); 13 | 14 | void addEXPERIMENTAL_FORM(experimentalForm EXPERIMENTAL_FORM); 15 | 16 | 17 | Set getCONFIDENCE(); 18 | 19 | 20 | Set getEVIDENCE_CODE(); 21 | // --------------------- ACCESORS and MUTATORS--------------------- 22 | 23 | Set getEXPERIMENTAL_FORM(); 24 | 25 | void removeCONFIDENCE(confidence CONFIDENCE); 26 | 27 | void removeEVIDENCE_CODE(openControlledVocabulary EVIDENCE_CODE); 28 | 29 | void removeEXPERIMENTAL_FORM(experimentalForm EXPERIMENTAL_FORM); 30 | 31 | void setCONFIDENCE(Set CONFIDENCE); 32 | 33 | void setEVIDENCE_CODE(Set EVIDENCE_CODE); 34 | 35 | void setEXPERIMENTAL_FORM(Set EXPERIMENTAL_FORM); 36 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/process.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Tagging interface for entities that needs evidence and can be targeted by a 7 | * control : Pathway and Interaction 8 | */ 9 | public interface process extends entity, pathwayComponent 10 | { 11 | 12 | /** 13 | * This method adds the given evidence to this process. 14 | * 15 | * @param EVIDENCE value to add 16 | */ 17 | void addEVIDENCE(evidence EVIDENCE); 18 | 19 | /** 20 | * This method remmoves the given evidence from this process. If process does 21 | * not already contain this evidence this method does nothing 22 | * 23 | * @param EVIDENCE to remove 24 | */ 25 | void removeEVIDENCE(evidence EVIDENCE); 26 | 27 | /** 28 | * Gets all evidence objects. 29 | * @return all the evidence objects attached directly to this process 30 | */ 31 | Set getEVIDENCE(); 32 | 33 | void setEVIDENCE(Set EVIDENCE); 34 | 35 | Set isCONTROLLEDOf(); 36 | 37 | Set isPATHWAY_COMPONENTSof(); 38 | 39 | Set isSTEP_INTERACTIONSOf(); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SequenceModificationVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A term that describes the covalent modifications to an amino 6 | * acid or nucleic acid chain. For proteins this is reference to the PSI 7 | * Molecular Interaction ontology (MI) of covalent sequence modifications. 8 | * For nucleic acids, there is currently no recommended standard CV. 9 | *

10 | * Usage: Whenever possible the most specific term in the ontology should be used. 11 | * For example PSI-MI term o-phospho-serine should be used instead of the 12 | * parent "phosphorylated residue" when annotating a phosphorylation at a 13 | * known serine amino acid. 14 | * @see PSI Dev 15 | * @see PSI Biological Feature 16 | * @see Candidate RNA modification CV 17 | */ 18 | public interface SequenceModificationVocabulary extends ControlledVocabulary 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/Type.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.pattern.Match; 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | 6 | /** 7 | * Checks if a variable is a specific type or its subclass. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public class Type extends ConstraintAdapter 12 | { 13 | /** 14 | * Desired class. 15 | */ 16 | private Class clazz; 17 | 18 | /** 19 | * Constructor with the desired class. 20 | * @param clazz desired class 21 | */ 22 | public Type(Class clazz) 23 | { 24 | super(1); 25 | this.clazz = clazz; 26 | } 27 | 28 | /** 29 | * Checks if the element is assignable to a variable of the desired type. 30 | * @param match current pattern match 31 | * @param ind mapped indices 32 | * @return true if the element is assignable to a variable of the desired type 33 | */ 34 | @Override 35 | public boolean satisfies(Match match, int... ind) 36 | { 37 | assert ind.length == 1; 38 | 39 | return clazz.isAssignableFrom(match.get(ind[0]).getModelInterface()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/L3ElementImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.impl.BioPAXElementImpl; 4 | import org.biopax.paxtools.model.level3.Level3Element; 5 | import org.biopax.paxtools.util.*; 6 | import java.util.Set; 7 | 8 | 9 | /** 10 | * Base BioPAX Level3 element. 11 | * 12 | */ 13 | public abstract class L3ElementImpl extends BioPAXElementImpl 14 | implements Level3Element 15 | { 16 | private Set comment; 17 | 18 | public L3ElementImpl() 19 | { 20 | this.comment = BPCollections.I.createSet(); 21 | } 22 | 23 | public Set getComment() 24 | { 25 | return this.comment; 26 | } 27 | 28 | public void setComment(Set comment) 29 | { 30 | this.comment = comment; 31 | } 32 | 33 | public void addComment(String COMMENT) 34 | { 35 | if(COMMENT != null && COMMENT.length() > 0) 36 | this.comment.add(COMMENT); 37 | } 38 | 39 | public void removeComment(String COMMENT) 40 | { 41 | if(COMMENT != null) 42 | this.comment.remove(COMMENT); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /paxtools-trove/src/test/java/org/biopax/paxtools/trove/TSetBuilderTest.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.trove; 2 | 3 | import org.biopax.paxtools.controller.EditorMap; 4 | import org.biopax.paxtools.controller.SimpleEditorMap; 5 | import org.biopax.paxtools.impl.MockFactory; 6 | import org.biopax.paxtools.model.BioPAXElement; 7 | import org.biopax.paxtools.model.BioPAXLevel; 8 | import org.biopax.paxtools.model.Model; 9 | import org.biopax.paxtools.util.BPCollections; 10 | import org.junit.jupiter.api.Test; 11 | 12 | public class TSetBuilderTest 13 | { 14 | @Test 15 | public void testModelMemoryLoad() { 16 | BPCollections.I.setProvider(new TProvider()); 17 | MockFactory factory = new MockFactory(BioPAXLevel.L3); 18 | Model model = factory.createModel(); 19 | //test reflectively create 20 | EditorMap map = SimpleEditorMap.L3; 21 | int i = 0; 22 | for (Class aClass : map.getKnownSubClassesOf(BioPAXElement.class)) 23 | { 24 | if (factory.canInstantiate(aClass)) 25 | { 26 | for (int j = 0; j < 1000; j++) 27 | { 28 | model.addNew(aClass, "mock://ModelCoverageTest/id/" + i++); 29 | } 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /paxtools-console/src/main/java/org/biopax/paxtools/examples/PathwayComponentLister.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.examples; 2 | 3 | import org.biopax.paxtools.model.Model; 4 | import org.biopax.paxtools.model.level3.*; 5 | import org.biopax.paxtools.model.level3.Process; 6 | 7 | 8 | /** 9 | * This example shows how to list all components of a pathway. 10 | * 11 | * 12 | */ 13 | public class PathwayComponentLister 14 | { 15 | public static void printPathwayComponents(Model model) 16 | { 17 | String prefix = ""; 18 | for (Pathway pathway : model.getObjects(Pathway.class)) 19 | { 20 | printPathway(pathway, prefix); 21 | } 22 | } 23 | 24 | private static void printPathway(Pathway pathway, String prefix) 25 | { 26 | System.out.println(prefix+"Pathway:"+pathway); 27 | prefix=prefix+"\t"; 28 | for (Process process : pathway.getPathwayComponent()) 29 | { 30 | if(process instanceof Pathway) 31 | { 32 | printPathway((Pathway) process,prefix); 33 | } 34 | else System.out.println(prefix + process); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/AbstractPropertyCommand.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.command; 2 | 3 | import org.biopax.paxtools.controller.PropertyEditor; 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | 6 | /** 7 | */ 8 | public abstract class AbstractPropertyCommand implements Command 9 | { 10 | D bpe; 11 | PropertyEditor editor; 12 | R value; 13 | 14 | AbstractPropertyCommand(D bpe, PropertyEditor editor, R value) 15 | { 16 | 17 | if (bpe == null || editor == null) 18 | { 19 | throw new IllegalArgumentException(); 20 | } 21 | this.bpe = bpe; 22 | this.editor = editor; 23 | this.value=value; 24 | 25 | } 26 | 27 | public boolean undo() 28 | { 29 | try 30 | { 31 | undoAction(); 32 | return true; 33 | } 34 | catch (Exception e) 35 | { 36 | return false; 37 | } 38 | } 39 | 40 | protected abstract void undoAction(); 41 | 42 | 43 | public boolean redo() 44 | { 45 | try 46 | { 47 | redoAction(); 48 | return true; 49 | } 50 | catch (Exception e) 51 | { 52 | return false; 53 | } 54 | } 55 | 56 | protected abstract void redoAction(); 57 | 58 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/MolecularInteraction.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: An interaction in which at least one participant is a physical entity, e.g. a binding event. 5 | * Comment: This class should be used by default for representing molecular interactions, such as those defined by PSI-MI level 2.5. The participants in a molecular interaction should be listed in the PARTICIPANTS slot. Note that this is one of the few cases in which the PARTICPANT slot should be directly populated with instances (see comments on the PARTICPANTS property in the interaction class description). If sufficient information on the nature of a molecular interaction is available, a more specific BioPAX interaction class should be used. 6 | * Example: Two proteins observed to interact in a yeast-two-hybrid experiment where there is not enough experimental evidence to suggest that the proteins are forming a complex by themselves without any indirect involvement of other proteins. This is the case for most large-scale yeast two-hybrid screens. 7 | */ 8 | public interface MolecularInteraction extends Interaction 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/util/ClassFilterSet.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.util; 2 | 3 | import java.util.Collection; 4 | 5 | 6 | /** 7 | * A FilterSet that filters based on the class. For example, it is useful for creating a Set of Proteins from a 8 | * Set of BioPAXElements. 9 | * @param Superset's type e.g. BioPAXElement 10 | * @param Subset's type e.g. Protein. F must extend E 11 | */ 12 | public class ClassFilterSet extends AbstractFilterSet 13 | { 14 | // ------------------------------ FIELDS ------------------------------ 15 | protected Class filterClass; 16 | 17 | // --------------------------- CONSTRUCTORS --------------------------- 18 | 19 | public ClassFilterSet(Collection baseSet, Class filterClass) 20 | { 21 | super(baseSet); 22 | this.filterClass = filterClass; 23 | } 24 | 25 | /** 26 | * This filter method implementation filters based on isInstance function. 27 | * @param value Object to be tested 28 | * @return true if value is instance of F. 29 | */ 30 | @Override public boolean filter(E value) 31 | { 32 | return filterClass.isInstance(value); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/ProteinImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.EntityReference; 4 | import org.biopax.paxtools.model.level3.Protein; 5 | import org.biopax.paxtools.model.level3.ProteinReference; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class ProteinImpl extends SimplePhysicalEntityImpl implements Protein 10 | { 11 | public ProteinImpl() { 12 | } 13 | 14 | // ------------------------ INTERFACE METHODS ------------------------ 15 | 16 | @Override 17 | public void setEntityReference(EntityReference entityReference) { 18 | if(entityReference instanceof ProteinReference || entityReference == null) 19 | super.setEntityReference(entityReference); 20 | else 21 | throw new IllegalBioPAXArgumentException("setEntityReference failed: " 22 | + entityReference.getUri() + " is not a ProteinReference."); 23 | } 24 | 25 | 26 | // --------------------- Interface BioPAXElement --------------------- 27 | 28 | @Override 29 | public Class getModelInterface() 30 | { 31 | return Protein.class; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/FragmentFeature.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: An entity feature that represents the resulting physical entity subsequent to a cleavage or 5 | * degradation event. 6 | * 7 | * Usage: Fragment Feature can be used to cover multiple types of modfications to the sequence of the physical 8 | * entity: 9 | *

    10 | *
  • A protein with a single cleavage site that converts the protein into two fragments (e.g. pro-insulin 11 | * converted to insulin and C-peptide). TODO: CV term for sequence fragment? PSI-MI CV term for cleavage site? 12 | *
  • A protein with two cleavage sites that removes an internal sequence e.g. an intein i.e. ABC -> A 13 | *
  • Cleavage of a circular sequence e.g. a plasmid. 14 | *
15 | * In the case of removal ( e.g. intron) the fragment that is *removed* is specified in the feature location 16 | * property. In the case of a "cut" (e.g. restriction enzyme cut site) the location of the cut is specified instead. 17 | * Examples: Insulin Hormone 18 | */ 19 | public interface FragmentFeature extends EntityFeature 20 | { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/NOT.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.pattern.Constraint; 4 | import org.biopax.paxtools.pattern.Match; 5 | 6 | /** 7 | * Negation of a constraint. This is not generative. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public class NOT extends ConstraintAdapter 12 | { 13 | /** 14 | * Constraint to negate 15 | */ 16 | Constraint con; 17 | 18 | /** 19 | * Constructor with the wrapped constraint. 20 | * @param con constraint to negate 21 | */ 22 | public NOT(Constraint con) 23 | { 24 | this.con = con; 25 | } 26 | 27 | /** 28 | * Size is equal to the of the negated constraint 29 | * @return size of the wrapped constraint 30 | */ 31 | @Override 32 | public int getVariableSize() 33 | { 34 | return con.getVariableSize(); 35 | } 36 | 37 | /** 38 | * Negates the satisfies value of the wrapped constraint. 39 | * @param match current pattern match 40 | * @param ind mapped indices 41 | * @return negated value 42 | */ 43 | @Override 44 | public boolean satisfies(Match match, int... ind) 45 | { 46 | return !con.satisfies(match, ind); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DnaRegionImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.DnaRegionReference; 4 | import org.biopax.paxtools.model.level3.DnaRegion; 5 | import org.biopax.paxtools.model.level3.EntityReference; 6 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 7 | 8 | 9 | public class DnaRegionImpl extends NucleicAcidImpl implements DnaRegion 10 | { 11 | public DnaRegionImpl() { 12 | } 13 | 14 | // ------------------------ INTERFACE METHODS ------------------------ 15 | 16 | @Override 17 | public void setEntityReference(EntityReference entityReference) { 18 | if(entityReference instanceof DnaRegionReference || entityReference == null) 19 | super.setEntityReference(entityReference); 20 | else 21 | throw new IllegalBioPAXArgumentException("setEntityReference failed: " 22 | + entityReference.getUri() + " is not a DnaRegionReference."); 23 | } 24 | 25 | 26 | // --------------------- Interface BioPAXElement --------------------- 27 | 28 | @Override 29 | public Class getModelInterface() 30 | { 31 | return DnaRegion.class; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/NucleicAcidReferenceImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.level3.NucleicAcidReference; 4 | import org.biopax.paxtools.model.level3.NucleicAcidRegionReference; 5 | import org.biopax.paxtools.util.BPCollections; 6 | 7 | import java.util.Set; 8 | 9 | public abstract class NucleicAcidReferenceImpl extends SequenceEntityReferenceImpl implements NucleicAcidReference 10 | { 11 | private Set subRegion; 12 | 13 | public NucleicAcidReferenceImpl() 14 | { 15 | this.subRegion = BPCollections.I.createSafeSet(); 16 | } 17 | 18 | public Set getSubRegion() 19 | { 20 | return subRegion; 21 | } 22 | 23 | public void addSubRegion(NucleicAcidRegionReference regionReference) 24 | { 25 | if (regionReference != null) 26 | { 27 | subRegion.add(regionReference); 28 | regionReference.getSubRegionOf().add(this); 29 | } 30 | } 31 | 32 | public void removeSubRegion(NucleicAcidRegionReference regionReference) 33 | { 34 | if (regionReference != null) 35 | { 36 | subRegion.remove(regionReference); 37 | } 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/ExperimentalFormVocabulary.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A term that describes the form of the physical entity in the context of the experiment. This is a 6 | * reference to the PSI Molecular Interaction ontology (MI) participant identification method (e.g. mass spectrometry), 7 | * experimental role (e.g. bait, prey) or experimental preparation (e.g. expression level) type. 8 | * 9 | * @see PSI-DEV 10 | * @see 11 | * PSI-MI: Participant Identification Method 12 | * @see 13 | * PSI-MI:Experimental Role 14 | * @see 15 | * PSI-MI: Experimental Preparation 16 | */ 17 | public interface ExperimentalFormVocabulary extends ControlledVocabulary 18 | { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /paxtools-core/src/test/java/org/biopax/paxtools/impl/level3/ModelCoverageTest.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.controller.EditorMap; 4 | import org.biopax.paxtools.controller.SimpleEditorMap; 5 | import org.biopax.paxtools.impl.MockFactory; 6 | import org.biopax.paxtools.model.BioPAXElement; 7 | import org.biopax.paxtools.model.BioPAXLevel; 8 | import org.junit.jupiter.api.Test; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public class ModelCoverageTest 13 | { 14 | @Test 15 | public void creationMethods() { 16 | MockFactory factory = new MockFactory(BioPAXLevel.L3); 17 | //test reflectively create 18 | EditorMap map = SimpleEditorMap.L3; 19 | int i = 0; 20 | for (Class aClass : map.getKnownSubClassesOf(BioPAXElement.class)) 21 | { 22 | if (factory.canInstantiate(aClass)) 23 | { 24 | BioPAXElement bpe = factory.create(aClass, "mock://ModelCoverageTest/id/" + i++); 25 | assertNotNull(bpe); 26 | assertTrue(aClass.isAssignableFrom(bpe.getClass())); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/confidence.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * Confidence that the containing instance actually occurs or exists in vivo, 5 | * usually a statistical measure. The xref must contain at least on publication 6 | * that describes the method used to determine the confidence. There is 7 | * currently no standard way of describing confidence values, so any string is 8 | * valid for the confidence value. In the future, a controlled vocabulary of 9 | * accepted confidence values could become available, in which case it will 10 | * likely be adopted for use here to describe the value. 11 | * 12 | * Examples: The statistical significance of a result, e.g. "p<0.05". 13 | */ 14 | public interface confidence extends utilityClass, XReferrable 15 | { 16 | 17 | /** 18 | * The value of the confidence measure. 19 | * @return A string representation of the confidence value 20 | */ 21 | String getCONFIDENCE_VALUE(); 22 | 23 | /** 24 | * The value of the confidence measure. 25 | * @param CONFIDENCE_VALUE to be set. 26 | */ 27 | void setCONFIDENCE_VALUE(String CONFIDENCE_VALUE); 28 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/command/AbstractAddRemoveCommand.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.command; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.Model; 5 | 6 | import java.util.Set; 7 | 8 | 9 | public abstract class AbstractAddRemoveCommand implements Command 10 | { 11 | Model model; 12 | Set bpes; 13 | 14 | public AbstractAddRemoveCommand(Model model, Set bpes) 15 | { 16 | this.model = model; 17 | this.bpes = bpes; 18 | } 19 | 20 | public boolean undo() 21 | { 22 | try 23 | { 24 | for (BioPAXElement bpe : bpes) 25 | { 26 | undoAction(bpe); 27 | } 28 | return true; 29 | } 30 | catch (Exception e) 31 | { 32 | return false; 33 | } 34 | } 35 | 36 | protected abstract void undoAction(BioPAXElement bpe); 37 | 38 | public boolean canUndo() 39 | { 40 | return true; 41 | } 42 | 43 | public boolean redo() 44 | { 45 | try 46 | { 47 | for (BioPAXElement bpe : bpes) 48 | { 49 | redoAction(bpe); 50 | } 51 | return true; 52 | } 53 | catch (Exception e) 54 | { 55 | return false; 56 | } 57 | } 58 | 59 | protected abstract void redoAction(BioPAXElement bpe); 60 | } 61 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/Visitor.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.Model; 5 | 6 | /** 7 | * Basic visitor interface for classes using Traverser. 8 | */ 9 | public interface Visitor 10 | { 11 | // -------------------------- OTHER METHODS -------------------------- 12 | 13 | /** 14 | * An implementation of this method should perform a BioPAX element 15 | * and editor dependent operation on the model. Examples of uses of this 16 | * method include adding a BioPAX element--with all its dependent 17 | * elements that can be reached via the editor--into the model, or 18 | * updating an element that is equivalent to the given BioPAX element 19 | * using the latter's/former's values. 20 | * 21 | * @param domain BioPAXElement which is the domain of this property 22 | * @param range Object which is the range of this property 23 | * @param model model on which the visiting operation will be done 24 | * @param editor editor 25 | */ 26 | void visit(BioPAXElement domain, Object range, Model model, PropertyEditor editor); 27 | } 28 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/constraint/IDConstraint.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.pattern.Match; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Checks if the element has the desired ID. This is a separate class (not reusing FieldConstraint) 9 | * because PathAccessor cannot access to RDFIDs. 10 | * 11 | * @author Ozgun Babur 12 | */ 13 | public class IDConstraint extends ConstraintAdapter 14 | { 15 | /** 16 | * Desired IDs. 17 | */ 18 | Set ids; 19 | 20 | /** 21 | * Constructor with desired IDs. 22 | * @param ids desired IDs for valid elements to have 23 | */ 24 | public IDConstraint(Set ids) 25 | { 26 | this.ids = ids; 27 | } 28 | 29 | /** 30 | * Returns 1. 31 | * @return 1 32 | */ 33 | @Override 34 | public int getVariableSize() 35 | { 36 | return 1; 37 | } 38 | 39 | /** 40 | * Checks if the element has one of the desired IDs. 41 | * @param match current pattern match 42 | * @param ind mapped indices 43 | * @return true if the ID is in the list 44 | */ 45 | @Override 46 | public boolean satisfies(Match match, int... ind) 47 | { 48 | return ids.contains(match.get(ind[0]).getUri()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/chemicalStructure.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | 4 | /** 5 | * Describes a small molecule structure. Structure information is stored in the 6 | * property STRUCTURE-DATA, in one of three formats: the CML format (see 7 | * www.xml-cml.org), the SMILES format (see www.daylight.com/dayhtml/smiles/) 8 | * or the InChI format (http://www.iupac.org/inchi/). The STRUCTURE-FORMAT 9 | * property specifies which format is used. 10 | * 11 | * Comment: By virtue of the expressivity of CML, an instance of this 12 | * class can also provide additional information about a small molecule, such as 13 | * its chemical formula, names, and synonyms, if CML is used as the structure 14 | * format. 15 | * 16 | * Examples: The following SMILES string, which describes the structure 17 | * of glucose-6-phosphate: 18 | * 'C(OP(=O)(O)O)[CH]1([CH](O)[CH](O)[CH](O)[CH](O)O1)'. 19 | */ 20 | public interface chemicalStructure extends utilityClass 21 | { 22 | 23 | String getSTRUCTURE_DATA(); 24 | 25 | String getSTRUCTURE_FORMAT(); 26 | 27 | void setSTRUCTURE_DATA(String STRUCTURE_DATA); 28 | 29 | void setSTRUCTURE_FORMAT(String STRUCTURE_FORMAT); 30 | } -------------------------------------------------------------------------------- /pattern/src/test/java/org/biopax/paxtools/pattern/constraint/TestParent.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.constraint; 2 | 3 | import org.biopax.paxtools.io.SimpleIOHandler; 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | import org.biopax.paxtools.model.Model; 6 | import org.biopax.paxtools.pattern.Match; 7 | import org.junit.jupiter.api.BeforeEach; 8 | import org.junit.jupiter.api.Test; 9 | 10 | import java.util.HashSet; 11 | import java.util.List; 12 | import java.util.Set; 13 | 14 | /** 15 | * @author Ozgun Babur 16 | */ 17 | public class TestParent 18 | { 19 | Model model; 20 | 21 | @BeforeEach 22 | public void setUp() throws Exception 23 | { 24 | SimpleIOHandler h = new SimpleIOHandler(); 25 | model = h.convertFromOWL(getClass().getResourceAsStream("../AR-TP53.owl")); 26 | } 27 | 28 | @Test 29 | public void dummyMethod() 30 | { 31 | // I needed to add this dummy method because maven was complaining that this class has no 32 | // test methods. 33 | } 34 | 35 | 36 | protected Set collect(List list, int index) 37 | { 38 | Set set = new HashSet<>(); 39 | 40 | for (Match match : list) 41 | { 42 | set.add(match.get(index)); 43 | } 44 | return set; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/NeighborOfMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the "neighbor-of" relation. 8 | * @author Ozgun Babur 9 | */ 10 | public class NeighborOfMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets sif type. 14 | */ 15 | public NeighborOfMiner() 16 | { 17 | super(SIFEnum.NEIGHBOR_OF); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.neighborOf(); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "Protein 1"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "Protein 2"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"Inter"}; 46 | } 47 | 48 | @Override 49 | public String[] getSourcePELabels() 50 | { 51 | return new String[]{"SPE1", "PE1"}; 52 | } 53 | 54 | @Override 55 | public String[] getTargetPELabels() 56 | { 57 | return new String[]{"SPE2", "PE2"}; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/ReactsWithMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the "reacts-with" relation. 8 | * @author Ozgun Babur 9 | */ 10 | public class ReactsWithMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets sif type. 14 | */ 15 | public ReactsWithMiner() 16 | { 17 | super(SIFEnum.REACTS_WITH); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.reactsWith(blacklist); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "SMR1"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "SMR2"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"Conv"}; 46 | } 47 | 48 | @Override 49 | public String[] getSourcePELabels() 50 | { 51 | return new String[]{"SPE1", "PE1"}; 52 | } 53 | 54 | @Override 55 | public String[] getTargetPELabels() 56 | { 57 | return new String[]{"SPE2", "PE2"}; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Welcome to Paxtools, we hope you enjoy your time 2 | on this auto-generated project site. We've tried to assemble some 3 | great user documentation and developer information, and we're really 4 | excited that you've taken the time to visit this site. 5 | 6 | What is Paxtools 7 | 8 | We present Paxtools a software library that contains algorithms, software 9 | components and converters for biological pathways represented in the standard 10 | BioPAX language. Paxtools allows scientists to focus on their scientific 11 | problem by removing technical barriers to access and analyse pathway information. 12 | Paxtools is open source and is available under the Lesser GNU public license (LGPL), 13 | which allows users to freely use the code in their software systems with a 14 | requirement for attribution. 15 | 16 | What is BioPAX 17 | 18 | BioPAX is a community developed standard language for integration, 19 | exchange and analysis of biological pathway data. BioPAX is defined 20 | in Web Ontology Language (OWL) and can represent a broad spectrum 21 | of biological processes including metabolic and signaling pathways, 22 | molecular interactions and gene networks. Pathguide.org lists the 23 | pathway databases and tools that support BioPAX. -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/model/Graph.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.model; 2 | 3 | import java.util.Map; 4 | import java.util.Set; 5 | 6 | /** 7 | * This graph interface is used in graph algorithms. 8 | * 9 | * @author Ozgun Babur 10 | */ 11 | public interface Graph 12 | { 13 | /** 14 | * Gets the wrapper of the related object. 15 | * @param obj The wrapped object 16 | * @return Wrapper 17 | */ 18 | GraphObject getGraphObject(Object obj); 19 | 20 | /** 21 | * Gets the set of wrappers for the given wrapped object set. 22 | * @param objects Wrapped objects 23 | * @return Related wrappers 24 | */ 25 | Set getWrapperSet(Set objects); 26 | 27 | /** 28 | * Gets a map from objects to their wrappers. 29 | * @param objects Wrapped objects 30 | * @return Object-to-wrapper map 31 | */ 32 | Map getWrapperMap(Set objects); 33 | 34 | /** 35 | * Gets the wrapped objects of the given wrapper set. 36 | * @param wrappers Wrappers 37 | * @return Wrapped objects 38 | */ 39 | Set getWrappedSet(Set wrappers); 40 | 41 | /** 42 | * Should clear any analysis specific labeling on the graph. 43 | */ 44 | void clear(); 45 | } 46 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/UsedToProduceMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the "used-for-production-of" relation. 8 | * @author Ozgun Babur 9 | */ 10 | public class UsedToProduceMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets sif type. 14 | */ 15 | public UsedToProduceMiner() 16 | { 17 | super(SIFEnum.USED_TO_PRODUCE); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.usedToProduce(blacklist); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "SMR1"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "SMR2"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"Conv"}; 46 | } 47 | 48 | @Override 49 | public String[] getSourcePELabels() 50 | { 51 | return new String[]{"SPE1", "PE1"}; 52 | } 53 | 54 | @Override 55 | public String[] getTargetPELabels() 56 | { 57 | return new String[]{"SPE2", "PE2"}; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/InteractsWithMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the "interacts-with" relation. 8 | * @author Ozgun Babur 9 | */ 10 | public class InteractsWithMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets sif type. 14 | */ 15 | public InteractsWithMiner() 16 | { 17 | super(SIFEnum.INTERACTS_WITH); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.molecularInteraction(); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "Protein 1"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "Protein 2"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"MI"}; 46 | } 47 | 48 | 49 | @Override 50 | public String[] getSourcePELabels() 51 | { 52 | return new String[]{"SPE1", "PE1"}; 53 | } 54 | 55 | @Override 56 | public String[] getTargetPELabels() 57 | { 58 | return new String[]{"SPE2", "PE2"}; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/SimplePhysicalEntity.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Tagger interface for non-complex physical entities 7 | */ 8 | public interface SimplePhysicalEntity extends PhysicalEntity 9 | { 10 | 11 | /** 12 | * Reference entity for this physical entity. 13 | * @return entity reference; i.e., that of a stateless canonical identifiable entity 14 | */ 15 | EntityReference getEntityReference(); 16 | 17 | /** 18 | * Reference entity for this physical entity. 19 | * @param entityReference a BioPAX EntityReference object (usually a more specific subclass of) 20 | */ 21 | void setEntityReference(EntityReference entityReference); 22 | 23 | /** 24 | * This method returns: 25 | *
    26 | *
  • The entity reference of this PhysicalEntity plus
  • 27 | *
  • If this PhysicalEntity has member PhysicalEntities their generic EntityReferences iteratively plus
  • 28 | *
  • If the EntityReference of this PhysicalEntity has member EntityReferences their members iteratively
  • 29 | *
30 | * @return this and members' entity references (see above) 31 | */ 32 | Set getGenericEntityReferences(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /paxtools-core/src/test/java/org/biopax/paxtools/controller/EditorMapImplTest.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | 4 | import org.biopax.paxtools.model.BioPAXElement; 5 | import org.biopax.paxtools.model.level3.*; 6 | import org.junit.jupiter.api.Test; 7 | 8 | import java.util.Set; 9 | 10 | import static org.junit.jupiter.api.Assertions.*; 11 | 12 | public class EditorMapImplTest 13 | { 14 | @Test 15 | public void getKnownSubClassesOf() throws Exception 16 | { 17 | Set> organism = SimpleEditorMap.L3 18 | .getSubclassEditorsForProperty("organism", BioPAXElement.class); 19 | assertTrue(organism.size() == 3); 20 | } 21 | 22 | @Test 23 | public void somePropertyRange() { 24 | PropertyEditor entityReferencePropEditor 25 | = SimpleEditorMap.L3.getEditorForProperty("entityReference", Protein.class); 26 | assertEquals(EntityReference.class, entityReferencePropEditor.getRange()); 27 | //TODO: entityReferencePropEditor.getRange() should probably be specific sub-class, ProteinReference here, taking OWL restrictions into account... 28 | entityReferencePropEditor 29 | = SimpleEditorMap.L3.getEditorForProperty("entityReference", Gene.class); 30 | assertNull(entityReferencePropEditor); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/InComplexWithMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the degradation pattern. 8 | * @author Ozgun Babur 9 | */ 10 | public class InComplexWithMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets edge type. 14 | */ 15 | public InComplexWithMiner() 16 | { 17 | super(SIFEnum.IN_COMPLEX_WITH); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.inComplexWith(); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "Protein 1"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "Protein 2"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"Complex"}; 46 | } 47 | 48 | @Override 49 | public String[] getSourcePELabels() 50 | { 51 | return new String[]{"SPE1", "PE1", "Complex"}; 52 | } 53 | 54 | @Override 55 | public String[] getTargetPELabels() 56 | { 57 | return new String[]{"SPE2", "PE2", "Complex"}; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /paxtools-core/src/main/resources/org/biopax/paxtools/controller/L3Editor.properties.fetchOrder: -------------------------------------------------------------------------------- 1 | 1* Pathway.pathwayComponent Pathway.pathwayOrder PathwayStep.stepProcess Interaction.participant 2 | 2* Complex.component PhysicalEntity.memberPhysicalEntity 3 | 3 SimplePhysicalEntity.entityReference PhysicalEntity.feature PhysicalEntity.notFeature 4 | 4* EntityReference.memberEntityReference EntityFeature.memberFeature BindingFeature.bindsTo NucleicAcidReference.subRegion 5 | 5 Level3Element.organism EntityFeature.featureLocation Entity.dataSource Observable.evidence NucleicAcidRegionReference.absoluteRegion 6 | 6 SequenceInterval.sequenceIntervalEnd SequenceInterval.sequenceIntervalBegin Evidence.experimentalForm 7 | 7 Evidence.confidence GeneticInteraction.interactionScore 8 | 8 Score.scoreSource BioSource.cellType ModificationFeature.modificationType ExperimentalForm.experimentalFormDescription GeneticInteraction.phenotype NucleicAcidRegionReference.regionType EntityFeature.featureLocationType Interaction.interactionType BioSource.tissue EntityReference.entityReferenceType RelationshipXref.relationshipType PhysicalEntity.cellularLocation Evidence.evidenceCode 9 | 9 BiochemicalReaction.kEQ BiochemicalReaction.deltaG XReferrable.xref Conversion.participantStoichiometry Complex.componentStoichiometry SmallMoleculeReference.structure -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/Miner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.pattern.Match; 5 | import org.biopax.paxtools.pattern.Pattern; 6 | 7 | import java.io.IOException; 8 | import java.io.OutputStream; 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * A miner provides a pattern to mine, and knows how to use the result set to prepare the text 14 | * output. 15 | * 16 | * @author Ozgun Babur 17 | */ 18 | public interface Miner 19 | { 20 | /** 21 | * Gets name of the miner. 22 | * @return name 23 | */ 24 | public String getName(); 25 | 26 | /** 27 | * Gets description of the miner. 28 | * @return description 29 | */ 30 | public String getDescription(); 31 | 32 | /** 33 | * Gets the pattern to use for mining the graph. 34 | * @return the pattern 35 | */ 36 | public Pattern getPattern(); 37 | 38 | /** 39 | * Writes the text output to the given stream. 40 | * @param matches pattern search result 41 | * @param out output stream 42 | * @throws IOException when there's a problem writing to the output stream 43 | */ 44 | public void writeResult(Map> matches, OutputStream out) throws IOException; 45 | } 46 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level2/complexAssembly.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level2; 2 | 3 | /** 4 | * A conversion interaction in which a set of physical entities, at least one 5 | * being a macromolecule (e.g. protein, RNA, DNA), aggregate via non-covalent 6 | * interactions. One of the participants of a complexAssembly must be an 7 | * instance of the class complex (via a physicalEntityParticipant instance). 8 | * 9 | * Comment: This class is also used to represent complex disassembly. 10 | * The assembly or disassembly of a complex is often a spontaneous process, in 11 | * which case the direction of the complexAssembly (toward either assembly or 12 | * disassembly) should be specified via the SPONTANEOUS property. 13 | * 14 | * Synonyms: aggregation, complex formation 15 | * Examples: Assembly of the TFB2 and TFB3 proteins into the TFIIH complex, and 16 | * assembly of the ribosome through aggregation of its subunits. 17 | * Note: The following are not examples of complex assembly: Covalent 18 | * phosphorylation of a protein (this is a biochemicalReaction); the TFIIH 19 | * complex itself (this is an instance of the complex class, not the 20 | * complexAssembly class). 21 | */ 22 | public interface complexAssembly extends conversion 23 | { 24 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/ComplexAssembly.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | 4 | /** 5 | * Definition: A conversion interaction in which a set of physical entities, at least one being a macromolecule (e.g. 6 | * protein, RNA, DNA), aggregate to from a complex physicalEntity. One of the participants of a complexAssembly must be 7 | * an instance of the class Complex. The modification of the physicalentities involved in the ComplexAssembly is 8 | * captured via BindingFeature class. 9 | * 10 | * Usage: This class is also used to represent complex disassembly. The assembly or disassembly of a complex is often a 11 | * spontaneous process, in which case the direction of the complexAssembly (toward either assembly or disassembly) 12 | * should be specified via the SPONTANEOUS property. Conversions in which participants obtain or lose 13 | * CovalentBindingFeatures ( e.g. glycolysation of proteins) should be modeled with BiochemicalReaction. 14 | * 15 | * Synonyms: aggregation, complex formation 16 | * 17 | * Examples: Assembly of the TFB2 and TFB3 proteins into the TFIIH complex, and assembly of the ribosome through 18 | * aggregation of its subunits. 19 | */ 20 | public interface ComplexAssembly extends Conversion 21 | { 22 | } 23 | -------------------------------------------------------------------------------- /paxtools-query/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | paxtools 5 | org.biopax.paxtools 6 | 6.0.1-SNAPSHOT 7 | 8 | 4.0.0 9 | 10 | paxtools-query 11 | jar 12 | 13 | BioPAX Query 14 | BioPAX graph-theoretic querying - for finding paths between molecules, 15 | or identifying molecules that are reachable through specific paths, using the BioPAX pathway data model. 16 | 17 | 18 | https://biopax.github.io/Paxtools 19 | 20 | 21 | 22 | org.biopax.paxtools 23 | paxtools-core 24 | 25 | 26 | org.biopax.paxtools 27 | pattern 28 | test 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/EdgeL3.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3; 2 | 3 | import org.biopax.paxtools.query.model.AbstractEdge; 4 | import org.biopax.paxtools.query.model.Graph; 5 | import org.biopax.paxtools.query.model.Node; 6 | 7 | /** 8 | * Wrapper for links between L3 objects. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class EdgeL3 extends AbstractEdge 13 | { 14 | /** 15 | * Flag for being related to a transcription. 16 | */ 17 | boolean transcription; 18 | 19 | /** 20 | * Constructor with source and target nodes, and the owner graph. Sets transcription flag to 21 | * False by default. 22 | * 23 | * @param source Source node 24 | * @param target Target node 25 | * @param graph Owner graph 26 | */ 27 | public EdgeL3(Node source, Node target, Graph graph) 28 | { 29 | super(source, target, graph); 30 | transcription = false; 31 | } 32 | 33 | /** 34 | * @return True if this is related to a transcription 35 | */ 36 | public boolean isTranscription() 37 | { 38 | return transcription; 39 | } 40 | 41 | /** 42 | * Set the transcription flag. 43 | * @param transcription The transcription flag 44 | */ 45 | public void setTranscription(boolean transcription) 46 | { 47 | this.transcription = transcription; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /paxtools-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.biopax.paxtools 6 | paxtools 7 | 6.0.1-SNAPSHOT 8 | 9 | 10 | paxtools-core 11 | jar 12 | Paxtools Core 13 | Paxtools core library includes the BioPAX object model and interfaces, the default implementation 14 | and extras: reflection-based class factories and property editors/accessors, some inverse properties 15 | (e.g., xrefOf, componentOf), traversal, and file (I/O) utilities. 16 | 17 | 18 | https://biopax.github.io/Paxtools 19 | 20 | 21 | 22 | 23 | net.sourceforge.collections 24 | collections-generic 25 | 26 | 27 | org.apache.commons 28 | commons-lang3 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3undirected/EdgeL3.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.query.wrapperL3undirected; 2 | 3 | import org.biopax.paxtools.query.model.AbstractEdge; 4 | import org.biopax.paxtools.query.model.Graph; 5 | import org.biopax.paxtools.query.model.Node; 6 | 7 | /** 8 | * Wrapper for links between L3 objects. 9 | * 10 | * @author Ozgun Babur 11 | */ 12 | public class EdgeL3 extends AbstractEdge 13 | { 14 | /** 15 | * Flag for being related to a transcription. 16 | */ 17 | boolean transcription; 18 | 19 | /** 20 | * Constructor with source and target nodes, and the owner graph. Sets transcription flag to 21 | * False by default. 22 | * 23 | * @param source Source node 24 | * @param target Target node 25 | * @param graph Owner graph 26 | */ 27 | public EdgeL3(Node source, Node target, Graph graph) 28 | { 29 | super(source, target, graph); 30 | transcription = false; 31 | } 32 | 33 | /** 34 | * @return True if this is related to a transcription 35 | */ 36 | public boolean isTranscription() 37 | { 38 | return transcription; 39 | } 40 | 41 | /** 42 | * Set the transcription flag. 43 | * @param transcription The transcription flag 44 | */ 45 | public void setTranscription(boolean transcription) 46 | { 47 | this.transcription = transcription; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/controller/EnumeratedPropertyEditor.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.controller; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | 5 | import java.lang.reflect.Method; 6 | 7 | /** 8 | * Provides an ENUM class compatible editor by extending the {@link PropertyEditor}. 9 | * 10 | * @see PropertyEditor 11 | */ 12 | public class EnumeratedPropertyEditor 13 | extends AbstractPropertyEditor implements DataPropertyEditor 14 | { 15 | // --------------------------- CONSTRUCTORS --------------------------- 16 | 17 | public EnumeratedPropertyEditor(String property, Method getMethod, 18 | Class domain, 19 | Class range, 20 | boolean multipleCardinality) 21 | { 22 | super(property, 23 | getMethod, 24 | domain, 25 | range, 26 | multipleCardinality); 27 | } 28 | 29 | // -------------------------- OTHER METHODS -------------------------- 30 | 31 | @Override 32 | protected R parseValueFromString(String value) 33 | { 34 | 35 | 36 | value = value.replaceAll("-", "_"); 37 | value = value.replaceAll("^\\s+",""); 38 | value = value.replaceAll("\\s+$",""); 39 | return (R)Enum.valueOf(this.getRange(), value); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/model/level3/CovalentBindingFeature.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.model.level3; 2 | 3 | /** 4 | * Definition: An entity feature that represent the covalently bound state of a physical entity. 5 | * 6 | * Rationale: Most frequent covalent modifications to proteins and DNA, such as phosphorylation and 7 | * metylation are covered by the ModificationFeature class. In these cases, the added groups are 8 | * simple and stateless therefore they can be captured by a controlled vocabulary. In other cases, 9 | * such as ThiS-Thilacyl-disulfide, the covalently linked molecules are best represented as a 10 | * molecular complex. CovalentBindingFeature should be used to model such covalently linked 11 | * complexes. 12 | * 13 | * Usage: Using this construct, it is possible to represent small molecules as a covalent complex of 14 | * two other small molecules. The demarcation of small molecules is a general problem and is 15 | * delegated to small molecule databases.The best practice is not to model using covalent complexes 16 | * unless at least one of the participants is a protein, DNA or RNA. 17 | * 18 | * Examples: disulfide bond UhpC + glc-6P -> Uhpc-glc-6p acetyl-ACP -> decenoyl-ACP charged tRNA 19 | */ 20 | public interface CovalentBindingFeature extends BindingFeature, ModificationFeature 21 | { 22 | 23 | } -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level2/modulationImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level2; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level2.catalysis; 5 | import org.biopax.paxtools.model.level2.entity; 6 | import org.biopax.paxtools.model.level2.modulation; 7 | import org.biopax.paxtools.model.level2.process; 8 | import org.biopax.paxtools.util.IllegalBioPAXArgumentException; 9 | 10 | /** 11 | */ 12 | class modulationImpl extends controlImpl implements modulation 13 | { 14 | // ------------------------ INTERFACE METHODS ------------------------ 15 | 16 | 17 | // --------------------- Interface BioPAXElement --------------------- 18 | 19 | public Class getModelInterface() 20 | { 21 | return modulation.class; 22 | } 23 | 24 | // -------------------------- OTHER METHODS -------------------------- 25 | 26 | // --------------------- ACCESORS and MUTATORS--------------------- 27 | protected void checkCONTROLLED(entity CONTROLLED) 28 | { 29 | //this has to be a conversion 30 | if (!(CONTROLLED instanceof catalysis)) 31 | { 32 | throw new IllegalBioPAXArgumentException( 33 | "Controlled can only be a catalysis"); 34 | } 35 | } 36 | 37 | 38 | protected boolean checkCONTROLLED(process controlled) 39 | { 40 | return controlled instanceof catalysis; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /paxtools-core/src/main/java/org/biopax/paxtools/impl/level3/DeltaGImpl.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.impl.level3; 2 | 3 | import org.biopax.paxtools.model.BioPAXElement; 4 | import org.biopax.paxtools.model.level3.DeltaG; 5 | 6 | import static java.lang.Float.compare; 7 | 8 | 9 | public class DeltaGImpl extends ChemicalConstantImpl implements DeltaG { 10 | 11 | private float deltaGPrime0 = UNKNOWN_FLOAT; 12 | 13 | 14 | public DeltaGImpl() { 15 | } 16 | 17 | // 18 | // BioPAXElement interface implementation 19 | // 20 | //////////////////////////////////////////////////////////////////////////// 21 | public Class getModelInterface() { 22 | return DeltaG.class; 23 | } 24 | 25 | 26 | protected boolean semanticallyEquivalent(BioPAXElement element) { 27 | return super.semanticallyEquivalent(element) && (compare(((DeltaG) element).getDeltaGPrime0(), deltaGPrime0) == 0); 28 | } 29 | 30 | 31 | public int equivalenceCode() { 32 | return super.equivalenceCode()+ 33 | 29 + deltaGPrime0 != +0.0f ? 34 | Float.floatToIntBits(deltaGPrime0) : 0; 35 | } 36 | 37 | public float getDeltaGPrime0() { 38 | return deltaGPrime0; 39 | } 40 | 41 | public void setDeltaGPrime0(float deltaGPrime0) { 42 | this.deltaGPrime0 = deltaGPrime0; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /pattern/src/main/java/org/biopax/paxtools/pattern/miner/CSCOThroughDegradationMiner.java: -------------------------------------------------------------------------------- 1 | package org.biopax.paxtools.pattern.miner; 2 | 3 | import org.biopax.paxtools.pattern.Pattern; 4 | import org.biopax.paxtools.pattern.PatternBox; 5 | 6 | /** 7 | * Miner for the degradation pattern. 8 | * @author Ozgun Babur 9 | */ 10 | public class CSCOThroughDegradationMiner extends AbstractSIFMiner 11 | { 12 | /** 13 | * Constructor that sets name and description. 14 | */ 15 | public CSCOThroughDegradationMiner() 16 | { 17 | super(SIFEnum.CONTROLS_STATE_CHANGE_OF); 18 | } 19 | 20 | /** 21 | * Constructs the pattern. 22 | * @return pattern 23 | */ 24 | @Override 25 | public Pattern constructPattern() 26 | { 27 | return PatternBox.controlsStateChangeThroughDegradation(); 28 | } 29 | 30 | @Override 31 | public String getSourceLabel() 32 | { 33 | return "upstream ER"; 34 | } 35 | 36 | @Override 37 | public String getTargetLabel() 38 | { 39 | return "downstream ER"; 40 | } 41 | 42 | @Override 43 | public String[] getMediatorLabels() 44 | { 45 | return new String[]{"Control", "Conversion"}; 46 | } 47 | 48 | @Override 49 | public String[] getSourcePELabels() 50 | { 51 | return new String[]{"upstream SPE", "upstream PE"}; 52 | } 53 | 54 | @Override 55 | public String[] getTargetPELabels() 56 | { 57 | return new String[]{"input PE", "input SPE"}; 58 | } 59 | } 60 | --------------------------------------------------------------------------------