ndb_adapter package

Submodules

ndb_adapter.advanced_search_options module

class ndb_adapter.advanced_search_options.AdvancedSearchOptions(report_type: ndb_adapter.enums.ReportType = <ReportType.NDBStatus: <class 'ndb_adapter.search_report.NDBStatusReport'>>, statistics: bool = True)[source]

Bases: object

Class needed for advanced search option parameters

get(stats: bool = False) → dict[source]

Gets dictionary of advanced search options.

Parameters:stats (bool) – tells if dictionary should contain statistics
Returns:dictionary with options
Return type:dict
get_author()[source]

Gets authors options

Returns:tuple of values
Return type:(AndOr, str)
get_base()[source]

Gets nucleic acid modification base options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_base_pair()[source]

Gets RNA base pair interaction options

Returns:tuple of values
Return type:(AndOr, BasePair)
get_base_pair_relative_freq()[source]

Gets RNA base pair relative frequency interaction options

Returns:tuple of values
Return type:(AndOr, BasePair, GreaterLower, float)
get_base_phosphate()[source]

Gets RNA base phosphate interaction options

Returns:tuple of values
Return type:(AndOr, BasePhosphate)
get_base_phosphate_relative_freq()[source]

Gets RNA base phosphate relative frequency interaction options

Returns:tuple of values
Return type:(AndOr, BasePhosphate, GreaterLower, float)
get_base_stack()[source]

Gets RNA base stack interaction options

Returns:tuple of values
Return type:(AndOr, BaseStack)
get_base_stack_relative_freq()[source]

Gets RNA base stack relative frequency interaction options

Returns:tuple of values
Return type:(AndOr, BaseStack, GreaterLower, float)
get_cell_a()[source]

Gets cell a options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_alpha()[source]

Gets cell alpha options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_b()[source]

Gets cell b options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_beta()[source]

Gets cell beta options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_c()[source]

Gets cell c options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_gamma()[source]

Gets cell gamma options

Returns:tuple of values
Return type:(AndOr, GreaterLowerEqual, Optional[float])
get_cell_r_factor()[source]

Gets cell r factor options

Returns:tuple of values
Return type:(AndOr, RFactor)
get_cell_resolution()[source]

Gets cell resolution options

Returns:tuple of values
Return type:(AndOr, Optional[float])
get_conformation()[source]

Gets nucleic acid conformation options

Returns:tuple of values
Return type:(AndOr, ConformationType)
get_crystal_structure()[source]

Gets tuple of crystal structure options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_dna()[source]

Gets tuple of dna options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_drug()[source]

Gets tuple of drug options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_drug_binding()[source]

Gets tuple of drug binding options

Returns:tuple of values
Return type:(AndOr, List[DrugBinding])
get_enzyme_binding()[source]

Gets enzyme bindings functions options

Returns:tuple of values
Return type:(AndOr, DnaRnaEither, AndOr, List[EnzymeFunction])
get_hairpin_loop_motif()[source]

Gets RNA hairpin loop motif options

Returns:tuple of values
Return type:(AndOr, List[HairpinLoopMotif])
get_hybrid()[source]

Gets tuple of hybrid options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_internal_loop_motif()[source]

Gets RNA internal loop motif options

Returns:tuple of values
Return type:(AndOr, List[InternalLoopMotif])
get_ligand()[source]

Gets tuple of ligand options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_ligand_id()[source]

Gets tuple of ligand id options

Returns:tuple of values
Return type:(AndOr, str)
get_ligand_name()[source]

Gets tuple of ligand name options

Returns:tuple of values
Return type:(AndOr, str)
get_na_features()[source]

Gets nucleic acid features options

Returns:tuple of values
Return type:(AndOr, AndOr, List[NaFeature])
get_na_pattern()[source]

Gets nucleic acid sequence pattern options

Returns:tuple of values
Return type:(AndOr, str)
get_ndb_id() → str[source]

Gets NDB ID options

Returns:NDB ID
Return type:str
get_nmr()[source]

Gets nmr options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_nmr_restraints()[source]

Gets nmr restraints available options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_non_redundant_list()[source]

Gets RNA non redundant list cutoff options

Returns:tuple of values
Return type:(AndOr, ResolutionCutoff)
get_oligo_seq_between()[source]

Gets oligonucleotide between options

Returns:tuple of values
Return type:(AndOr, Optional[int], Optional[int])
get_other_binding()[source]

Gets other bindings functions options

Returns:tuple of values
Return type:(AndOr, DnaRnaEither, AndOr, List[OtherFunction])
get_pdb_id() → str[source]

Gets PDB ID options

Returns:PDB ID
Return type:str
get_phosphate()[source]

Gets nucleic acid modification phosphate options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_protein()[source]

Gets tuple of protein options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_publication_year()[source]

Gets year options

Returns:tuple of values
Return type:(AndOr, str)
get_regulatory_binding()[source]

Gets regulatory bindings functions options

Returns:tuple of values
Return type:(AndOr, DnaRnaEither, AndOr, List[RegulatoryFunction])
get_released()[source]

Gets released since date options

Returns:tuple of values
Return type:(AndOr, Optional[date])
get_report_type() → ndb_adapter.enums.ReportType[source]

Gets report type options

Returns:report type value
Return type:ReportType
get_rna()[source]

Gets tuple of rna options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_space_group()[source]

Gets space group options

Returns:tuple of values
Return type:(AndOr, SpaceGroup)
get_statistics() → bool[source]

Gets advanced search if statistic

Returns:statistic true/false
Return type:bool
get_strand_desc()[source]

Gets nucleic acid strand description options

Returns:tuple of values
Return type:(AndOr, List[StrandDescription])
get_structural_binding()[source]

Gets structural bindings functions options

Returns:tuple of values
Return type:(AndOr, DnaRnaEither, AndOr, List[StructuralFunction])
get_structure_factors()[source]

Gets structure factor available options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
get_sugar()[source]

Gets nucleic acid modification sugar options

Returns:tuple of values
Return type:(AndOr, YesNoIgnore)
reset() → None[source]

Reset advanced search options to defaults

Returns:None
set_author(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, author: str = '') → None[source]

Sets authors in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • author (str) – authors string (default value = ‘’)
Returns:

None

set_base(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets nucleic acid modification base in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_base_pair(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_pair: ndb_adapter.enums.BasePair = <BasePair.Empty: ''>) → None[source]

Sets RNA base pair interaction in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_pair (BasePair) – base pair interaction to set (default value = BasePair.Empty)
Returns:

None

set_base_pair_relative_freq(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_pair: ndb_adapter.enums.BasePair = <BasePair.Empty: ''>, gt_lt: ndb_adapter.enums.GreaterLower = <GreaterLower.GreaterEqual: 'gtEq'>, freq: float = 0.1) → None[source]

Sets RNA base pair relative frequency interaction in options More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#relF

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_pair (BasePair) – base pair interaction to set (default value = BasePair.Empty)
  • gt_lt (GreaterLower) – greater lower for relative frequency (default value = GreaterLower.GreaterEqual)
  • freq (float) – relative frequency value (default value = 0.1)
Returns:

None

set_base_phosphate(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_phosphate: ndb_adapter.enums.BasePhosphate = <BasePhosphate.Empty: ''>) → None[source]

Sets RNA base phosphate interaction in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_phosphate (BasePhosphate) – base phosphate interaction to set (default value = BasePhosphate.Empty)
Returns:

None

set_base_phosphate_relative_freq(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_phosphate: ndb_adapter.enums.BasePhosphate = <BasePhosphate.Empty: ''>, gt_lt: ndb_adapter.enums.GreaterLower = <GreaterLower.GreaterEqual: 'gtEq'>, freq: float = 0.1) → None[source]

Sets RNA base phosphate relative frequency interaction in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#relF

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_phosphate (BasePhosphate) – base phosphate interaction to set (default value = BasePhosphate.Empty)
  • gt_lt (GreaterLower) – greater lower for relative frequency (default value = GreaterLower.GreaterEqual)
  • freq (float) – relative frequency value (default value = 0.1)
Returns:

None

set_base_stack(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_stack: ndb_adapter.enums.BaseStack = <BaseStack.Empty: ''>) → None[source]

Sets RNA base stack interaction in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_stack (BaseStack) – base stack interaction to set (default value = BaseStack.Empty)
Returns:

None

set_base_stack_relative_freq(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, base_stack: ndb_adapter.enums.BaseStack = <BaseStack.Empty: ''>, gt_lt: ndb_adapter.enums.GreaterLower = <GreaterLower.GreaterEqual: 'gtEq'>, freq: float = 0.1) → None[source]

Sets RNA base stack relative frequency interaction in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#relF

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • base_stack (BasePhosphate) – base phosphate interaction to set (default value = BaseStack.Empty)
  • gt_lt (GreaterLower) – greater lower for relative frequency (default value = GreaterLower.GreaterEqual)
  • freq (float) – relative frequency value (default value = 0.1)
Returns:

None

set_cell_a(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell a angstroms in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float a value in angstroms (default value = None)
Returns:

None

set_cell_alpha(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell alpha in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float alpha value (default value = None)
Returns:

None

set_cell_b(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell b angstroms in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float b value in angstroms (default value = None)
Returns:

None

set_cell_beta(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell beta in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float beta value (default value = None)
Returns:

None

set_cell_c(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell c angstroms in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float c value in angstroms (default value = None)
Returns:

None

set_cell_gamma(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, gt_lt_eq: ndb_adapter.enums.GreaterLowerEqual = <GreaterLowerEqual.Equal: 'eq'>, value: typing.Union[float, NoneType] = None) → None[source]

Sets cell beta in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • gt_lt_eq (GreaterLowerEqual) – space group to choose (default value = .Empty)
  • value (Optional[float]) – optional float gamma value (default value = None)
Returns:

None

set_cell_r_factor(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, r_factor: ndb_adapter.enums.RFactor = <RFactor.Empty: ''>) → None[source]

Sets cell r factor in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • r_factor (RFactor) – r factor value in angstroms (default value = RFactor.Empty)
Returns:

None

set_cell_resolution(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, better_than: typing.Union[float, NoneType] = None) → None[source]

Sets cell resolution angstroms in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • better_than (Optional[float]) – optional float resolution value in angstroms (default value = None)
Returns:

None

set_conformation(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, conformation: ndb_adapter.enums.ConformationType = <ConformationType.Empty: ''>) → None[source]

Sets nucleic acid conformation in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • conformation (ConformationType) – conformation value (default value = ConformationType.Empty)
Returns:

None

set_crystal_structure(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets crystal structure in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_dna(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets dna in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_drug(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets drug in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_drug_binding(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *types: typing.List[ndb_adapter.enums.DrugBinding]) → None[source]

Sets drug binding in options - to get it work ensure to call set_drug()!!!

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • types (List[DrugBinding]) – list of DrugBinding that should be in query, allowed as many as you want
Returns:

None

set_enzyme_binding(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, dna_rna_either: ndb_adapter.enums.DnaRnaEither = <DnaRnaEither.Either: 'EITHER'>, func_clause: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *functions: typing.List[ndb_adapter.enums.EnzymeFunction]) → None[source]

Sets enzyme bindings functions in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • dna_rna_either (DnaRnaEither) – tells if it should be ‘dna’, ‘rna’ or ‘either’ in query (default value = .Either)
  • func_clause (AndOr) – connector between functions in query
  • functions (List[EnzymeFunction]) – list of EnzymeFunction that should be in query, allowed as many as you want
Returns:

None

set_hairpin_loop_motif(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *motifs: typing.List[ndb_adapter.enums.HairpinLoopMotif]) → None[source]

Sets RNA hairpin loop motif in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#motif

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • motifs (List[HairpinLoopMotif]) – list of HairpinLoopMotif that should be in query, allowed as many as you want
Returns:

None

set_hybrid(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets hybrid in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_internal_loop_motif(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *motifs: typing.List[ndb_adapter.enums.InternalLoopMotif]) → None[source]

Sets RNA internal loop motif in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#motif

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • motifs (List[InternalLoopMotif]) – list of InternalLoopMotif that should be in query, allowed as many as you want
Returns:

None

set_ligand(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets ligand in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_ligand_id(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, ligand_id: str = '') → None[source]

Sets ligand id in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • ligand_id (str) – ligand ID (default value = ‘’)
Returns:

None

set_ligand_name(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, ligand_name: str = '') → None[source]

Sets ligand name in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • ligand_name (str) – ligand name (default value = ‘’)
Returns:

None

set_na_features(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, func_clause: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *features: typing.List[ndb_adapter.enums.NaFeature]) → None[source]

Sets nucleic acid features in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • func_clause (AndOr) – connector between features in query
  • features (List[NaFeature]) – list of NaFeature that should be in query, allowed as many as you want
Returns:

None

set_na_pattern(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, pattern: str = '') → None[source]

Sets nucleic acid sequence pattern in options.

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • pattern (str) – pattern value (default value = ‘’)
Returns:

None

set_ndb_id(ndb_id: str = '') → None[source]

Sets NDB ID in options

Parameters:ndb_id (str) – NDB ID e.g. NA2326 (default value = ‘’)
Returns:None
set_nmr(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets nmr in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_nmr_restraints(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets nmr restraints available in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_non_redundant_list(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, resolution: ndb_adapter.enums.ResolutionCutoff = <ResolutionCutoff.Empty: ''>) → None[source]

Sets RNA non redundant list cutoff in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#nrl

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • resolution (ResolutionCutoff) – resolution value (default value = ResolutionCutoff.Empty)
Returns:

None

set_oligo_seq_between(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, from_len: typing.Union[int, NoneType] = None, to_len: typing.Union[int, NoneType] = None) → None[source]

Sets oligonucleotide between “from_len” to “to_len” in options.

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • from_len (Optional[int]) – from oligonucleotide value (default value = None)
  • to_len (Optional[int]) – to oligonucleotide value (default value = None)
Returns:

None

set_other_binding(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, dna_rna_either: ndb_adapter.enums.DnaRnaEither = <DnaRnaEither.Either: 'EITHER'>, func_clause: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *functions: typing.List[ndb_adapter.enums.OtherFunction]) → None[source]

Sets other bindings functions in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • dna_rna_either (DnaRnaEither) – tells if it should be ‘dna’, ‘rna’ or ‘either’ in query (default value = .Either)
  • func_clause (AndOr) – connector between functions in query
  • functions (List[OtherFunction]) – list of OtherFunction that should be in query, allowed as many as you want
Returns:

None

set_pdb_id(pdb_id: str = '') → None[source]

Sets PDB ID in options

Parameters:pdb_id (str) – PDB ID e.g. 4JRC (default value = ‘’)
Returns:None
set_phosphate(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets nucleic acid modification phosphate in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_protein(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets protein in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_publication_year(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, year: str = '') → None[source]

Sets authors in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • year (str) – year string (default value = ‘’)
Returns:

None

set_regulatory_binding(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, dna_rna_either: ndb_adapter.enums.DnaRnaEither = <DnaRnaEither.Either: 'EITHER'>, func_clause: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *functions: typing.List[ndb_adapter.enums.RegulatoryFunction]) → None[source]

Sets regulatory bindings functions in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • dna_rna_either (DnaRnaEither) – tells if it should be ‘dna’, ‘rna’ or ‘either’ in query (default value = .Either)
  • func_clause (AndOr) – connector between functions in query
  • functions (List[RegulatoryFunction]) – list of RegulatoryFunction that should be in query, allowed as many as you want
Returns:

None

set_released(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, since_date: typing.Union[datetime.date, NoneType] = None) → None[source]

Sets released since date in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • since_date (Optional[date]) – released since date (default value = None)
Returns:

None

set_report_type(report: ndb_adapter.enums.ReportType = <ReportType.NDBStatus: <class 'ndb_adapter.search_report.NDBStatusReport'>>) → None[source]

Sets report type in search object

Parameters:report (ReportType) – report type to set
Returns:None
set_rna(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets rna in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_space_group(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, space_group: ndb_adapter.enums.SpaceGroup = <SpaceGroup.Empty: ''>) → None[source]

Sets space group in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • space_group (SpaceGroup) – space group to choose (default value = .Ignore)
Returns:

None

set_statistics(statistics: bool = True) → None[source]

Sets if is statistics

Parameters:statistics (bool) – statistics value (default value = True)
Returns:None
set_strand_desc(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *descriptions: typing.List[ndb_adapter.enums.StrandDescription]) → None[source]

Sets nucleic acid strand description in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • descriptions (List[StrandDescription]) – list of StrandDescription that should be in query, allowed as many as you want
Returns:

None

set_structural_binding(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, dna_rna_either: ndb_adapter.enums.DnaRnaEither = <DnaRnaEither.Either: 'EITHER'>, func_clause: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, *functions: typing.List[ndb_adapter.enums.StructuralFunction]) → None[source]

Sets structural bindings functions in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • dna_rna_either (DnaRnaEither) – tells if it should be ‘dna’, ‘rna’ or ‘either’ in query (default value = .Either)
  • func_clause (AndOr) – connector between functions in query
  • functions (List[StructuralFunction]) – list of StructuralFunction that should be in query, allowed as many as you want
Returns:

None

set_structure_factors(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets structure factor available in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

set_sugar(and_or: ndb_adapter.enums.AndOr = <AndOr.And: 'AND'>, yes_no_ignore: ndb_adapter.enums.YesNoIgnore = <YesNoIgnore.Ignore: 'Ignore'>) → None[source]

Sets nucleic acid modification sugar in options

Parameters:
  • and_or (AndOr) – tells if it should be ‘and’ or ‘or’ in query (default value = AndOr.And)
  • yes_no_ignore (YesNoIgnore) – tells if it should ‘be’, ‘not be’ or ‘be ignored’ in query (default value = .Ignore)
Returns:

None

ndb_adapter.dna_search_options module

class ndb_adapter.dna_search_options.DnaSearchOptions[source]

Bases: ndb_adapter.search_options.SearchOptions

Class for dna search options

get_structural_features() → ndb_adapter.enums.StructuralFeatures[source]

Gets structural features options

Returns:structural feature
Return type:StructuralFeatures
set_structural_features(feature: ndb_adapter.enums.StructuralFeatures = <StructuralFeatures.All: 'all'>) → None[source]

Sets structural features in options

Parameters:feature (StructuralFeatures) – structural feature (default value = StructuralFeatures.All)
Returns:None

ndb_adapter.enums module

class ndb_adapter.enums.AndOr[source]

Bases: enum.Enum

Enum to handle “and”, “or” in query

Variables:
  • And – and in query
  • Or – or in query
And = <AndOr.And: 'AND'>
Or = <AndOr.Or: 'OR'>
class ndb_adapter.enums.BasePair[source]

Bases: enum.Enum

Enum for base pair interaction options in query. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#bp

Variables:
  • Empty – empty value in query
  • CWW – (cis Watson-Crick/Watson-Crick) in query
  • TWW – (trans Watson-Crick/Watson-Crick) in query
  • CWH – (cis Watson-Crick/Hoogsteen) in query
  • TWH – (trans Watson-Crick/Hoogsteen) in query
  • CWS – (cis Watson-Crick/Sugar Edge) in query
  • TWS – (trans Watson-Crick/Sugar Edge) in query
  • CHH – (cis Hoogsteen/Hoogsteen) in query
  • THH – (trans Hoogsteen/Hoogsteen) in query
  • CHS – (cis Hoogsteen/Sugar Edge) in query
  • THS – (trans Hoogsteen/Sugar Edge) in query
  • CSS – (cis Sugar Edge/Sugar Edge) in query
  • TSS – (trans Sugar Edge/Sugar Edge) in query
CHH = <BasePair.CHH: 'cHH'>
CHS = <BasePair.CHS: 'cHS'>
CSS = <BasePair.CSS: 'cSS'>
CWH = <BasePair.CWH: 'cWH'>
CWS = <BasePair.CWS: 'cWS'>
CWW = <BasePair.CWW: 'cWW'>
Empty = <BasePair.Empty: ''>
THH = <BasePair.THH: 'tHH'>
THS = <BasePair.THS: 'tHS'>
TSS = <BasePair.TSS: 'tSS'>
TWH = <BasePair.TWH: 'tWH'>
TWS = <BasePair.TWS: 'tWS'>
TWW = <BasePair.TWW: 'tWW'>
class ndb_adapter.enums.BasePhosphate[source]

Bases: enum.Enum

Enum for base phosphate interaction in query. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#bph

Variables:
  • Empty – empty values in query
  • BPh_1 – 1BPh (base-phosphate position 1) in query
  • BPh_2 – 2BPh (base-phosphate position 2) in query
  • BPh_3 – 3BPh (base-phosphate position 3) in query
  • BPh_4 – 4BPh (base-phosphate position 4) in query
  • BPh_5 – 5BPh (base-phosphate position 5) in query
  • BPh_6 – 6BPh (base-phosphate position 6) in query
  • BPh_7 – 7BPh (base-phosphate position 7) in query
  • BPh_8 – 8BPh (base-phosphate position 8) in query
  • BPh_9 – 9BPh (base-phosphate position 9) in query
  • BPh_0 – 0BPh (base-phosphate position 10) in query
BPh_0 = <BasePhosphate.BPh_0: '0BPh'>
BPh_1 = <BasePhosphate.BPh_1: '1BPh'>
BPh_2 = <BasePhosphate.BPh_2: '2BPh'>
BPh_3 = <BasePhosphate.BPh_3: '3BPh'>
BPh_4 = <BasePhosphate.BPh_4: '4BPh'>
BPh_5 = <BasePhosphate.BPh_5: '5BPh'>
BPh_6 = <BasePhosphate.BPh_6: '6BPh'>
BPh_7 = <BasePhosphate.BPh_7: '7BPh'>
BPh_8 = <BasePhosphate.BPh_8: '8BPh'>
BPh_9 = <BasePhosphate.BPh_9: '9BPh'>
Empty = <BasePhosphate.Empty: ''>
class ndb_adapter.enums.BaseStack[source]

Bases: enum.Enum

Enum for base stack interaction in query. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#bs

Variables:
  • Empty – empty value in query
  • S_33 – s33 (stack, 3′ face on 3′ face) in query
  • S_35 – s35 (stack, 3′ face on 5′ face) in query
  • S_55 – s55 (stack, 5′ face on 5′ face) in query
Empty = <BaseStack.Empty: ''>
S_33 = <BaseStack.S_33: 's33'>
S_35 = <BaseStack.S_35: 's35'>
S_55 = <BaseStack.S_55: 's55'>
class ndb_adapter.enums.ConformationType[source]

Bases: enum.Enum

Enum for conformation type in query

Variables:
  • Empty – empty value in query
  • All – all conformations in query
  • A – A conformation in query
  • B – B conformation in query
  • RH – RH conformation in query
  • T – T conformation in query
  • U – U conformation in query
  • Z – Z conformation in query
A = <ConformationType.A: 'A'>
All = <ConformationType.All: 'all'>
B = <ConformationType.B: 'B'>
Empty = <ConformationType.Empty: ''>
RH = <ConformationType.RH: 'RH'>
T = <ConformationType.T: 'T'>
U = <ConformationType.U: 'U'>
Z = <ConformationType.Z: 'Z'>
class ndb_adapter.enums.DnaRnaEither[source]

Bases: enum.Enum

Enum to handle “dna”, “rna”, “either” in query

Variables:
  • DNA – dna in query
  • RNA – rna in query
  • Either – either in query
DNA = <DnaRnaEither.DNA: 'DNA'>
Either = <DnaRnaEither.Either: 'EITHER'>
RNA = <DnaRnaEither.RNA: 'RNA'>
class ndb_adapter.enums.DrugBinding[source]

Bases: enum.Enum

Enum to handle nucleic acid drug bindings options in query

Variables:
BisIntercalation = <DrugBinding.BisIntercalation: 'Bis-Intercalation'>
CovalentMetalBonds = <DrugBinding.CovalentMetalBonds: 'Covalent Metal Bonds'>
DoubleMajorGrooveBinder = <DrugBinding.DoubleMajorGrooveBinder: 'Double Major Groove Binder'>
DoubleMinorGrooveBinder = <DrugBinding.DoubleMinorGrooveBinder: 'Double Minor Groove Binder'>
Empty = <DrugBinding.Empty: ''>
Intercalation = <DrugBinding.Intercalation: 'Intercalation'>
IntercalationCovalent = <DrugBinding.IntercalationCovalent: 'Intercalation, Covalent'>
IntercalationMajorGrooveBinder = <DrugBinding.IntercalationMajorGrooveBinder: 'Intercalation, Major Groove Binder'>
IntercalationMinorGrooveBinder = <DrugBinding.IntercalationMinorGrooveBinder: 'Intercalation, Minor Groove Binder'>
MajorGrooveBinder = <DrugBinding.MajorGrooveBinder: 'Major Groove Binder'>
MajorGrooveBinderCovalent = <DrugBinding.MajorGrooveBinderCovalent: 'Major Groove Binder, Covalent'>
MinorGrooveBinder = <DrugBinding.MinorGrooveBinder: 'Minor Groove Binder'>
MinorGrooveBinderCovalent = <DrugBinding.MinorGrooveBinderCovalent: 'Minor Groove Binder, Covalent'>
OutsideBinder = <DrugBinding.OutsideBinder: 'Outside binder'>
OutsideBinderCovalent = <DrugBinding.OutsideBinderCovalent: 'Outside binder, Covalent'>
class ndb_adapter.enums.EnzymeFunction[source]

Bases: enum.Enum

Enum for enzyme function in query

Variables:
All = <EnzymeFunction.All: 'ENZYME'>
DNAEndonuclease = <EnzymeFunction.DNAEndonuclease: 'DNA NUCLEASE/ENDONUCLEASE'>
DNAExonuclease = <EnzymeFunction.DNAExonuclease: 'DNA NUCLEASE/EXONUCLEASE'>
DNAPolymerase = <EnzymeFunction.DNAPolymerase: 'DNA POLYMERASE'>
DNAReverseTranscriptase = <EnzymeFunction.DNAReverseTranscriptase: 'DNA POLYMERASE/REVERSE TRANSCRIPTASE'>
Empty = <EnzymeFunction.Empty: ''>
Glycosylase = <EnzymeFunction.Glycosylase: 'GLYCOSYLASE'>
Helicase = <EnzymeFunction.Helicase: 'HELICASE'>
Integrase = <EnzymeFunction.Integrase: 'RECOMBINASE/INTEGRASE'>
Invertase = <EnzymeFunction.Invertase: 'RECOMBINASE/INVERTASE'>
Kinase = <EnzymeFunction.Kinase: 'KINASE'>
Ligase = <EnzymeFunction.Ligase: 'LIGASE'>
Lyase = <EnzymeFunction.Lyase: 'LYASE'>
MRNACapping = <EnzymeFunction.MRNACapping: 'MRNA CAPPING'>
MethylaseMethytransferase = <EnzymeFunction.MethylaseMethytransferase: 'METHYLASE OR METHYLTRANSFERASE'>
Other = <EnzymeFunction.Other: 'OTHER'>
Phosphatase = <EnzymeFunction.Phosphatase: 'PHOSPHATASE'>
RNAEndonuclease = <EnzymeFunction.RNAEndonuclease: 'RNA NUCLEASE/ENDONUCLEASE'>
RNAExonuclease = <EnzymeFunction.RNAExonuclease: 'RNA NUCLEASE/EXONUCLEASE'>
RNAPolymerase = <EnzymeFunction.RNAPolymerase: 'RNA POLYMERASE'>
RecombinaseOther = <EnzymeFunction.RecombinaseOther: 'RECOMBINASE/OTHER'>
Resolvase = <EnzymeFunction.Resolvase: 'RECOMBINASE/RESOLVASE'>
Synthetase = <EnzymeFunction.Synthetase: 'SYNTHETASE'>
TRNAModifying = <EnzymeFunction.TRNAModifying: 'TRNA MODIFYING'>
Thrombin = <EnzymeFunction.Thrombin: 'THROMBIN'>
Topoisomerase = <EnzymeFunction.Topoisomerase: 'TOPOISOMERASE'>
Transposase = <EnzymeFunction.Transposase: 'RECOMBINASE/TRANSPOSASE'>
class ndb_adapter.enums.ExpMethod[source]

Bases: enum.Enum

Enum to handle experimental method in query

Variables:
  • All – all in query
  • XRAY – x-ray in query
  • NMR – nmr in query
All = <ExpMethod.All: 'all'>
NMR = <ExpMethod.NMR: 'nmr'>
XRAY = <ExpMethod.XRAY: 'x-ray'>
class ndb_adapter.enums.GreaterLower[source]

Bases: enum.Enum

Enum to handle “>=”, “<=” in query

Variables:
GreaterEqual = <GreaterLower.GreaterEqual: 'gtEq'>
LowerEqual = <GreaterLower.LowerEqual: 'ltEq'>
class ndb_adapter.enums.GreaterLowerEqual[source]

Bases: enum.Enum

Enum to handle “>=”, “<=”, “==” in query

Variables:
Equal = <GreaterLowerEqual.Equal: 'eq'>
GreaterEqual = <GreaterLowerEqual.GreaterEqual: 'gtEq'>
LowerEqual = <GreaterLowerEqual.LowerEqual: 'ltEq'>
class ndb_adapter.enums.HairpinLoopMotif[source]

Bases: enum.Enum

Enum for hairpin loop motif in query

Variables:
  • Empty – empty value in query
  • All – all motifs in query
  • TLoop – T-loop motif in query
  • GNRA – GNRA motif in query
  • UNCG – UNCG motif in query
All = <HairpinLoopMotif.All: 'All'>
Empty = <HairpinLoopMotif.Empty: ''>
GNRA = <HairpinLoopMotif.GNRA: 'GNRA'>
TLoop = <HairpinLoopMotif.TLoop: 'T-loop'>
UNCG = <HairpinLoopMotif.UNCG: 'UNCG'>
class ndb_adapter.enums.InternalLoopMotif[source]

Bases: enum.Enum

Enum for internal loop motif in query

Variables:
All = <InternalLoopMotif.All: 'All'>
CLoop = <InternalLoopMotif.CLoop: 'C-loop'>
DoubleSheared = <InternalLoopMotif.DoubleSheared: 'Double-sheared'>
Empty = <InternalLoopMotif.Empty: ''>
KinkTurn = <InternalLoopMotif.KinkTurn: 'Kink-turn'>
SarcinRicin = <InternalLoopMotif.SarcinRicin: 'Sarcin-ricin'>
TripleSheared = <InternalLoopMotif.TripleSheared: 'Triple-sheared'>
class ndb_adapter.enums.NaFeature[source]

Bases: enum.Enum

Enum for nucleic acid feature in query

Variables:
All = <NaFeature.All: 'loop'>
Bulge = <NaFeature.Bulge: 'bulge'>
Empty = <NaFeature.Empty: ''>
FourWayJunction = <NaFeature.FourWayJunction: 'holliday_junction'>
HairpinLoop = <NaFeature.HairpinLoop: 'hairpin loop'>
Hammerhead = <NaFeature.Hammerhead: 'hammerhead'>
InternalLoop = <NaFeature.InternalLoop: 'internal loop'>
MismatchBaseParing = <NaFeature.MismatchBaseParing: 'mismat'>
NonWatsonCrickBaseParing = <NaFeature.NonWatsonCrickBaseParing: 'type_11_pair'>
ThreeWayJunction = <NaFeature.ThreeWayJunction: 'three_way_junction'>
class ndb_adapter.enums.OtherFunction[source]

Bases: enum.Enum

Enum for other functions in query

Variables:
  • Empty – empty value in query
  • All – all functions in query
  • Antibiotic – antibiotic function in query
  • Antibody – antibody function in query
  • Other – other function in query
All = <OtherFunction.All: 'OTHER'>
Antibiotic = <OtherFunction.Antibiotic: 'Antibiotic'>
Antibody = <OtherFunction.Antibody: 'Antibody'>
Empty = <OtherFunction.Empty: ''>
Other = <OtherFunction.Other: 'Other'>
class ndb_adapter.enums.Polymer[source]

Bases: enum.Enum

Enums to handle polymer in query

Variables:
All = <Polymer.All: 'all'>
DNAOnly = <Polymer.DNAOnly: 'onlyDna'>
DrugDNA = <Polymer.DrugDNA: 'drugDna'>
HybridsChimera = <Polymer.HybridsChimera: 'hybNChimera'>
PeptideNucleicAcid = <Polymer.PeptideNucleicAcid: 'pepNucAcid'>
ProteinDNA = <Polymer.ProteinDNA: 'protDna'>
class ndb_adapter.enums.ProteinFunc[source]

Bases: enum.Enum

Enums to handle protein function in query

Variables:
  • All – all in query
  • Enzymes – enzymes function in query
  • Structural – structural function in query
  • Regulatory – regulatory function in query
  • Other – other function in query
All = <ProteinFunc.All: 'all'>
Enzymes = <ProteinFunc.Enzymes: 'enzymes'>
Other = <ProteinFunc.Other: 'other'>
Regulatory = <ProteinFunc.Regulatory: 'regulatory'>
Structural = <ProteinFunc.Structural: 'structural'>
class ndb_adapter.enums.RFactor[source]

Bases: enum.Enum

Enum to handle R-factor in query

Variables:
  • Empty – empty value in query
  • R_10 – 0.10 in query
  • R_15 – 0.15 in query
  • R_20 – 0.20 in query
  • R_25 – 0.25 in query
  • R_30 – 0.30 in query
  • R_35 – 0.35 in query
Empty = <RFactor.Empty: ''>
R_10 = <RFactor.R_10: '0.10'>
R_15 = <RFactor.R_15: '0.15'>
R_20 = <RFactor.R_20: '0.20'>
R_25 = <RFactor.R_25: '0.25'>
R_30 = <RFactor.R_30: '0.30'>
R_35 = <RFactor.R_35: '0.35'>
class ndb_adapter.enums.RegulatoryFunction[source]

Bases: enum.Enum

Enum for regulatory functions in query

Variables:
All = <RegulatoryFunction.All: 'REGULATORY'>
DnaRepairActivator = <RegulatoryFunction.DnaRepairActivator: 'DNA Repair Activator'>
DnaRepairRepressor = <RegulatoryFunction.DnaRepairRepressor: 'DNA Repair Repressor'>
Empty = <RegulatoryFunction.Empty: ''>
RecombinationActivator = <RegulatoryFunction.RecombinationActivator: 'Recombination Activator'>
RecombinationReporessor = <RegulatoryFunction.RecombinationReporessor: 'Recombination Repressor'>
ReplicationActivator = <RegulatoryFunction.ReplicationActivator: 'Replication Factor/Activator'>
ReplicationReporessor = <RegulatoryFunction.ReplicationReporessor: 'Replication Factor/Repressor'>
SpliceosomalProtein = <RegulatoryFunction.SpliceosomalProtein: 'Spliceosomal Protein'>
Transcription = <RegulatoryFunction.Transcription: 'Transcription Factor/General'>
TranscriptionActivator = <RegulatoryFunction.TranscriptionActivator: 'Transcription Factor/Activator'>
TranscriptionActivatorRepressor = <RegulatoryFunction.TranscriptionActivatorRepressor: 'Transcription Factor/Activator And Repressor'>
TranscriptionCoactivator = <RegulatoryFunction.TranscriptionCoactivator: 'Transcription Factor/Coactivator'>
TranscriptionCorepressor = <RegulatoryFunction.TranscriptionCorepressor: 'Transcription Factor/Corepressor'>
TranscriptionElongation = <RegulatoryFunction.TranscriptionElongation: 'Transcription Factor/Elongation'>
TranscriptionReporessor = <RegulatoryFunction.TranscriptionReporessor: 'Transcription Factor/Repressor'>
TranscriptionTermination = <RegulatoryFunction.TranscriptionTermination: 'Transcription Factor/Termination'>
TranslationElongation = <RegulatoryFunction.TranslationElongation: 'Translation Factor/Elongation'>
TranslationInitiator = <RegulatoryFunction.TranslationInitiator: 'Translation Factor/Initiator'>
TranslationTermination = <RegulatoryFunction.TranslationTermination: 'Translation Factor/Termination'>
class ndb_adapter.enums.ReportType[source]

Bases: enum.Enum

Enum representing advanced search report type - can be used to annotate return type of advanced search report

Variables:
BasePairParameter = <ReportType.BasePairParameter: <class 'ndb_adapter.search_report.BasePairParameterReport'>>
BasePairStepParameter = <ReportType.BasePairStepParameter: <class 'ndb_adapter.search_report.BasePairStepParameterReport'>>
CellDimensions = <ReportType.CellDimensions: <class 'ndb_adapter.search_report.CellDimensionsReport'>>
Citation = <ReportType.Citation: <class 'ndb_adapter.search_report.CitationReport'>>
Descriptor = <ReportType.Descriptor: <class 'ndb_adapter.search_report.DescriptorReport'>>
NABackboneTorsion = <ReportType.NABackboneTorsion: <class 'ndb_adapter.search_report.NABackboneTorsionReport'>>
NDBStatus = <ReportType.NDBStatus: <class 'ndb_adapter.search_report.NDBStatusReport'>>
RNABasePairRelFreq = <ReportType.RNABasePairRelFreq: <class 'ndb_adapter.search_report.RNA3DBasePairRelFreqReport'>>
RNABasePhosphateRelFreq = <ReportType.RNABasePhosphateRelFreq: <class 'ndb_adapter.search_report.RNA3DBasePhosphateRelFreqReport'>>
RNABaseStackingRelFreq = <ReportType.RNABaseStackingRelFreq: <class 'ndb_adapter.search_report.RNA3DBaseStackingRelFreqReport'>>
RNAMotif = <ReportType.RNAMotif: <class 'ndb_adapter.search_report.RNA3DMotifReport'>>
RefinementData = <ReportType.RefinementData: <class 'ndb_adapter.search_report.RefinementDataReport'>>
Sequences = <ReportType.Sequences: <class 'ndb_adapter.search_report.SequencesReport'>>
class ndb_adapter.enums.ResolutionCutoff[source]

Bases: enum.Enum

Enum to handle resolution cutoff options in query

Variables:
All = <ResolutionCutoff.All: 'all'>
Empty = <ResolutionCutoff.Empty: ''>
Four = <ResolutionCutoff.Four: '4.0'>
OneHalf = <ResolutionCutoff.OneHalf: '1.5'>
Three = <ResolutionCutoff.Three: '3.0'>
ThreeHalf = <ResolutionCutoff.ThreeHalf: '3.5'>
Twenty = <ResolutionCutoff.Twenty: '20.0'>
Two = <ResolutionCutoff.Two: '2.0'>
TwoHalf = <ResolutionCutoff.TwoHalf: '2.5'>
class ndb_adapter.enums.RnaStructures[source]

Bases: enum.Enum

Enum to handle rna structures option in query

Variables:
All = <RnaStructures.All: 'all'>
NonRedundant = <RnaStructures.NonRedundant: 'nr'>
class ndb_adapter.enums.RnaType[source]

Bases: enum.Enum

Enum to handle rna type options in query

Variables:
All = <RnaType.All: 'all'>
Aptamer = <RnaType.Aptamer: 'aptamer'>
DoubleHelices = <RnaType.DoubleHelices: 'duplex'>
Group1Intron = <RnaType.Group1Intron: 'gr1In'>
Group2Intron = <RnaType.Group2Intron: 'gr2In'>
Hammerhead = <RnaType.Hammerhead: 'hammhd'>
Harpin = <RnaType.Harpin: 'hairpin'>
Leadzyme = <RnaType.Leadzyme: 'leadzyme'>
Ligase = <RnaType.Ligase: 'ligase'>
Polymerase = <RnaType.Polymerase: 'polymerase'>
QuadrupleHelices = <RnaType.QuadrupleHelices: 'quadruplexes'>
Ribosome = <RnaType.Ribosome: 'ribosome'>
Riboswitch = <RnaType.Riboswitch: 'riboswitch'>
RiboswitchFrag = <RnaType.RiboswitchFrag: 'riboswitchFr'>
Ribozyme = <RnaType.Ribozyme: 'ribozyme'>
RibozymeFrag = <RnaType.RibozymeFrag: 'ribozymeFr'>
RnaseP = <RnaType.RnaseP: 'rnase'>
SmallNucleotideFrag = <RnaType.SmallNucleotideFrag: 'singleStranded'>
TRNA = <RnaType.TRNA: 'trna'>
TRNAFrag = <RnaType.TRNAFrag: 'trnaFr'>
Telomerase = <RnaType.Telomerase: 'telomerase'>
TripleHelices = <RnaType.TripleHelices: 'triplexes'>
ViralFrag = <RnaType.ViralFrag: 'viralfr'>
Virus = <RnaType.Virus: 'virus'>
class ndb_adapter.enums.SpaceGroup[source]

Bases: enum.Enum

Enum to handle space group in query

Variables:
  • Empty – empty value in query
  • B_2_21_2 – ‘B 2 21 2’ in query
  • C_1_2_1 – ‘C 1 2 1’ in query
  • C_2_2_2 – ‘C 2 2 2’ in query
  • C_2_2_21 – ‘C 2 2 21’ in query
  • F_2_2_2 – ‘F 2 2 2’ in query
  • F_2_3 – ‘F 2 3’ in query
  • F_4_3_2 – ‘F 4 3 2’ in query
  • H_3 – ‘H 3’ in query
  • H_3_2 – ‘H 3 2’ in query
  • I_2_2_2 – ‘I 2 2 2’ in query
  • I_2_3 – ‘I 2 3’ in query
  • I_21_21_21 – ‘I 21 21 21’ in query
  • I_21_3 – ‘I 21 3’ in query
  • I_4 – ‘I 4’ in query
  • I_4_2_2 – ‘I 4 2 2’ in query
  • I_4_3_2 – ‘I 4 3 2’ in query
  • I_41 – ‘I 41’ in query
  • I_41_2_2 – ‘I 41 2 2’ in query
  • P_minus1 – ‘P -1’ in query
  • P_1 – ‘P 1’ in query
  • P_1_1_21 – ‘P 1 1 21’ in query
  • P_1_2_1 – ‘P 1 2 1’ in query
  • P_2_2_21 – ‘P 2 2 21’ in query
  • P_2_21_21 – ‘P 2 21 21’ in query
  • P_2_3 – ‘P 2 3’ in query
  • P_21_2_21 – ‘P 21 2 21’ in query
  • P_21_21_2 – ‘P 21 21 2’ in query
  • P_21_21_21 – ‘P 21 21 21’ in query
  • P_21_3 – ‘P 21 3’ in query
  • P_3 – ‘P 3’ in query
  • P_3_1_2 – ‘P 3 1 2’ in query
  • P_3_2_1 – ‘P 3 2 1’ in query
  • P_31 – ‘P 31’ in query
  • P_31_1_2 – ‘P 31 1 2’ in query
  • P_31_2_1 – ‘P 31 2 1’ in query
  • P_32 – ‘P 31’ in query
  • P_32_1_2 – ‘P 31 1 2’ in query
  • P_32_2_1 – ‘P 31 2 1’ in query
  • P_4 – ‘P 4’ in query
  • P_4_2_2 – ‘P 4 2 2’ in query
  • P_4_21_2 – ‘P 4 21 2’ in query
  • P_41 – ‘P 41’ in query
  • P_41_2_2 – ‘P 41 2 2’ in query
  • P_41_21_2 – ‘P 41 21 2’ in query
  • P_42 – ‘P 42’ in query
  • P_42_2_2 – ‘P 42 2 2’ in query
  • P_42_21_2 – ‘P 42 21 2’ in query
  • P_43 – ‘P 43’ in query
  • P_43_2_2 – ‘P 43 2 2’ in query
  • P_43_21_2 – ‘P 43 21 2’ in query
  • P_6 – ‘P 6’ in query
  • P_6_2_2 – ‘P 6 2 2’ in query
  • P_61 – ‘P 61’ in query
  • P_61_2_2 – ‘P 61 2 2’ in query
  • P_62 – ‘P 62’ in query
  • P_62_2_2 – ‘P 62 2 2’ in query
  • P_63 – ‘P 63’ in query
  • P_63_2_2 – ‘P 63 2 2’ in query
  • P_64 – ‘P 64’ in query
  • P_64_2_2 – ‘P 64 2 2’ in query
  • P_65 – ‘P 65’ in query
  • P_65_2_2 – ‘P 65 2 2’ in query
  • R_3_2 – ‘R 3 2’ in query
B_2_21_2 = <SpaceGroup.B_2_21_2: 'B 2 21 2'>
C_1_2_1 = <SpaceGroup.C_1_2_1: 'C 1 2 1'>
C_2_2_2 = <SpaceGroup.C_2_2_2: 'C 2 2 2'>
C_2_2_21 = <SpaceGroup.C_2_2_21: 'C 2 2 21'>
Empty = <SpaceGroup.Empty: ''>
F_2_2_2 = <SpaceGroup.F_2_2_2: 'F 2 2 2'>
F_2_3 = <SpaceGroup.F_2_3: 'F 2 3'>
F_4_3_2 = <SpaceGroup.F_4_3_2: 'F 4 3 2'>
H_3 = <SpaceGroup.H_3: 'H 3'>
H_3_2 = <SpaceGroup.H_3_2: 'H 3 2'>
I_21_21_21 = <SpaceGroup.I_21_21_21: 'I 21 21 21'>
I_21_3 = <SpaceGroup.I_21_3: 'I 21 3'>
I_2_2_2 = <SpaceGroup.I_2_2_2: 'I 2 2 2'>
I_2_3 = <SpaceGroup.I_2_3: 'I 2 3'>
I_4 = <SpaceGroup.I_4: 'I 4'>
I_41 = <SpaceGroup.I_41: 'I 41'>
I_41_2_2 = <SpaceGroup.I_41_2_2: 'I 41 2 2'>
I_41_3_2 = <SpaceGroup.I_41_3_2: 'I 41 3 2'>
I_4_2_2 = <SpaceGroup.I_4_2_2: 'I 4 2 2'>
I_4_3_2 = <SpaceGroup.I_4_3_2: 'I 4 3 2'>
P_1 = <SpaceGroup.P_1: 'P 1'>
P_1_1_21 = <SpaceGroup.P_1_1_21: 'P 1 1 21'>
P_1_21_1 = <SpaceGroup.P_1_21_1: 'P 1 21 1'>
P_1_2_1 = <SpaceGroup.P_1_2_1: 'P 1 2 1'>
P_21_21_2 = <SpaceGroup.P_21_21_2: 'P 21 21 2'>
P_21_21_21 = <SpaceGroup.P_21_21_21: 'P 21 21 21'>
P_21_2_21 = <SpaceGroup.P_21_2_21: 'P 21 2 21'>
P_21_3 = <SpaceGroup.P_21_3: 'P 21 3'>
P_2_21_21 = <SpaceGroup.P_2_21_21: 'P 2 21 21'>
P_2_2_21 = <SpaceGroup.P_2_2_21: 'P 2 2 21'>
P_2_3 = <SpaceGroup.P_2_3: 'P 2 3'>
P_3 = <SpaceGroup.P_3: 'P 3'>
P_31 = <SpaceGroup.P_31: 'P 31'>
P_31_1_2 = <SpaceGroup.P_31_1_2: 'P 31 1 2'>
P_31_2_1 = <SpaceGroup.P_31_2_1: 'P 31 2 1'>
P_32 = <SpaceGroup.P_32: 'P 32'>
P_32_1_2 = <SpaceGroup.P_32_1_2: 'P 32 1 2'>
P_32_2_1 = <SpaceGroup.P_32_2_1: 'P 32 2 1'>
P_3_1_2 = <SpaceGroup.P_3_1_2: 'P 3 1 2'>
P_3_2_1 = <SpaceGroup.P_3_2_1: 'P 3 2 1'>
P_4 = <SpaceGroup.P_4: 'P 4'>
P_41 = <SpaceGroup.P_41: 'P 41'>
P_41_21_2 = <SpaceGroup.P_41_21_2: 'P 41 21 2'>
P_41_2_2 = <SpaceGroup.P_41_2_2: 'P 41 2 2'>
P_41_3_2 = <SpaceGroup.P_41_3_2: 'P 41 3 2'>
P_42 = <SpaceGroup.P_42: 'P 42'>
P_42_21_2 = <SpaceGroup.P_42_21_2: 'P 42 21 2'>
P_42_2_2 = <SpaceGroup.P_42_2_2: 'P 42 2 2'>
P_42_3_2 = <SpaceGroup.P_42_3_2: 'P 42 3 2'>
P_43 = <SpaceGroup.P_43: 'P 43'>
P_43_21_2 = <SpaceGroup.P_43_21_2: 'P 43 21 2'>
P_43_2_2 = <SpaceGroup.P_43_2_2: 'P 43 2 2'>
P_43_3_2 = <SpaceGroup.P_43_3_2: 'P 43 3 2'>
P_4_21_2 = <SpaceGroup.P_4_21_2: 'P 4 21 2'>
P_4_2_2 = <SpaceGroup.P_4_2_2: 'P 4 2 2'>
P_6 = <SpaceGroup.P_6: 'P 6'>
P_61 = <SpaceGroup.P_61: 'P 61'>
P_61_2_2 = <SpaceGroup.P_61_2_2: 'P 61 2 2'>
P_62 = <SpaceGroup.P_62: 'P 62'>
P_62_2_2 = <SpaceGroup.P_62_2_2: 'P 62 2 2'>
P_63 = <SpaceGroup.P_63: 'P 63'>
P_63_2_2 = <SpaceGroup.P_63_2_2: 'P 63 2 2'>
P_64 = <SpaceGroup.P_64: 'P 64'>
P_64_2_2 = <SpaceGroup.P_64_2_2: 'P 64 2 2'>
P_65 = <SpaceGroup.P_65: 'P 65'>
P_65_2_2 = <SpaceGroup.P_65_2_2: 'P 65 2 2'>
P_6_2_2 = <SpaceGroup.P_6_2_2: 'P 6 2 2'>
P_minus1 = <SpaceGroup.P_minus1: 'P -1'>
R_3_2 = <SpaceGroup.R_3_2: 'R 3 2'>
class ndb_adapter.enums.StrandDescription[source]

Bases: enum.Enum

Enum for strand description in query

Variables:
DoubleHelix = <StrandDescription.DoubleHelix: 'double helix'>
Empty = <StrandDescription.Empty: ''>
QuadrupleHelix = <StrandDescription.QuadrupleHelix: 'quadruple helix'>
TripleHelix = <StrandDescription.TripleHelix: 'triple helix'>
class ndb_adapter.enums.StructuralFeatures[source]

Bases: enum.Enum

Enums to handle structural features in query

Variables:
A_DNA = <StructuralFeatures.A_DNA: 'A'>
All = <StructuralFeatures.All: 'all'>
B_DNA = <StructuralFeatures.B_DNA: 'B'>
OtherDoubleHelical = <StructuralFeatures.OtherDoubleHelical: 'other'>
QuadrupleHelices = <StructuralFeatures.QuadrupleHelices: 'quadruple'>
SingleStranded = <StructuralFeatures.SingleStranded: 'single'>
TripleHelices = <StructuralFeatures.TripleHelices: 'triple'>
Z_DNA = <StructuralFeatures.Z_DNA: 'Z'>
class ndb_adapter.enums.StructuralFunction[source]

Bases: enum.Enum

Enum for structural functions in query

Variables:
All = <StructuralFunction.All: 'STRUCTURAL'>
Chromosomal = <StructuralFunction.Chromosomal: 'Chromosomal'>
Empty = <StructuralFunction.Empty: ''>
HMG = <StructuralFunction.HMG: 'HMG'>
Histone = <StructuralFunction.Histone: 'Histone'>
Ribonucleoprotein = <StructuralFunction.Ribonucleoprotein: 'Ribonucleoprotein'>
RibosomalProtein = <StructuralFunction.RibosomalProtein: 'Ribosomal Protein'>
SignalRecognitionParticle = <StructuralFunction.SignalRecognitionParticle: 'Signal Recognition Particle'>
TelomereBinding = <StructuralFunction.TelomereBinding: 'Telomere Binding'>
ViralCoat = <StructuralFunction.ViralCoat: 'Viral Coat'>
class ndb_adapter.enums.YesNoIgnore[source]

Bases: enum.Enum

Enum to handle “yes”, “no”, “ignore” in query

Variables:
  • Yes – yes in query
  • No – no in query
  • Ignore – ignore in query
Ignore = <YesNoIgnore.Ignore: 'Ignore'>
No = <YesNoIgnore.No: 'N'>
Yes = <YesNoIgnore.Yes: 'Y'>

ndb_adapter.html_parser module

class ndb_adapter.html_parser.NDBHtmlParser[source]

Bases: html.parser.HTMLParser

Class for html parse

analyze(data: str) → None[source]

Function for analyze html structure

Parameters:data (str) – html string
Returns:None
error(message: str)[source]

Function for error messages

Parameters:message (str) – message string
find_all(name: str = None, after: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, before: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, params: dict = None) → typing.List[typing.Tag][source]

Function for get tree node matching criteria

Parameters:
  • name (str) – node name (default value = None)
  • after (Tag) – after node instance (default value = None)
  • before (Tag) – before node instance (default value = None)
  • params (dict) – node parameters (default value = None)
Returns:

searched nodes list

Return type:

List[Tag]

find_one(name: str = None, after: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, before: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, params: dict = None) → ndb_adapter.html_parser.Tag[source]

Function for get tree node matching criteria

Parameters:
  • name (str) – node name (default value = None)
  • after (Tag) – after node instance (default value = None)
  • before (Tag) – before node instance (default value = None)
  • params (dict) – node parameters (default value = None)
Returns:

searched node

Return type:

‘Tag’

get_tree() → ndb_adapter.html_parser.Tag[source]

Function for get tree top element

Return type:‘Tag’
Returns:Tree top
handle_data(data) → None[source]

Function to handle data in tags

Parameters:data – data inside tag
Returns:None
handle_endtag(tag) → None[source]

Function to handle end tag and add to tree

Parameters:tag – tag ending
Returns:None
handle_starttag(tag, attrs) → None[source]

Function to handle start tag and add to stack of nodes

Parameters:
  • tag – tag string
  • attrs – attributes dictionary
Returns:

None

class ndb_adapter.html_parser.Tag(name: str, data: str = '', attrs: dict = None, parent: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, next_sib: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, prev_sib: typing.Union[ndb_adapter.html_parser.Tag, NoneType] = None, children: typing.List[typing.Tag] = None)[source]

Bases: object

Class for handle html tags

add_child(child: ndb_adapter.html_parser.Tag) → None[source]

To add child to tag

Parameters:child (Tag) – tag to add
Returns:None
has_attr(params: dict) → bool[source]

To check if tag has given attributes

Parameters:params (dict) – attributes to check
Returns:True/False if there is attribute
next() → ndb_adapter.html_parser.Tag

Next tag

Returns:next tag
Return type:Tag
next_data() → str[source]

Next tag data

Returns:next tag data
Return type:str
prev() → ndb_adapter.html_parser.Tag[source]

Previous tag

Returns:previous tag
Return type:Tag
prev_data() → str[source]

Previous tag data

Returns:previous tag data
Return type:str

ndb_adapter.ndb module

class ndb_adapter.ndb.NDB[source]

Bases: ndb_adapter.ndb_base.NDBBase

Main class for search in NDB - all methods are static

Advanced search in NDB, if in options “stats= True” returns also statistics - works only in some search types. Default search “type= ReportType.NDBStatus”. Depending on ReportType you can annotate return type i.e. “result.report() # ReportType.NDBStatus”.

Parameters:options (AdvancedSearchOptions) – options for advanced search (default value = None) - clear AdvancedSearchOptions()
Returns:search result { count -> int, report -> List[AdvancedReport], statistics -> Statistics }
Return type:AdvancedResult

Dna only search in NDB.

Parameters:options (DnaSearchOptions) – options for dna search (default value = None) - clear DnaSearchOptions()
Returns:search simple result { count -> int, report -> List[SimpleReport] }
Return type:SimpleResult
static download(structure_id: str, download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
  • structure_id (str) – structure NDB ID or PDB ID e.g. 4Z6C
Returns:

string or None

Return type:

str

Rna only search in NDB.

Parameters:options (RnaSearchOptions) – options for rna search (default value = None) - clear RnaSearchOptions()
Returns:search simple result { count -> int, report -> List[SimpleReport] }
Return type:SimpleResult
static summary(structure_id: str) → ndb_adapter.summary_result.SummaryResult[source]

Summary search in NDb

Parameters:structure_id (str) – structure NDB ID or PDB ID e.g. 4Z6C
Returns:search summary result
Return type:SummaryResult

ndb_adapter.ndb_base module

class ndb_adapter.ndb_base.NDBBase[source]

Bases: object

Base class for NDB

Variables:
  • siteUrl – ndb site url
  • _advancedUrl – private advanced search url
  • _summaryUrl – private summary url
  • _dnaUrl – private dna search url
  • _rnaUrl – private rna search url
  • _chiralCorrectUrl – private chiral correct coordinates download url
  • _nmrUrl – private nmr pdb coordinates download url
  • _nmrMmCifUrl – private nmr mmcif coordinates download url
  • _bioAssemblyCoordinateUrl – private bio assembly coordinates download url
  • _mmCifUrl – private mmCIF coordinates download url
  • _structureFactorsUrl – private structure factors download url
  • _nmrRestraintsUrl – private nmr restraints download url
  • _xmlCompleteUrl – private complete xml download url
  • _xmlCoordinatesUrl – private coordinates only xml download url
  • _xmlHeaderUrl – private header only xml download url
siteUrl = 'http://ndbserver.rutgers.edu'

ndb_adapter.ndb_download module

class ndb_adapter.ndb_download.DownloadHelper[source]

Bases: object

Helper class for downloading form NDB

static download(structure_id: str, download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
  • structure_id (str) – structure NDB ID or PDB ID e.g. 4Z6C
Returns:

string or None

Return type:

str

Raises:
  • AttributeError – when structure id is empty
  • FileNotFoundError – when file is not present on server
static download_file(url: str) → _io.BytesIO[source]

Function to download file and convert to BytesIO

Parameters:url (str) – file url
Returns:file as BytesIO
Return type:BytesIO
class ndb_adapter.ndb_download.DownloadType[source]

Bases: enum.Enum

Enum for file download format

Variables:
  • Pdb – Asymmetric Unit coordinates (pdb format, Unix compressed(.gz))
  • Cif – Asymmetric Unit coordinates (cif format, Unix compressed(.gz))
  • PdbBioAssembly – Biological Assembly coordinates
  • PdbNmr – Coordinates (pdb format, Unix compressed(.gz))
  • CifNmr – Coordinates (cif format, Unix compressed(.gz))
  • CifStructureFactors – Structure Factors (cif format)
  • CifNmrRestraints – NMR Restraints (cif format, Unix compressed(.gz))
  • XmlComplete – XML | Complete with coordinates (xml format, GNU compressed(.gz))
  • XmlCoordinates – XML | Coordinates only (xml format, GNU compressed(.gz))
  • XmlHeader – XML | Header only (xml format, GNU compressed(.gz))
Cif = <DownloadType.Cif: <class 'ndb_adapter.ndb_download._Cif'>>
CifNmr = <DownloadType.CifNmr: <class 'ndb_adapter.ndb_download._CifNmr'>>
CifNmrRestraints = <DownloadType.CifNmrRestraints: <class 'ndb_adapter.ndb_download._CifNmrRestraints'>>
CifStructureFactors = <DownloadType.CifStructureFactors: <class 'ndb_adapter.ndb_download._CifStructureFactors'>>
Pdb = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>
PdbBioAssembly = <DownloadType.PdbBioAssembly: <class 'ndb_adapter.ndb_download._PdbBioAssembly'>>
PdbNmr = <DownloadType.PdbNmr: <class 'ndb_adapter.ndb_download._PdbNmr'>>
XmlComplete = <DownloadType.XmlComplete: <class 'ndb_adapter.ndb_download._XmlComplete'>>
XmlCoordinates = <DownloadType.XmlCoordinates: <class 'ndb_adapter.ndb_download._XmlCoordinates'>>
XmlHeader = <DownloadType.XmlHeader: <class 'ndb_adapter.ndb_download._XmlHeader'>>

ndb_adapter.report_parser module

ndb_adapter.report_parser.parse_advanced_search_report(text: str, text_stats: str, report_type: ndb_adapter.enums.ReportType) → ndb_adapter.search_result.AdvancedResult[source]

To parse advanced search report from text to AdvancedResult

Parameters:
  • text (str) – text to parse
  • text_stats (str) – statistics text to parse
  • report_type (ReportType) – type of report to parse
Returns:

advanced search result

Return type:

AdvancedResult

ndb_adapter.report_parser.parse_csv(table: typing.List[str], result_class: typing.Callable[[], AdvancedReport]) → typing.List[AdvancedReport][source]

To parse table of string as csv to list of AdvancedReport

Parameters:
  • table (List[str]) – string table to parse
  • result_class (Callable[[], AdvancedReport]) – class that init object before adding to results
Returns:

list of advanced report

Return type:

List[AdvancedReport]

ndb_adapter.report_parser.parse_search_report(html: str) → ndb_adapter.search_result.SimpleResult[source]

To parse simple search report from html to SimpleResult

Parameters:html (str) – html string to parse
Returns:simple search result
Return type:SimpleResult
ndb_adapter.report_parser.parse_summary(html: str) → ndb_adapter.summary_result.SummaryResult[source]

To parse summary search from html to SummaryResult

Parameters:html (str) – html string to parse
Returns:summary search result
Return type:SummaryResult
ndb_adapter.report_parser.parse_to_table(text: str) → typing.List[str][source]

To parse text to list of strings

Parameters:text – input string
Returns:list of string
Return type:List[str]
ndb_adapter.report_parser.parse_xls(file: _io.BytesIO) → typing.List[ndb_adapter.search_report.SimpleReport][source]

To parse xls file to list of Simplereport

Parameters:file (BytesIO) – file bytes to parse
Returns:list of SimpleReport
Return type:List[SimpleReport]

ndb_adapter.rna_search_options module

class ndb_adapter.rna_search_options.RnaSearchOptions[source]

Bases: ndb_adapter.search_options.SearchOptions

Class for rna search options

get_non_redundant_list()[source]

Gets non redundant list options

Returns:non redundant list
Return type:(RnaStructures, ResolutionCutoff)
get_rna_type() → ndb_adapter.enums.RnaType[source]

Gets rna type options

Returns:rna type
Return type:RnaType
set_non_redundant_list(structures: ndb_adapter.enums.RnaStructures = <RnaStructures.All: 'all'>, resolution: ndb_adapter.enums.ResolutionCutoff = <ResolutionCutoff.All: 'all'>) → None[source]

Sets non redundant list in options. More info: http://ndbserver.rutgers.edu/ndbmodule/ndb-help.html#nrl

Parameters:
  • structures (RnaStructures) – rna structures type (default value = RnaStructures.All)
  • resolution (ResolutionCutoff) – resolution cutoff (default value = ResolutionCutoff.All)
Returns:

None

set_rna_type(rna_type: ndb_adapter.enums.RnaType = <RnaType.All: 'all'>) → None[source]

Sets rna type in options

Parameters:rna_type (RnaType) – rna type (default value = RnaType.All)
Returns:None

ndb_adapter.search_options module

class ndb_adapter.search_options.SearchOptions(search_type: str)[source]

Bases: object

Class for specific search options

get() → dict[source]

Gets dictionary of options

Returns:dictionary options
Return type:dict
get_experimental_method() → ndb_adapter.enums.ExpMethod[source]

Gets experimental method options

Returns:experimental method
Return type:ExpMethod
get_filter_text() → str[source]

Gets filter text options

Returns:filter text
Return type:str
get_polymer() → ndb_adapter.enums.Polymer[source]

Gets polymer type options

Returns:polymer type
Return type:Polymer
get_protein_func() → ndb_adapter.enums.ProteinFunc[source]

Gets protein function options

Returns:protein function
Return type:ProteinFunc
set_experimental_method(method: ndb_adapter.enums.ExpMethod = <ExpMethod.All: 'all'>) → None[source]

Sets experimental method in options

Parameters:method (ExpMethod) – experimental method (default value = ExpMethod.All)
Returns:None
set_filter_text(text: str) → None[source]

Sets filter text in options. Use this option to narrow your results down considerably (>50% reduction) using any word seen in the results page. Eg: Any author name found in the right side.

Parameters:text (str) – filter text to be set
Returns:None
set_polymer(polymer: ndb_adapter.enums.Polymer = <Polymer.All: 'all'>) → None[source]

Sets polymer type in options

Parameters:polymer (Polymer) – polymer type (default value = Polymer.All)
Returns:None
set_protein_func(protein: ndb_adapter.enums.ProteinFunc = <ProteinFunc.All: 'all'>) → None[source]

Sets protein function in options

Parameters:protein (ProteinFunc) – protein function (default value = ProteinFunc.All)
Returns:None

ndb_adapter.search_report module

class ndb_adapter.search_report.BasePairParameterReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for base pair parameter search report extending _AdvancedBaseReport

buckle

Gets advanced report structure buckle

Returns:buckle
Return type:float
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

model_num

Gets advanced report structure model number

Returns:model number
Return type:int
opening

Gets advanced report structure opening

Returns:opening
Return type:float
pair_name

Gets advanced report structure pair name

Returns:pair name
Return type:str
pair_num

Gets advanced report structure pair number

Returns:pair number
Return type:int
propellor

Gets advanced report structure propellor

Returns:propellor
Return type:float
static report_type() → str[source]
shear

Gets advanced report structure shear

Returns:shear
Return type:float
stagger

Gets advanced report structure stagger

Returns:stagger
Return type:float
stretch

Gets advanced report structure stretch

Returns:stretch
Return type:float
class ndb_adapter.search_report.BasePairStepParameterReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for base pair parameter search report extending _AdvancedBaseReport

download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

helical_rise

Gets advanced report structure helical rise

Returns:helical rise
Return type:float
helical_twist

Gets advanced report structure helical twist

Returns:helical twist
Return type:float
inclination

Gets advanced report structure inclination

Returns:inclination
Return type:float
model_num

Gets advanced report structure model number

Returns:model number
Return type:int
static report_type() → str[source]
rise

Gets advanced report structure rise

Returns:rise
Return type:float
roll

Gets advanced report structure roll

Returns:roll
Return type:float
shift

Gets advanced report structure shift

Returns:shift
Return type:float
slide

Gets advanced report structure slide

Returns:slide
Return type:float
step_name

Gets advanced report structure step name

Returns:step name
Return type:str
step_num

Gets advanced report structure step number

Returns:step number
Return type:int
tilt

Gets advanced report structure tilt

Returns:tilt
Return type:float
tip

Gets advanced report structure tip

Returns:tip
Return type:float
x_disp

Gets advanced report structure x displacement

Returns:x displacement
Return type:float
y_disp

Gets advanced report structure y displacement

Returns:x displacement
Return type:float
class ndb_adapter.search_report.CellDimensionsReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for cell dimensions search report extending _AdvancedBaseReport

cell_a

Gets advanced report structure cell a in angstroms

Returns:cell a
Return type:float
cell_alpha

Gets advanced report structure cell alpha in degrees

Returns:alpha
Return type:float
cell_b

Gets advanced report structure cell b in angstroms

Returns:cell b
Return type:float
cell_beta

Gets advanced report structure cell beta in degrees

Returns:beta
Return type:float
cell_c

Gets advanced report structure cell c in angstroms

Returns:cell c
Return type:float
cell_gamma

Gets advanced report structure cell gamma in degrees

Returns:gamma
Return type:float
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

static report_type() → str[source]
space_group

Gets advanced report structure space group

Returns:space group
Return type:float
class ndb_adapter.search_report.CitationReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for citation search report extending _AdvancedBaseReport

citation_authors

Gets advanced report structure citation authors

Returns:citation authors
Return type:str
citation_title

Gets advanced report structure citation title

Returns:citation title
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

journal

Gets advanced report structure Journal

Returns:Journal
Return type:str
pdb_id

Gets advanced report structure PDB ID

Returns:PDB ID
Return type:str
pubmed_id

Gets advanced report structure pubmed ID

Returns:PDB ID
Return type:str
static report_type() → str[source]
year

Gets advanced report structure year

Returns:year
Return type:int
class ndb_adapter.search_report.DescriptorReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for descriptor search report extending _AdvancedBaseReport

description

Gets advanced report structure description

Returns:description
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

static report_type() → str[source]
class ndb_adapter.search_report.NABackboneTorsionReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for refinement data search report extending _AdvancedBaseReport

c3_o3_p_o5

Gets advanced report structure C3’-O3’-P-O5’

Returns:C3’-O3’-P-O5’
Return type:float
c4_c3_o3_p

Gets advanced report structure C4’-C3’-O3’-P

Returns:C4’-C3’-O3’-P
Return type:float
c5_c4_c3_o3

Gets advanced report structure C5’-C4’-C3’-O3’

Returns:C5’-C4’-C3’-O3’
Return type:float
chain_id

Gets advanced report structure chain ID

Returns:chain ID
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

model_id

Gets advanced report structure model ID

Returns:model ID
Return type:str
o3_p_o5_c5

Gets advanced report structure O3’-P-O5’-C5’

Returns:O3’-P-O5’-C5’
Return type:float
o4_c1_n1_9_c2_4

Gets advanced report structure O4’-C1’-N1-9-C2-4

Returns:O4’-C1’-N1-9-C2-4
Return type:float
o5_c5_c4_c3

Gets advanced report structure O5’-C5’-C4’-C3’

Returns:O5’-C5’-C4’-C3’
Return type:float
p_o5_c5_c4

Gets advanced report structure P-O5’-C5’-C4’

Returns:P-O5’-C5’-C4’
Return type:float
static report_type() → str[source]
residue_name

Gets advanced report structure residue name

Returns:residue name
Return type:str
residue_number

Gets advanced report structure residue number

Returns:residue number
Return type:int
class ndb_adapter.search_report.NDBStatusReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for NDB status search report extending _AdvancedBaseReport

authors

Gets advanced report structure authors

Returns:authors
Return type:str
deposition_date

Gets advanced report structure initial deposition date

Returns:initial deposition date
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

pdb_id

Gets advanced report structure PDB ID

Returns:PDB ID
Return type:str
release_date

Gets advanced report structure NDB release date

Returns:release date
Return type:str
static report_type() → str[source]
title

Gets advanced report structure title

Returns:title
Return type:str
class ndb_adapter.search_report.RNA3DBasePairRelFreqReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for RNA 3D Base Pair Relative Frequency Report search report extending _AdvancedBaseReport

chh

Gets advanced report relative cHH

Returns:relative cHH
Return type:float
chs

Gets advanced report relative cHS

Returns:relative cHS
Return type:float
css

Gets advanced report relative cSS

Returns:relative cSS
Return type:float
cwh

Gets advanced report relative qWH

Returns:relative qWH
Return type:float
cws

Gets advanced report relative cWS

Returns:relative cWS
Return type:float
cww

Gets advanced report relative cWW

Returns:relative cWW
Return type:float
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

pdb_id

Gets advanced report structure PDB

Returns:PDB ID
Return type:str
static report_type() → str[source]
thh

Gets advanced report relative tHH

Returns:relative tHH
Return type:float
ths

Gets advanced report relative tHS

Returns:relative tHS
Return type:float
tss

Gets advanced report relative tSS

Returns:relative tWS
Return type:float
twh

Gets advanced report relative tWH

Returns:relative tWH
Return type:float
tws

Gets advanced report relative tWS

Returns:relative tWS
Return type:float
tww

Gets advanced report relative tWW

Returns:relative tWW
Return type:float
class ndb_adapter.search_report.RNA3DBasePhosphateRelFreqReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for RNA 3D Base Phosphate Relative Frequency Report search report extending _AdvancedBaseReport

bph_0

Gets advanced report relative 0BPh

Returns:relative 0BPh
Return type:float
bph_1

Gets advanced report relative 1BPh

Returns:relative 1BPh
Return type:float
bph_2

Gets advanced report relative 2BPh

Returns:relative 2BPh
Return type:float
bph_3

Gets advanced report relative 3BPh

Returns:relative 3BPh
Return type:float
bph_4

Gets advanced report relative 4BPh

Returns:relative 4BPh
Return type:float
bph_5

Gets advanced report relative 5BPh

Returns:relative 5BPh
Return type:float
bph_6

Gets advanced report relative 6BPh

Returns:relative 6BPh
Return type:float
bph_7

Gets advanced report relative 7BPh

Returns:relative 7BPh
Return type:float
bph_8

Gets advanced report relative 8BPh

Returns:relative 8BPh
Return type:float
bph_9

Gets advanced report relative 9BPh

Returns:relative 9BPh
Return type:float
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

pdb_id

Gets advanced report structure PDB

Returns:PDB ID
Return type:str
static report_type() → str[source]
class ndb_adapter.search_report.RNA3DBaseStackingRelFreqReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for RNA 3D Base Stacking Relative Frequency Report search report extending _AdvancedBaseReport

download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

pdb_id

Gets advanced report structure PDB

Returns:PDB ID
Return type:str
static report_type() → str[source]
s33

Gets advanced report structure relative s33

Returns:relative s33
Return type:float
s53

Gets advanced report structure relative s53

Returns:relative s53
Return type:float
s55

Gets advanced report structure relative s55

Returns:relative s55
Return type:float
class ndb_adapter.search_report.RNA3DMotifReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for RNA 3D Base Phosphate Relative Frequency Report search report extending _AdvancedBaseReport

annotation

Gets advanced report structure annotation

Returns:annotation
Return type:str
common_name

Gets advanced report structure common name

Returns:common name
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

motif_id

Gets advanced report structure motif ID

Returns:motif ID
Return type:str
pdb_id

Gets advanced report structure PDB

Returns:PDB ID
Return type:str
static report_type() → str[source]
class ndb_adapter.search_report.RefinementDataReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for refinement data search report extending _AdvancedBaseReport

download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

higher_resolution

Gets advanced report structure higher resolution limit

Returns:higher resolution limit
Return type:float
lower_resolution

Gets advanced report structure lower resolution limit

Returns:lower resolution limit
Return type:float
r_free

Gets advanced report structure r free

Returns:r free
Return type:float
r_obs

Gets advanced report structure r obs

Returns:r obs
Return type:float
r_work

Gets advanced report structure r work

Returns:r work
Return type:float
reflections

Gets advanced report structure reflections observed

Returns:reflections observed
Return type:int
static report_type() → str[source]
structure_ref

Gets advanced report structure refinement

Returns:structure refinement
Return type:str
class ndb_adapter.search_report.SequencesReport(report: dict = None)[source]

Bases: ndb_adapter.search_report._AdvancedBaseReport

Class for sequences search report extending _AdvancedBaseReport

description

Gets advanced report structure description

Returns:description
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

NOT WORKS ON THIS REPORT TYPE

static report_type() → str[source]
sequence

Gets advanced report structure nucleic acid sequence

Returns:sequence
Return type:str
class ndb_adapter.search_report.SimpleReport(report: dict = None)[source]

Bases: object

Class for simple result report

authors

Gets simple report structure authors

Returns:authots
Return type:str
citation_detail

Gets simple report structure citation title

Returns:citation detail
Return type:str
citation_title

Gets simple report structure citation title

Returns:citation title
Return type:str
classification

Gets simple report structure classification

Returns:classification
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from ndb

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

experimental_method

Gets simple report structure experimental method

Returns:experimental method
Return type:str
get_dict() → dict[source]

Gets simple report as dict

Returns:simple report dict
Return type:dict
ndb_id

Gets simple report structure NDB ID

Returns:NDB ID
Return type:str
pdb_id

Gets simple report structure PDB

Returns:PDB ID
Return type:str
r_free

Gets simple report structure r free

Returns:r free
Return type:float
r_work

Gets simple report structure r work

Returns:r work
Return type:float
release_date

Gets simple report structure release date

Returns:release date
Return type:str
resolution

Gets simple report structure resolution

Returns:resolution
Return type:float
title

Gets simple report structure title

Returns:title
Return type:str
class ndb_adapter.search_report.StatisticReport(report: dict = None)[source]

Bases: object

Class for statistic search report

stats

Gets advanced report structure statistics

Returns:statistics
Return type:str

ndb_adapter.search_result module

class ndb_adapter.search_result.AdvancedResult[source]

Bases: ndb_adapter.search_result.SearchResult

Class for advanced search result

download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → typing.List[str][source]

Download PDB files from NDB

Parameters:
  • download_type (DownloadType) – files download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if files should be saved or not (default value = False)
Returns:

list of strings or None

Return type:

List[str]

get_report() → typing.List[AdvancedReport][source]

Gets advanced search results report list. You should annotate return type depending on ReportType.

Returns:list of advanced search reports
Return type:List[AdvancedReport]
get_statistics() → ndb_adapter.statistics.Statistics[source]

Get statistics of advanced search

Returns:statistics of advanced search

:rtype Statistics

set_statistics(report: list) → None[source]

Sets statistic

Parameters:report (list) – report list to be parse as statistic
Returns:None
statistics

Statistic report property gets report statistic

class ndb_adapter.search_result.SearchResult[source]

Bases: object

Base class for search result

count

Search count property gets report count

get_count() → int[source]

Gets search results count

Returns:search results count
Return type:int
get_report() → list[source]

Gets search results report

Returns:list of search results reports
Return type:list
report

Search report property gets report list

set_count(count: int) → None[source]

Sets result count

Parameters:count (int) – value to set as count
Returns:None
set_report(report: list) → None[source]

Sets result report list

Parameters:report (list) – list to be set as report
Returns:None
class ndb_adapter.search_result.SimpleResult[source]

Bases: ndb_adapter.search_result.SearchResult

Class for simple search result

download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → typing.List[str][source]

Download PDB files from NDB

Parameters:
  • download_type (DownloadType) – files download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if files should be saved or not (default value = False)
Returns:

list of strings or None

Return type:

List[str]

get_report() → typing.List[ndb_adapter.search_report.SimpleReport][source]

Gets search results report list

Returns:list of simple search reports
Return type:List[SimpleReport]

ndb_adapter.statistics module

class ndb_adapter.statistics.Statistics[source]

Bases: object

Class for search statistics

max

Gets max statistic dictionary

Returns:max statistics
Return type:Dict[str, float]
mean

Gets mean statistic dictionary

Returns:mean statistics
Return type:Dict[str, float]
min

Gets min statistic dictionary

Returns:min statistics
Return type:Dict[str, float]
set_report(report: typing.List[ndb_adapter.search_report.StatisticReport]) → None[source]

Sets statistic from report

Parameters:report (List[StatisticReport]) – list of statistic report
Returns:None
std_dev

Gets standard deviation statistic dictionary

Returns:standard deviation statistics
Return type:Dict[str, float]

ndb_adapter.summary_result module

class ndb_adapter.summary_result.SummaryResult[source]

Bases: object

Class for summary results

cell_a

Gets summary result structure cell a angstroms value

Returns:structure cell a angstroms
Return type:float
cell_alpha

Gets summary result structure cell alpha

Returns:structure cell alpha degrees
Return type:Dict[str, float]
cell_b

Gets summary result structure cell b angstroms value

Returns:structure cell b angstroms
Return type:float
cell_beta

Gets summary result structure cell beta

Returns:structure cell beta degrees
Return type:float
cell_c

Gets structure cell c angstroms value of summary result

Returns:structure cell a angstroms
Return type:float
cell_constants

Gets summary result structure cell constants as dict[str, float]

Returns:structure cell constants
Return type:Dict[str, float]
cell_gamma

Gets summary result structure cell gamma

Returns:structure cell gamma degrees
Return type:float
citation_authors

Gets summary result structure primary citation authors

Returns:primary citation authors
Return type:str
citation_journal

Gets summary result structure primary citation journal

Returns:primary citation journal
Return type:str
citation_pages

Gets summary result structure pages in primary citation

Returns:primary citation pages
Return type:str
citation_pubmed_id

Gets summary result structure primary citation Pubmed ID

Returns:primary citation Pubmend ID
Return type:str
citation_title

Gets summary result structure primary citation title

Returns:primary citation title
Return type:str
citation_year

Gets summary result structure primary citation year

Returns:primary citation year
Return type:str
description

Gets summary result structure description

Returns:description
Return type:str
download(download_type: ndb_adapter.ndb_download.DownloadType = <DownloadType.Pdb: <class 'ndb_adapter.ndb_download._Pdb'>>, save: bool = False, target_dir: str = '') → str[source]

Download PDB from NDB

Parameters:
  • download_type (DownloadType) – file download type (default value is DownloadType.PDB)
  • target_dir (str) – where to save file (default value is current dir)
  • save (bool) – tells if file should be saved or not (default value = False)
Returns:

string or None

Return type:

str

experimental_method

Gets summary result structure experimental method

Returns:experimental method
Return type:str
get_dict() → dict[source]

Gets internal report dict

Returns:report as dictionary
Return type:dict
ndb_id

Gets summary result structure NDB ID

Returns:NDB ID
Return type:str
nucleic_acid_seq

Gets summary result structure nucleic acid sequences

Returns:structure nucleic acid sequences
Return type:List[str]
nucleic_acid_seq_with_names

Gets summary result structure nucleic acid sequences with names

Returns:structure nucleic acid sequences with names
Return type:List[Dict[str, str]]
pdb_id

Gets summary result structure PDB ID

Returns:PDB ID
Return type:str
protein_seq

Gets summary result structure protein sequences

Returns:structure protein sequences
Return type:List[str]
protein_seq_with_names

Gets summary result structure protein sequences with names

Returns:structure protein sequences with names
Return type:List[Dict[str, str]]
refinement

Gets summary result structure refinement

Returns:refinement
Return type:str
space_group

Gets summary result structure space group

Returns:space group
Return type:str
title

Gets summary result structure title

Returns:title
Return type:str
update(report: dict) → None[source]

Update internal report

Parameters:report (dict) – extending report
Returns:None

Module contents