Prop3D.util package

Submodules

Prop3D.util.cath module

Prop3D.util.dask module

Prop3D.util.dask.setup_dask(num_workers)

Prop3D.util.hdf module

Prop3D.util.iostore module

Prop3D.util.pdb module

Prop3D.util.s3 module

Prop3D.util.toil module

Module contents

Prop3D.util.atof(text, use_int=False)
Prop3D.util.natural_keys(text, use_int=False)

alist.sort(key=natural_keys) sorts in human order http://nedbatchelder.com/blog/200712/human_sorting.html (See Toothy’s implementation in the comments) float regex comes from https://stackoverflow.com/a/12643073/190597

Prop3D.util.to_int(s)
Prop3D.util.number_of_lines(path)
Prop3D.util.SubprocessChain(commands, output=-1)
Prop3D.util.safe_remove(files, warn=False)
Prop3D.util.safe_call(job, func, input, *args, **kwds)
Prop3D.util.download_file(url, local_filename=None)
Prop3D.util.silence_stdout()
Prop3D.util.silence_stderr()
Prop3D.util.getcwd()

Get current working directory. Uses shell to avoid drive mapping names from python

Prop3D.util.izip_missing(iterA, iterB, **kwds)

Iterate through two iterables, while making sure they are in the same order. If there are missing values, you can skip the value entirely or return only the iterator with the value and a special fill value.

Parameters:
  • iterA (the first iterator)

  • iterB (the second iterator)

  • key (function that returns items to compare. Must return strings, ints, or) – an object with the __lt__, __gt__, and __eq__ methods. Optional.

  • fillvalue (The value to return if the item is missing. Optional.)

Returns:

  • A (item from first iterator, or fillValue)

  • B (item from second iterator, or fillValue)

Prop3D.util.reset_ip()
Prop3D.util.str2bool(v)
Prop3D.util.str2boolorlist(v)