semvec/pypi-packages huggingface dataset:
spatialclique 0.1
Maximum clique for 2D or 3D points
License: MIT
Keywords: maximum clique spatial

# Spatial Clique

Applies the concept of a maximum clique to two sets of *corresponding* 2D or 3D points in order to find the largest group of points whose *relative* positions are the same in both sets. Sameness is defined via either a *hard* threshold (a Euclidean distance) or a *soft* threshold (a confidence level) applied to the differences between the intra-set distances. Soft thresholds require point covariance information.

The point sets can be thought of as "source" and "destination" in the sense that the "source" point set has been subjected to some type of transformation or deformation to produce the "destination" point set. The maximum clique will identify the largest group of points that exists in both point sets and differs by only a 6-parameter rigid-body transformation (translation and rotation). It cannot handle scale. Alternatively, the "source" and "destination" point sets could be putative correspondences, perhaps determined by a nearest neighbor metric in a descriptive feature space, generated from data obtained from two different observations of a common spatial scene.

The current implementation emphasizes clarity (for the creator, at least) and is deliberately inefficient. There are multiple nested `for` loops that could be replaced with more efficient mechanisms, e.g., scipy's `cdist` function could be used to compute all intra-point set distances.


## Installation

- Source: clone the repo and `pip install .`
- PyPI: `pip install spatialclique`
- Conda: perhaps in the future


## Usage

Not much to see here:

    from spatialclique import mc_hard
    max_clique_indices = mc_hard(src, dst, 0.2)

Of course, you must create the (M, 2) or (M, 3) sized `src` and `dst` arrays of 2D or 3D points first. The distance threshold is set to 0.2 in this example. 

For a soft threshold, you also need (M, 2, 2) or (M, 3, 3) sized arrays of covariance matrices (one for each point in the `src` and `dst` arrays):

    from spatialclique import mc_soft
    max_clique_indices = mc_soft(src, dst, src_cov, dst_cov, 95)

Here, we have set the confidence level to 95%. The covariance data is propagated through the distance and difference computations, and only those differences statistically equal to zero (at 95% confidence in this example) are included in the adjacency matrix that is fed to the maximum clique algorithm.


## Reference

None of this make sense? This [reference](https://arxiv.org/pdf/1902.01534.pdf) might help:

A. Parra, T. Chin, F. Neumann, T. Friedrich, and M. Katzmann, “A Practical Maximum Clique Algorithm for matching with Pairwise Constraints,” arXiv:1902.01534v2 \[cs.CV\], Feb. 2020.
fin-traffic-data 0.0.5
Fetching and aggregation of traffic data from Finnish roads
License: MIT
Requires Python: >=3.7

fin_traffic_data
================

Python package for:

1. fetching raw historical traffic data from
   `Finnish Transport Infrastructure Agency <https://vayla.fi>`_,
2. aggregating said data,
3. building directional graph between provinces/ervas and mapping
   the edges to the appropriate sections of the aggregated traffic data, and
4. visualizing the aggregated data.


Installation
------------

::

    pip3 install fin-traffic-data


Fetching raw traffic data
-------------------------

The console script `fin-traffic-fetch-raw-data` allows you to fetch the raw
traffic data of all traffic measuring stations between two dates. Usage::

    fin-traffic-fetch-raw-data --begin-date 2020-01-01 --end-date 2020-02-01

The dates are formatted as YYYY-MM-DD. The script spits out HDF5 files storing 
pandas dataframes with the filenaming convention `fin_traffic_raw_<begin-date>_<end_date>.h5`.

The output file contains the raw traffic data for each TMS in a dataset called
`tms_<tms id>`.

Aggregating raw data
--------------------

The console script `fin-traffic-aggregate-raw-data` allows you the aggregate pre-fetched
traffic data. Usage::
    
    fin-traffic-aggregate-raw-data --dir raw_data/ --time-resolution 1h

Here the options are

`--dir`
    Directory from which to load the datafiles for raw traffic data

`--time-resolution`
    Time-resolution of the aggregation. Use the literals `w` for weeks,
    `d` for days, and `h` for hours.

The script spits out a file named 
`fin_traffic_aggregated_<begin-date>_<end-date>_<time-resolution>.h5`.


Computing traffic between provinces and university hospital catchment areas
---------------------------------------------------------------------------

The console script `fin-traffic-compute-traffic-between-areas` can be used to compute 
traffic between different regions. For computing traffic between provinces, use the command::

    fin-traffic-compute-traffic-between-areas --area province --input aggregated_data/fi_traffic_aggregated-2020-01-01 00:00:00-2020-09-16 00:00:00-1:00:00.h5

For traffic between university hospital catchment areas, use the flag `--area erva`. This tool spits out a file named
`tms_between_ervas.h5` or `tms_between_provinces.h5`.


Converting province/ERVA level traffic to CSV format
----------------------------------------------------

For converting province/ERVA level traffic to a compressed archive of CSV-files, use the command::

    fin-traffic-export-traffic-between-areas-to-csv --area erva

This requires the file `tms_between_ervas.h5` and outputs the archive `tms_between_ervas.tar.bz2`.
altFACS 1.0.8
FACS tools for split fluorescent proteins
License: MIT

# altFACS
Author: David Brown

Last Edited: 2020-August-07

## Aim:
This package is intended to standardise and simplify the investigation of protein-protein interactions by flow cytometry.

## Explanation:
In the [Huang Lab](http://huanglab.ucsf.edu/) we are interested in developing new tools to examine biological interactions. Split fluorescent proteins have proven to be a useful tool for the tagging and study of endogenous proteins in living cells, and we have been trying to maximise their utility. Appropriate use of a split fluorescent protein as a probe requires a good understanding of the complementation process, whereby the two halves of the split meet and fold to form the mature fluorescent protein. Complementation can be studied biochemically, however we can exploit the self-reporting nature of fluorescent proteins to study complementation in vivo by microscopy or or flow cytometry which offers a higher throughput. 

Flow cytometry and fluorescence activated cell sorting (FACS) are more frequently used to distinguish cell populations based on a characteristic intensity profile. In our case we often use it to study how proteins behave at a range of concentrations. This alternative approach to FACS is the main purpose of the altFACS package.

## Example Plots:
![Example altFACS plots](https://github.com/BoHuangLab/altFACS/blob/master/images/mNG3_mCloGFP_altFACS_example.png)

### Example altFACS Plots:
- **A.** Raw flow cytometry events. 
- **B.** Scatter gating. Events from **A** after events saturating in any channel have been removed from all channels. Events likely to correspond to live cells have been gated based on a contour map.
- **C.** Singlet gating.Â Events from **B** after likely to contain more than one cell (below the line) are excluded.
- **D.** Negative control without transfection. Events from **C** after fluorescence gates have been set to contain 99% of the population.
- **E.** Transfected with CloGFP(1-10) only. 
- **F.** Positive control with full length sfGFP::CTLA:T2A:mTagBFP 
- **G.** Fitting of full length GFP in BFP+ cells. altFACS facilitates model fitting to flow cytometry data.
- **H.** CloGFP with wild type GFP11::CTLA:T2A:mTagBFP. 
- **I.** CloGFP with Y9F mutant GFP11::CTLA:T2A:mTagBFP. 
- **J-L.** Data from panels **G-I** rescaled for comparison. 

We conclude that split CloGFP complementation efficiency is much less than 100%, and that the Y9F mutation in the GFP11 fragment has no impact of split CloGFP complementation efficiency.

## Installation
Currently, altFACS is available on GitHub or on the [test.Pypi](https://test.pypi.org/project/altFACS/1.0.7/) site. 
Most [requirements](https://github.com/BoHuangLab/altFACS/blob/master/requirements.txt) will install automatically, but you may need to install [fcsparser](https://github.com/eyurtsev/fcsparser) before installing altFACS.
exterminator 0.8
Log the important data when a exception occurs.
License: MIT
Requires Python: >=3.6

# Pest control

Bugs are bad, but it's even worse when it happens in production, this is why it is a good idea to document all data possible when a exception occurs.

## Installing

``` bash
pip3 install exterminator
```

## Usage

You have three options.

### As a decorator

``` python
from exterminator import Exterminator

@Exterminator()
def main_function():
    # do stuff that might work

main_function()
```

### As a context manager

``` python
from exterminator import Exterminator

with Exterminator():
    # do stuff, you know the thing
```

### Globally

``` python
from exterminator import Exterminator

Exterminator().globally()

# that's it! now every exception that is not handled will be looged
```

## Important Note

If you are going to except all errors the context manager and globally solution wont work for you, the only option for you will be:

``` python
from exterminator import Exterminator

@Exterminator()
def main_function():
    # do stuff that work or not

try:
    main_function()
except:
    # do some stuff of you own...
```