Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $ pridepy download-all-public-raw-files -a PXD012353 -o /Users/yourname/Download

Additional options:

- `--skip-if-downloaded-already` / `--no-skip-if-downloaded-already` flag is used to control whether to skip files that already exist in the output directory. By default, files are skipped if they already exist. Use `--no-skip-if-downloaded-already` to force re-download.
- `--skip-if-downloaded-already` flag is used to skip files that already exist in the output directory. By default, files are re-downloaded even if they already exist. Use this flag to avoid re-downloading existing files.
- `--aspera-maximum-bandwidth` flag is used to specify the maximum bandwidth for the Aspera download. The default value is 100M.
- `--checksum-check` flag is used to check the checksum of the downloaded files. The default value is False.

Expand All @@ -93,7 +93,7 @@ $ pridepy download-px-raw-files -a PXD039236 -o /Users/yourname/Downloads/folder
```

- The tool resolves the ProteomeXchange XML and downloads via FTP when available, otherwise HTTP(S).
- Resume and skip-if-already-downloaded are supported by default.
- Resume is supported. Use `--skip-if-downloaded-already` flag to skip files that have already been downloaded.

## Download single file by name

Expand Down
30 changes: 15 additions & 15 deletions pridepy/pridepy.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def main():
help="output folder to download or copy raw files",
)
@click.option(
"--skip-if-downloaded-already/--no-skip-if-downloaded-already",
"--skip-if-downloaded-already",
is_flag=True,
default=True,
help="Skip the download if the file has already been downloaded. Default is to skip.",
default=False,
help="Skip the download if the file has already been downloaded.",
)
@click.option(
"--aspera-maximum-bandwidth",
Expand Down Expand Up @@ -62,7 +62,7 @@ def download_all_public_raw_files(
accession (str): PRIDE project accession.
protocol (str): Protocol for downloading files (ftp, aspera, globus). Default is ftp.
output_folder (str): Directory to save downloaded raw files.
skip_if_downloaded_already (bool): Skip download if files already exist. Default is True.
skip_if_downloaded_already (bool): Skip download if files already exist. Default is False.
aspera_maximum_bandwidth (str): Maximum bandwidth for Aspera protocol. Default is 100M.
checksum_check (bool): Flag to download checksum file for the project. Default is False.
"""
Expand Down Expand Up @@ -102,10 +102,10 @@ def download_all_public_raw_files(
help="output folder to download or copy raw files",
)
@click.option(
"--skip-if-downloaded-already/--no-skip-if-downloaded-already",
"--skip-if-downloaded-already",
is_flag=True,
default=True,
help="Skip the download if the file has already been downloaded. Default is to skip.",
default=False,
help="Skip the download if the file has already been downloaded.",
)
@click.option(
"--aspera-maximum-bandwidth",
Expand Down Expand Up @@ -143,7 +143,7 @@ def download_all_public_category_files(
accession (str): The PRIDE project accession identifier.
protocol (str): The protocol to use for downloading files (ftp, aspera, globus).
output_folder (str): The directory where the files will be downloaded.
skip_if_downloaded_already (bool): If True, skips downloading files that already exist.
skip_if_downloaded_already (bool): If True, skips downloading files that already exist. Default is False.
aspera_maximum_bandwidth (str): Maximum bandwidth for Aspera transfers.
checksum_check (bool): If True, downloads the checksum file for the project.
category (str): The category of files to download.
Expand Down Expand Up @@ -186,10 +186,10 @@ def download_all_public_category_files(
help="output folder to download or copy files",
)
@click.option(
"--skip-if-downloaded-already/--no-skip-if-downloaded-already",
"--skip-if-downloaded-already",
is_flag=True,
default=True,
help="Skip the download if the file has already been downloaded. Default is to skip.",
default=False,
help="Skip the download if the file has already been downloaded.",
)
@click.option("--username", required=False, help="PRIDE login username for private files")
@click.option("--password", required=False, help="PRIDE login password for private files")
Expand Down Expand Up @@ -223,7 +223,7 @@ def download_file_by_name(
:param protocol: Protocol to be used to download files either by ftp or aspera or from globus. Default is ftp
:param file_name: fileName to be downloaded
:param output_folder: output folder to download or copy files
:param skip_if_downloaded_already: Boolean value to skip the download if the file has already been downloaded.
:param skip_if_downloaded_already: Boolean value to skip the download if the file has already been downloaded. Default is False.
:param username: PRIDE login username for private files
:param password: PRIDE login password for private files
:param aspera_maximum_bandwidth: Aspera maximum bandwidth (e.g 50M, 100M, 200M), depending on the user's network bandwidth, default is 100M
Expand Down Expand Up @@ -269,10 +269,10 @@ def download_file_by_name(
help="output folder to download files",
)
@click.option(
"--skip-if-downloaded-already/--no-skip-if-downloaded-already",
"--skip-if-downloaded-already",
is_flag=True,
default=True,
help="Skip the download if the file has already been downloaded. Default is to skip.",
default=False,
help="Skip the download if the file has already been downloaded.",
)
def download_px_raw_files(accession: str, output_folder: str, skip_if_downloaded_already: bool):
"""CLI wrapper to download raw files via ProteomeXchange XML."""
Expand Down
Loading