auto_process_ngs.cli.fetch_data
- auto_process_ngs.cli.fetch_data.copy_dir_contents(src, dst, replace_spaces=True, flatten=False, overwrite=False)
Copy the contents of one directory into another
- Parameters:
src (str) – path of source directory
dst (str) – path of destination directory
replace_spaces (bool) – if True (default) then replace spaces in source names with underscores in the destination names
flatten (bool) – if True then don’t replicate the source directory structure (default is to retain the directory structure)
overwrite (bool) – if True then replace (i.e. overwrite) existing destination files if an imported file has the same name (default is to skip existing files)
- auto_process_ngs.cli.fetch_data.copy_file(src, dst, replace_spaces=True, overwrite=False)
Copy a file
- Parameters:
src (str) – path of source file
dst (str) – path of destination (can be an existing directory or a new file)
replace_spaces (bool) – if True (default) then replace spaces in source name with underscores in the destination name
overwrite (bool) – if True then replace (i.e. overwrite) existing destination file if the imported file has the same name (default is to skip existing file)
- auto_process_ngs.cli.fetch_data.main()
Implements the ‘fetch_data.py’ CLI utility
- auto_process_ngs.cli.fetch_data.run_command(cmd, runner, working_dir=None)
Run a command
Given a Command instance, execute that comamnd using the specified job runner.
- Parameters:
cmd (Command) – the command line to be executed
runner (JobRunner) – the job runner to use
working_dir (str) – path to the working directory (or None to default to CWD)
- Returns:
exit code from the job.
- Return type:
Integer
- auto_process_ngs.cli.fetch_data.run_rsync(src, dst, runner, working_dir)
Run ‘rsync’ command to copy files and directories
- Parameters:
src (str) – path of source directory
dst (str) – path of destination directory
runner (JobRunner) – the job runner to use
working_dir (str) – path to the working directory (or None to default to CWD)