fragalysis.requests.download

Module Contents

Functions

target_list

Request a list of target dictionaries from a Fragalysis deployment

download_target

Request a target download from a Fragalysis deployment

target_uploads

Request a dictionary of uploads keyed by target name and target_access_strings from a Fragalysis deployment

Data

_DOWNLOAD_MIN_SLEEP

_DOWNLOAD_MAX_SLEEP

API

fragalysis.requests.download._DOWNLOAD_MIN_SLEEP: int = 4
fragalysis.requests.download._DOWNLOAD_MAX_SLEEP: int = 12
fragalysis.requests.download.target_list(stack: str = 'production', token: str | None = None, return_project_data: bool = False) list[dict]

Request a list of target dictionaries from a Fragalysis deployment

Parameters:
  • stack – shorthand or URL of Fragalysis deployment, defaults to “production”

  • token – optional authentication token

Returns:

list of target dictionaries with “id”, “title”, and “project” keys

fragalysis.requests.download.download_target(name: str, tas: str, stack: str = 'production', token: str | None = None, destination: str = '.', metadata_file: bool = True, combined_sdf: bool = True, compound_set_sdfs: bool = True, soakdb_files: bool = True, unaligned_pdbs: bool = False, ligand_cifs: bool = False, event_maps: bool = False, inspection_maps: bool = False, residual_maps: bool = False, real_space_maps: bool = False, transformation_files: bool = False, reflections_files: bool = False, extract: bool = True, debug: bool = False, iteration: int = 1, debug_requests: bool = False) None

Request a target download from a Fragalysis deployment

Parameters:
  • name – name of the target to request

  • tas – target access string of the target

  • stack – shorthand or URL of Fragalysis deployment, defaults to “production”

  • token – optional authentication token

  • destination – directory within which to place the download, defaults to “.” (current working directory)

  • metadata_file – Download metadata.csv?

  • combined_sdf – Download single SDF of all ligands?

  • compound_set_sdfs – Download RHS / computed ligand SDFs?

  • soakdb_files – Download SoakDB CSV/sqlite files?

  • unaligned_pdbs – Download coordinate files (not re-aligned) (.pdb)?

  • ligand_cifs – Download ligand definitions and geometry restrains (.cif)?

  • event_maps – Download PanDDA Event maps - primary evidence?

  • inspection_maps – Download conventional inspection maps (“2FoFc”)?

  • residual_maps – Download conventional residual maps (“FoFc”)?

  • real_space_maps – Real-space map files (VERY BIG!) (.map)?

  • transformation_files – Download transformations applied for alignments?

  • reflections_files – Download reflections and map coefficients (.mtz)?

  • extract – Extract the downloaded zip / tar archive?

  • debug – Add print debug displaying the change in download status text

  • iteration – A number used to distinguish output messages (important when downloading concurrent targets)

  • debug_requests – True to set underlying HTTP request logging to DEBUG

fragalysis.requests.download.target_uploads(stack: str = 'production', token: str | None = None, statistics_only: bool = False) dict[str, str, list]

Request a dictionary of uploads keyed by target name and target_access_strings from a Fragalysis deployment

Parameters:
  • stack – shorthand or URL of Fragalysis deployment, defaults to “production”

  • token – optional authentication token

  • statistics_only – don’t list individual uploads

Returns:

list of target upload dictionaries with “id”, “title”, and “project” keys