semvec/pypi-packages huggingface dataset:
scutil 0.1.1
A Python package utils to support scanpy usage
Requires Python: >=3.8

## Installation

```{bash}
pip install scutil
```

This is for scRNAseq data analysis where

## usage

for qc and low dim visualization, starting from h5ad file,

as in the tests/

```{py}
import scutil as su
import scanpy as sc
import json
su.check_workdir("../")
adata = sc.read_h5ad("tests/_data/test.h5ad")

with open('tests/config/params.json', 'r') as f:
    config = json.load(f)

name = config['project_name']
adata = sc.read_h5ad(f"tests/_data/{name}.h5ad")
su.filter_adata(adata, **config['filter_params'])
su.norm_hvg(adata, name, n_top_genes=1000)
su.pca(adata, name, 30, pearson=False)
su.tsne_and_umap(adata, name, n_comps=10, pearson=False, key='celltype')

su.write_adata(adata, f'tests/_data/{name}_qc_vis.h5ad')
```
chATLAS-Chains 0.1.2
A modular Python package for implementing Retrieval Augmented Generation chains for the chATLAS project.
Requires Python: >=3.8


# chATLAS_Chains

This package implements and benchmarks various Retrieval Augmented Generation (RAG) chains for use in the [chATLAS](https://chatlas-flask-chatlas.app.cern.ch) project.

## Installation

```bash
conda create -n venv chatlas_chains_env python=3.10
conda activate chatlas_chains_env
pip install chatlas-chains
```

## Environment variables

These are required for the following use cases

1. Using an OpenAI LLM
```bash
export CHATLAS_OPENAI_KEY='your api key'
```

2. Benchmarking, set the path to the question set
```bash
export CHATLAS_BENCHMARK_QUESTIONS=/path/to/questions.josn
```

## Available Chains
- chains.basic.basic_retrieval_chain
- chains.basic_graph.basic_retrieval_graph

## Benchmarking

To benchmark e.g. the chains in `chATLAS_Chains.chains.basic` run this from the project root
```bash
python benchmark/basic.py
```

## Testing

The tests require a running postgres server to work. If on lxplus you can modify `TEST_DB_CONFIG` in [tests/conftest.py](tests/conftest.py) to connect to the chATLAS server.

If you want to create a local dummy postgres server, you need to install `psql`. This can be done on macOS using [homebrew](https://brew.sh):

Software install
```bash
brew install postgresql
brew services start postgresql
brew install pgvector
brew unlink pgvector && brew link pgvector
```

Create a user
```bash
psql -h localhost -U postgres
ALTER USER postgres WITH PASSWORD 'Set_your_password_here';
CREATE EXTENSION IF NOT EXISTS vector;
```