gcell.protein.uniprot.UniProtAPI.batch_download_xml

gcell.protein.uniprot.UniProtAPI.batch_download_xml#

UniProtAPI.batch_download_xml(input_csv, output_dir=None, max_workers=16)[source]#

Download UniProt XML files in batch for a list of gene names.

Parameters:
input_csv str | Path

Path to input CSV file containing gene names (one per line)

output_dir str | Path | None (default: None)

Directory where XML files will be saved (default: cache_dir/uniprot_xml)

max_workers int (default: 16)

Number of parallel download workers (default: 16)

Return type:

None

Notes

The input CSV file should contain one gene name per line without a header. The function will automatically map gene names to UniProt IDs and download the corresponding XML files.

Example

client = UniProtAPI()
client.batch_download_xml(
    input_csv="genes.csv", output_dir="xml_files", max_workers=8
)