semvec/pypi-packages huggingface dataset:
resmali 0.1.0
Scoring matrix-assisted ligand identification (SMALI) rewritten.
Requires Python: >=3.7

# reSMALI
Scoring matrix-assisted ligand identification (SMALI) rewritten

A tool for predicting SH2 domain binding from peptide sequences with the format xx-Y-xxxx

The original SMALI was described in Huang H, Li L, Wu C, et al. Defining the specificity space of the human SRC homology 2 domain. Mol Cell Proteomics. 2008;7(4):768-784. doi:10.1074/mcp.M700312-MCP200 . However the tool is no longer hosted and is therefore no longer accessible. As the SMALI prediction tool was based on a experimental dataset, the loss of the tool represents the loss of a unique datapoint for making SH2 domain prediction. 

The complete OPAL array dataset upon which the original SMALI tool used was not published. However normalised intensinty values making up 20% or more of the total intensity for a given position within the peptide sequence was published. reSMALI uses this data to generage its own 'reSMALI' scores which are an attempt to emulate the scores provided by the original tool.

## Installing

```
pip install resmali
```

## Predict SH2 domain binding

To predict SH2 domain binding with a com

```python
predict_protein(protein_seq, sh2 = None, local_threshold='preset')
```

Where 'protein_seq' is your protein sequence. When 'sh2' is set to 'None', predictions will be made for all SH2 domains.

This function will return a list with the columns [positon, sequence, sh2motif, sh2_threshold, score ]

The local threshold is precalculated as the top 5% of scores for all valid phospho-tyrosines within the human proteome for that SH2 domain.

Note this function will only return SH2 domains where the reSMALI score is above the set local_threshold

To show the reSMALI scores for all valid phospo-tyrosine motifs and SH2 domains the  'local_threshold' can be set to '0' when using the predictProtein function. 

###Example

```python
import resmali
resmali.predict_protein("EEVVARyLNRNyWEkKQEEARyLN")

>>>[[6, 'ARYLNRN', 'GADS', 1.88, 2.0],
 [6, 'ARYLNRN', 'GRAP', 1.33, 2.96],
 [6, 'ARYLNRN', 'GRB2', 0.99, 1.73],
 [6, 'ARYLNRN', 'GRB7', 0.85, 0.98],
 [6, 'ARYLNRN', 'HSH2D', 0.73, 2.77],
 [6, 'ARYLNRN', 'SH2D2A', 1.72, 2.87],
 [6, 'ARYLNRN', 'SHE', 1.19, 1.2]]
```

## Just give me predictions

```
condensed_list(protein_seq, sh2 = None, local_threshold='preset')
```

This function will return a list with only SH2 domain predictions in the format '[Position, SH2 domain]'

###Example

```python
import resmali
resmali.condensed_list("EEVVARyLNRNyWEkKQEEARyLN")

>>>[[6, ['GADS', 'GRAP', 'GRB2', 'GRB7', 'HSH2D', 'SH2D2A', 'SHE']]]
 ```
flask-fullstack 0.5.10
A utility package for projects using flask, sqlalchemy, socketio and pytest
Requires Python: >=3.10,<4.0

# Flask-Fullstack
Flask-Fullstack is an utils package for projects using a fleet of libs:
- [Flask](https://flask.palletsprojects.com/en/2.2.x/)
- [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/)
- [SQLAlchemy](https://www.sqlalchemy.org/)
- [Flask-SQLAlchemy](https://flask-sqlalchemy.palletsprojects.com/en/3.0.x/)
- [SocketIO](https://socket.io/) & [Flask-SocketIO](https://flask-socketio.readthedocs.io/en/latest/)
- [pytest](https://docs.pytest.org/en/7.1.x/)
- [pydantic-marshals](https://github.com/niqzart/pydantic-marshals)

It is currently in deep development.
Package is maintained by one programmer ([hey that me!](https://github.com/niqzart)).
In this readme you can find:
- [Install instructions](#install)
- [Quick start guide](#quick-start)
- [Current features](#features)
- [Planned features](#future)

## Install
### Add the library to your project
```sh
pip install flask-fullstack  # via pip
poetry add flask-fullstack  # via poetry
```

### Working with this repository
```sh
pip install poetry==1.5.1
poetry install
```

## Quick Start
TBD

## Features
### Interfaces & Mixins
- [Database Interfaces](./docs/database-interfaces.md): Implement these to later automate searching & authorization (see below)
- Mixins with Decorators: Classes full of useful decorators to be used in less abstract context (see below)

### RESTX improvements
- New Marshals: form SQLAlchemy to Pydantic and then to the Response Marshaling
- [Upgraded Parsers](./docs/upgraded-parsers.md): just a couple of commonly used parsers to `.copy()`
- Resource Controller: RESTX's Namespace, but with access to useful decorators from mixins

#### New Marshals
New models, created in `flask_fullstack.restx.marshals`, are a translation layer between Pydantic & RESTX's own Models. These models also support being created from SQLAlchemy tables via Column reflection

For Pydantic, it only supports as fields: the keys of `flask_fullstack.restx.marshals.type_to_field`, `list`s and nesting other Pydantic models

For SQLAlchemy, it only supports converting columns of types in the keys of `flask_fullstack.restx.marshals.column_to_field`

## SocketIO eXtensions
- Understandable Events: Makes possible automatic documentation, data validation (with New Marshals or pure Pydantic) & emits not just by the event's name
- Event Controller: Used to group events & provide access to useful decorators from mixins
- Upgraded Structures: Propagating new events & other utils to Flask-SocketIO's `Namespace`s & the `SocketIO` class itself

## Other Utils
- SQLAlchemy Simplified: creating objects, parsing query results, deleting objects
- New Columns: JSON with Schema or a RESTX Model to use in New Marshals
- Named: If some class attribute needs to know the attribute name
- Other: Utils for dicts, pydantic, pytest, unpacking RESTX responses, TypeEnum, etc
- Core: For simplifying the common project setup steps

## Future
TBA

## Contributing
You are welcome to create issues and PRs in this repository. I'll get to them as soon as I have time!
pylint-websockets 0.1.2
A Pylint plugin for the Python websockets library
Requires Python: >=3.7

# Pylint Websockets

A pylint plugin for websockets

## Installation

Via Pip

```
pip install pylint-websockets
```

Via Poetry

```
poetry add --dev pylint-websockets
```

## Usage

Add the following arguments when running Pylint:

```
--load-plugins=pylint_websockets
```

Alternatively, add the following to your `pyproject.toml`:

```toml
[tool.pylint.MASTER]
load-plugins = 'pylint_websockets'
```
act-neuron 0.1.9
Automatic Cell Tuner
Requires Python: >=3.8

# Automatic Cell Tuner (act)

`act` provides tools for optimization-based parameter selection for biologically realistic cell models developed in [NEURON](https://neuron.yale.edu/neuron/). The project is inspired by the [ASCT](https://github.com/pbcanfield/ASCT) library.

`act` relies on a simulation-based optimization, i.e., for a pipeline

Parameters -> Black-box simulator -> Simulated data

it tries to obtain parameter estimates indirectly by working with simulated data.

## Installation

Currently, `act` can be installed from GitHub using pip or locally with the standard `pip` installation process.

```bash
pip install act-neuron
```

```bash
git clone https://github.com/V-Marco/ACT.git
cd ACT
pip install .
```

## Usage

### Prerequisites

Conceptually, `act` requires three components.

1. A `.hoc` file which declares the cell's properties.
2. Modfiles for this `.hoc` file.
3. Target voltage data of shape (num_cur_inj, ...) to predict on OR parameters to simulate target data with.

### Pipeline
`act` operates in original and segregated modes. Original mode runs in the following steps:
1. Generate a parameter set uniformly randomly from a (lower; upper) interval for each current injection.
2. Simulate a voltage trace for each current injection and respective parameter set.
3. Extract key summary features (e.g., inter-spike time), and keep parameter sets for those voltage traces which match the target voltage trace in these summary features.
4. Repeat steps 1-3 until the specified number of current injections is matched.
5. Train a neural network model to predict conductance values from a voltage trace using saved sets as targets.
6. Predict conductance values by applying the trained model to the target voltage data. Take the maximum of each predicted value across all current injections.

Segregated mode changes step 5 so that the model is trained on regions of a voltage trace. The regions can be specified in terms of time (X-axis) or voltage (Y-axis) bounds.

### Setting up a simulation

Simulations' parameters are defined as `python` classes in `simulation/simulation_constants.py`. 
- Names of parameters to optimize for are defined in the `params` property. The names must match the hoc file. Lower and upper bounds are specified in `lows` and `highs` properties.
- Segregated parameters and respective time/voltage bounds are specified as lists-of-lists in the respective `segr_...` properties.

### Running a simulation

`simulation/run_simulation.py` is an example script of running `act` on Pospichil's cells.

`simulation/analyze_res.py` is an example script which gives a summary of the model's quality.


### Examples (Jupyter Notebook)

`examples/Pospischil_sPYr/main.ipynb` example of running `act` on Pospichil's cells

On Google Colab: 

* [Pospischil_sPYr](https://colab.research.google.com/github/V-Marco/ACT/blob/main/examples/Pospischil_sPYr/main.ipynb)
* [LA Type A](https://colab.research.google.com/github/V-Marco/ACT/blob/main/examples/LA/Cell_A.ipynb)