schrodinger.seam.io.textio module¶
- schrodinger.seam.io.textio.resolve_path(path_template: Union[str, Path]) Path¶
Resolve a path template containing $SEAM_JOBDIR to an actual path.
If SEAM_JOBDIR is set, it will be used as the base directory. Otherwise, falls back to the current working directory.
- Parameters:
path_template – Path template potentially containing $SEAM_JOBDIR
- Returns:
Resolved Path object.
- schrodinger.seam.io.textio.move_to_finaldest(src_path: str, dest_path: str) str¶
Moves a file from a source path to a destination path using Beam’s filesystem abstractions. Expands environment variables in source path.
- class schrodinger.seam.io.textio.WriteToText(file_name: str, header: Optional[str] = None, overwrite: bool = True, **kwargs)¶
Bases:
_LocalOnlyPTransform,WriteToTextWrite a PCollection of strings to a file.
This is meant as a replacement for beam’s WriteToText transform, which is doesn’t work in the Schrodinger environment due to a multiproc requirement.
Note: the header will only be written if the file overwrite is True.