semvec/pypi-packages huggingface dataset:
scENVI 0.1.0
ENVI
Requires Python: >=3.7

# ENVI - Integrating scRNA-seq and spatial data to impute missing genes and reconstruct spatial context 

# Installation 
Install ENVI (and COVET) through pypi:
 
```
pip install scENVI

```

# Tutorial

For a tutorial on how to run ENVI and analyze the results, go to example notebook at: https://github.com/dpeerlab/ENVI/blob/main/MOp_MERFISH_tutorial.ipynb.


# Usage

To run ENVI:
```
from scENVI import ENVI

ENVI_Model = ENVI.ENVI(spatial_data = st_data, sc_data = sc_data)
ENVI_Model.Train()
ENVI_Model.impute()
ENVI_Model.infer_cov()

```
 
and to get the model's outputs:


```
st_data.obsm['envi_latent'] = ENVI_Model.spatial_data.obsm['envi_latent']
st_data.obsm['COVET'] = ENVI_Model.spatial_data.obsm['COVET']
st_data.obsm['COVET_SQRT'] = ENVI_Model.spatial_data.obsm['COVET_SQRT']
st_data.uns['COVET_genes'] =  ENVI_Model.CovGenes

st_data.obsm['imputation'] = ENVI_Model.spatial_data.obsm['imputation']


sc_data.obsm['envi_latent'] = ENVI_Model.sc_data.obsm['envi_latent']
sc_data.obsm['COVET'] = ENVI_Model.sc_data.obsm['COVET']
sc_data.obsm['COVET_SQRT'] = ENVI_Model.sc_data.obsm['COVET_SQRT']
sc_data.uns['COVET_genes'] =  ENVI_Model.CovGenes

```
And To run COVET (just on spatial data):

```
ENVI.COVET(st_data, k = 8, g = 64, spatial_key = 'spatial')
```

COVET information will be in:

```
st_data.obsm['COVET'] 
st_data.obsm['COVET_SQRT'] 
st_data.uns['COVET_Genes']
```
tokenizador 1.50
Text tokenizer done for SPLN 2022/2023


# Table of Contents

1.  [Objetivo](#org300bd8b)
2.  [Argparser](#org3b0f028)



<a id="org300bd8b"></a>

# Objetivo

-   O objetivo deste TPC era a criação de um package python que recebesse como input ficheiros textos e fosse capaz de os tokenizar. Passando como argumento alguns regex costumizados transformá-los em tokens que iriam aparecer no texto final.
-   Por fim era ainda objetivo a disponibilização do módulo feito num repositório como o pypi ou o testpypi
-   Era ainda possível adicionar tokens costumizáveis com o argumento &#x2013;abbreviations, sendo estas definidas em formato json


<a id="org3b0f028"></a>

# Argparser

    usage: Tokenizor [-h] [--files [FILES ...]] [--chapter CHAPTER] [--pagebreak PAGEBREAK] [--output [OUTPUT ...]]
                     [--append] [--abbreviations ABBREVIATIONS]
    
    Tokenize a file given as input
    
    options:
      -h, --help            show this help message and exit
      --files [FILES ...], -f [FILES ...]
                            Define the file that is supposed to be tokenized
      --chapter CHAPTER, -cap CHAPTER
                            Define the regex for a Chapter
      --pagebreak PAGEBREAK, -pb PAGEBREAK
                            Define the regex for a page break
      --output [OUTPUT ...], -o [OUTPUT ...]
                            Define the output files to be written. The output files will map to the same order of
                            input files. If number of output files is less than the number of input files then the
                            other files will be written to the stdin.
      --append, -a          Define if the output is supposed to be appended
      --abbreviations ABBREVIATIONS, -abbr ABBREVIATIONS
                            Define the path to a json with a json that maps the regex of the abbreviation with the
                            token wanted.