Skip to main content

AICelltype: Annotate cell type through gpt-4 without openai key.

Project description

AICelltype

Installation

You can use pip install package directly.

pip install AICelltype

However I strongly recommend a virtual environment, if you do not have conda please install Miniconda first.

conda create -n aicelltype_env python=3.10.0
conda activate aicelltype_env
pip install AICelltype

Parameters

tissue_name
      In theory, tissue_name can be any type of biological tissue.
gene_list
      Identify one cell type for each row in gene_list.
model
      One model should be chosen from ['gpt4', 'qwen-max', 'ERNIE-4.0'].
      gpt4: annotate cell type through gpt4 (default);
      qwen-max: annotate cell type through ali qwen model, QWEN_KEY needed, refer to link for a key;
      ERNIE-4.0: annotate cell type through baidu qianfan model, API_KEY and SECRET_KEY needed, refer to link for them.

Usage

tissue_name = 'human prostate'
gene_lt = [
    ['KLK3', 'KRT8', 'KLK2', 'MSMB', 'ACPP', 'KLK1', 'KLK4'],
    ['MMRN1', 'FLT4', 'RELN', 'CCL21', 'PROX1', 'LYVE1'],
    ['CD69', 'IL7R', 'CD3D', 'CD3E', 'CD3G', 'ACTA2', 'MYO1B', 'ACTA2', 'ANPEP', 'PDGFRB', 'CSPG4'],
    ['DDX49', 'LOC105371196', 'MTND1P30', 'LOC105373682', 'TAGLN2', 'ZNF836', 'ZNF677', 'COILP1']
]

usage1:
    # gpt4 model
    from AICelltype import aicelltype
    cell_lt = aicelltype(tissue_name, gene_lt, model='gpt4')
    print(cell_lt)
output1:
    ['Prostate Epithelial Cells', 'Lymphatic Endothelial Cells', 'T Cell and Myofibroblast', 'Unknown Cell Type']  # In result, you can get a list with four cell types which have the same order with parameter gene_list.

usage2:
    # qwen-max model
    import os
    os.environ['QWEN_KEY'] = 'your QWEN_KEY'  # Add QWEN_KEY to environ, keep secret to yourself.
    
    from AICelltype import aicelltype
    cell_lt = aicelltype(tissue_name, gene_lt, model='qwen-max')
    print(cell_lt)
output2:
    ['Prostate secretory epithelial cell', 'Lymphatic endothelial cell', 'Immune cell (likely T-cell) and smooth muscle cell mixture', 'Unknown cell type']

usage3:
    # ERNIE-4.0 model
    import os
    os.environ['API_KEY'] = 'your AIP_KEY'  # Add API_KEY to environ, keep secret to yourself.
    os.environ['SECRET_KEY'] = 'your SECRET_KEY'  # Add SECRET_KEY to environ, keep secret to yourself.
    
    from AICelltype import aicelltype
    cell_lt = aicelltype(tissue_name, gene_lt, model='ERNIE-4.0')
    print(cell_lt)
output3:
    ['Prostate glandular cells (or Prostate epithelial cells)', 'Lymphatic endothelial cells', 'T-cells (or T-lymphocytes)', 'Unknown cell type (or Possibly cancer-associated cells or Stromal cells; needs further investigation)']  # This model give more explaination.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aicelltype-0.0.6.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

AICelltype-0.0.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file aicelltype-0.0.6.tar.gz.

File metadata

  • Download URL: aicelltype-0.0.6.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.0

File hashes

Hashes for aicelltype-0.0.6.tar.gz
Algorithm Hash digest
SHA256 624881ef1678c4bbf2ea0323780bdbbf853ba730d64f450d448430f874dedc11
MD5 70a62cf9f074969a6040ebedb234c502
BLAKE2b-256 cd90ddbeb67601de9de7e283ac04fe50cf6a2a688b7fc03363026aad0ea38b88

See more details on using hashes here.

File details

Details for the file AICelltype-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: AICelltype-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.0

File hashes

Hashes for AICelltype-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fbb44fab545fb9ccc110e01217aebf601aedae79f8835ed69f04e95297945a78
MD5 e29b312fd50e5dcfa9db31892c10e022
BLAKE2b-256 7e0f76e16b736f73b27895a4a7b01c679e87ed05b2a37de0d7fde780261ca7a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page