semvec/pypi-packages huggingface dataset:
relasticsearch-cli 0.0.0
Elasticsearch CLI client

# Elasticsearch CLI

Elasticsearch CLI client

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Overview](#overview)
- [](#)
- [Usage](#usage)
- [Example](#example)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Overview

This is a thin CLI wrapper around the ES API. Supports AWS IAM authentication.

## Install

```sh
pip3 install relasticsearch-cli
```

To install with AWS IAM support,

```sh
pip3 install relasticsearch-cli[aws]
```

## Usage

```txt
usage: es [-h] [--body BODY] [--aws-auth AWS_AUTH]
          [--aws-domain AWS_DOMAIN] [--endpoint ENDPOINT]
          [--username USERNAME]
          {DELETE,GET,HEAD,PATCH,POST,PUT} path

positional arguments:
  {DELETE,GET,HEAD,PATCH,POST,PUT}
                        HTTP method
  path

optional arguments:
  -h, --help            show this help message and exit
  --body BODY           Request body
  --aws-auth AWS_AUTH
  --aws-domain AWS_DOMAIN
                        AWS domain
  --endpoint ENDPOINT   Endpoint URL, without the path
  --username USERNAME   Username for basic auth
```

## Example

List indices:

```sh
es --endpoint http://localhost:9200 GET /_cat/indices
```

```txt
green open .kibana_1        XTv6AdigRqWMafUfInRsTg 1 1
```

List indices for AWS Elasticsearch:

```sh
es --aws-domain example GET /_cat/indices
```
pycococt 0.1
Python interface to the COCO-CameraTrap datasets.

# pycococt

> [COCO-CameraTrap](https://github.com/microsoft/CameraTraps/blob/9384e69564a0c425b9ecdef3b050ab75a14e4413/data_management/README.md) Indexer. An extension to pycocotools including location and sequence indexing.

## Features

- Extends / Backwards compatable with [pycocotools](https://github.com/cocodataset/cocoapi/tree/master/PythonAPI/pycocotools)
- Indexing for Locations and Sequences

## Install

```sh
pip install pycococt
```

## Usage

```python
from pycococt.cococt import COCOCT

ds = COCOCT('path to COCO-CameraTrap')

# all the core indexes and helpers in pycocotools
ds.imgs
ds.anns
ds.cats
ds.catToImgs
ds.imgToAnns

# with aditional camera trap indexes
ds.locs      # = [
             #   'Location1',
             #   'Location2',
             #   'Location3',
             #   ...
             # ]

ds.locToImgs # = { 'Location1': {
             #        'imageid': {
             #           'id': 'imageid',
             #           'location': 'Location1',
             #           'height': ...
             #         }
             #      },
             #      ...
             #    }

ds.locToSeqs # = {
             #     'Location1': [
             #         'seq id 1_1',
             #         'seq id 1_2',
             #         ...
             #     ],
             #     'Location2': [
             #         'seq id 2_1',
             #         'seq id 2_2',
             #         ...
             #     ]
             #     ...
             # }

ds.seqToImgs # = { 'sequence 1 id': [
             #       {
             #           'id': 'image id',
             #           ...
             #        },
             #        {
             #           'id': 'image id',
             #           ...
             #        },
             #        ...
             #     ],
             #     'sequence 2 id: [
             #       ...
             #     ]
             #       ...
             #    }
```
graph-sc 0.0.3
Graph-sc
Requires Python: >=3.6

# Graph-sc

This repository contains the pytorch implementation of the paper "Clustering scRNA-seq data with graph neural networks", by Madalina Ciortan under the supervision of Matthieu Defrance.

We propose graph-sc, a method modeling scRNA-seq data as a graph, processed with a graph autoencoder network to create representations (embeddings) for each cell. The resulting embeddings are clustered with a general clustering algorithm (i.e. KMeans, Leiden) to produce cell class assignments.
An extensive experimental study was performed on 24 simulated and 15 real-world scRNA-seq datasets. graph-sc was compared with 11 competing state-of-the-art techniques on 4 clustering scores, reflecting both the external and the internal clustering performance. The results indicate that although there is no consistently best method across all analyzed datasets, graph-sc compared favorably with the competing techniques across all types of datasets. A large ablation study evaluates numerous strategies to create the input graph, the graph autoencoder network and also the clustering phase. The proposed method is stable across consecutive runs, robust to input down-sampling, generally insensitive to changes in the network architecture or training parameters and more computationally efficient than other competing methods based on neural networks. Moreover, modeling the data as a graph provides an increased flexibility to define custom features characterizing the genes, the cells and their interactions as well as the possibility to enrich the graph with external data (i.e. gene correlations).

## Installation

The package requires python >= 3.6 and can be installed by running:

```
pip install graph-sc
```

## Tutorial

First import required libraries:
```
import h5py
import matplotlib.pyplot as plt
import numpy as np
import pkg_resources
import graph_sc.models as models
import graph_sc.train as train

device = train.get_device(use_cpu=True)
print(f"Running on device: {device}")
```

Then load the data to be analyzed. The package provides an example dataset:

```
DATA_PATH = pkg_resources.resource_filename("graph_sc", "data/")
data_mat = h5py.File(f"{DATA_PATH}/worm_neuron_cell.h5", "r")

X = np.array(data_mat["X"])

Y = np.array(data_mat["Y"]) # this is optional
n_clusters = len(np.unique(Y)) # this is required for KMeans
```

Run the model training:

```
scores = train.fit(X, Y, n_clusters, cluster_methods=["KMeans"])
print(scores)
```

Get the resulting embedding:

```
embeddings = scores["features"]
```

This embedding can be used as input to any other downstream task.



Plot the latent space and the underlying prediction:

```
pca = PCA(2).fit_transform(embeddings)
plt.figure(figsize=(12, 4))
plt.subplot(121)
plt.title("Ground truth")
plt.scatter(pca[:, 0], pca[:, 1], c=Y, s=4)

plt.subplot(122)
plt.title("K-Means pred")
plt.scatter(pca[:, 0], pca[:, 1], c=scores["kmeans_pred"], s=4)
```