Package org.rcsb.strucmotif.domain.query
Class QueryBuilder
java.lang.Object
org.rcsb.strucmotif.domain.query.QueryBuilder
The entry point to create
MotifSearchQuery instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassParameters are considered mandatory arguments (in the sense that some value has to be given - nonetheless, default values will be used).classOptional parameters of the algorithm. -
Constructor Summary
ConstructorsConstructorDescriptionQueryBuilder(StructureDataProvider structureDataProvider, KruskalMotifPruner kruskalMotifPruner, NoOperationMotifPruner noOperationMotifPruner, MotifSearchRuntime motifSearchRuntime, MotifSearchConfig motifSearchConfig) Construct a new query builder. -
Method Summary
Modifier and TypeMethodDescriptiondefineByFile(InputStream inputStream) Routine if stream of structure data contains extracted motif.defineByFileAndSelection(InputStream inputStream, List<LabelSelection> selection) Define a motif based on a stream of structure data and a selection of components.defineByPdbIdAndSelection(String structureIdentifier, List<LabelSelection> selection) Define a motif based on the id of the reference structure and a selection of components.defineByStructureAndSelection(Structure structure, List<LabelSelection> labelSelections) Routine if structure files contains extracted motif.
-
Constructor Details
-
QueryBuilder
@Autowired public QueryBuilder(StructureDataProvider structureDataProvider, KruskalMotifPruner kruskalMotifPruner, NoOperationMotifPruner noOperationMotifPruner, MotifSearchRuntime motifSearchRuntime, MotifSearchConfig motifSearchConfig) Construct a new query builder.- Parameters:
structureDataProvider- injectable structure providerkruskalMotifPruner- injectable motif prunernoOperationMotifPruner- injectable nop motif prunermotifSearchRuntime- injectable runtimemotifSearchConfig- injectable config
-
-
Method Details
-
defineByPdbIdAndSelection
public QueryBuilder.MandatoryBuilder defineByPdbIdAndSelection(String structureIdentifier, List<LabelSelection> selection) Define a motif based on the id of the reference structure and a selection of components.- Parameters:
structureIdentifier- the id to acquireselection- which components to select to define the motif- Returns:
- mandatory parameter step
- Throws:
IllegalQueryDefinitionException- if chains/residues aren't found or if distance constraints are violated
-
defineByFileAndSelection
public QueryBuilder.MandatoryBuilder defineByFileAndSelection(InputStream inputStream, List<LabelSelection> selection) Define a motif based on a stream of structure data and a selection of components.- Parameters:
inputStream- the data to readselection- which components to select to define the motif- Returns:
- mandatory parameter step
- Throws:
IllegalQueryDefinitionException- if chains/residues aren't found or if distance constraints are violated
-
defineByStructureAndSelection
public QueryBuilder.MandatoryBuilder defineByStructureAndSelection(Structure structure, List<LabelSelection> labelSelections) Routine if structure files contains extracted motif. Checks that the structure contains a reasonable number of components to rule out erroneous arguments.- Parameters:
structure- the file to ready - all components are considered the motiflabelSelections- the residues of interest- Returns:
- mandatory parameter step
- Throws:
IllegalQueryDefinitionException- if chains/residues aren't found or if distance constraints are violated
-
defineByFile
Routine if stream of structure data contains extracted motif.- Parameters:
inputStream- the data to ready - all components are considered the motif- Returns:
- mandatory parameter step
-