Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
v1.0.0-alpha release (#9)
Browse files Browse the repository at this point in the history
* Working on new walker and window system.

* Updated README and prepared for release.

* Updated version tag.

* Added shields.

* Added line break.

* Fixed link.
  • Loading branch information
ggirelli authored Feb 26, 2021
1 parent cc23c72 commit cdb2e14
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### ...
- ...

## [0.0.1]
## [1.0.0-alpha] - 2021-02-26

[0.0.1] https://github.com/ggirelli/ifpd/releases/tag/v0.0.1
[1.0.0-alpha] https://github.com/ggirelli/ifpd/releases/tag/v1.0.0-alpha
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# iFISH Probe Design (II)

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor odit, dolorem, quia eum excepturi unde quis ab, adipisci illum aperiam laborum. Dolore sit perferendis consequatur eum obcaecati et ipsum placeat.
![](https://img.shields.io/github/license/ggirelli/ifpd2.svg?style=flat) ![](https://github.com/ggirelli/ifpd2/workflows/Python%20package/badge.svg?branch=main&event=push)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ifpd2) ![PyPI - Format](https://img.shields.io/pypi/format/ifpd2) ![PyPI - Status](https://img.shields.io/pypi/status/ifpd2)
![](https://img.shields.io/github/release/ggirelli/ifpd2.svg?style=flat) ![](https://img.shields.io/github/release-date/ggirelli/ifpd2.svg?style=flat) ![](https://img.shields.io/github/languages/code-size/ggirelli/ifpd2.svg?style=flat)
![](https://img.shields.io/github/watchers/ggirelli/ifpd2.svg?label=Watch&style=social) ![](https://img.shields.io/github/stars/ggirelli/ifpd2.svg?style=social)

[PyPi](https://pypi.org/project/ifpd2/) | [docs](https://ggirelli.github.io/ifpd2/)

`ifpd2` is a Python3.7+ package containing tools for selection of complementary oligonucleotides to build iFISH probes. It is based on our previous `ifpd` package, but works with a different and more detailed database format, allowing for more precise control on the probe design process. Read the online [documentation](https://ggirelli.github.io/ifpd2/) for more details.

## Requirements

`ifpd2` is fully implemented in Python3.7+, thus you need the corresponding Python version to run it. Check out [here](https://realpython.com/installing-python/) how to install Python+ on your machine if you don't have it yet.

`ifpd2` has been tested with Python 3.7 and 3.8. We recommend installing it using `pipx` (see [below](https://github.com/ggirelli/ifpd2#installation)) to avoid dependency conflicts with other packages. The packages it depends on are listed in our [dependency graph](https://github.com/ggirelli/ifpd2/network/dependencies). We use [`poetry`](https://github.com/python-poetry/poetry) to handle our dependencies.

## Installation

We recommend installing `ifpd2` using [`pipx`](https://github.com/pipxproject/pipx). Check how to install `pipx` [here](https://github.com/pipxproject/pipx#install-pipx) if you don't have it yet!

Once you have `pipx` ready on your system, install the latest stable release of `ifpd2` by running: `pipx install ifpd2`. If you see the stars (✨ 🌟 ✨), then the installation went well!

## Usage

All `ifpd2` commands are accessible via the `ifpd2` keyword on the terminal. For each command, you can access its help page by using the `-h` option. More details on how to run `ifpd2` are available in the online [documentation](https://ggirelli.github.io/ifpd2).

## Contributing

We welcome any contributions to `ifpd2`. In short, we use [`black`](https://github.com/psf/black) to standardize code format. Any code change also needs to pass `mypy` checks. For more details, please refer to our [contribution guidelines](https://github.com/ggirelli/ifpd2/blob/main/CONTRIBUTING.md) if this is your first time contributing! Also, check out our [code of conduct](https://github.com/ggirelli/ifpd2/blob/main/CODE_OF_CONDUCT.md).

## License

`MIT License - Copyright (c) 2021 Gabriele Girelli`
2 changes: 1 addition & 1 deletion ifpd2/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
@contact: gigi.ga90@gmail.com
"""

__version__ = "2.0.5"
__version__ = "1.0.0-alpha"
59 changes: 59 additions & 0 deletions ifpd2/walker2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"""
@author: Gabriele Girelli
@contact: gigi.ga90@gmail.com
"""

import logging
import pandas as pd # type: ignore
from typing import Tuple, Union


class GenomicWindowSet(object):
_window_data: pd.DataFrame = pd.DataFrame(
columns=[
"set_id",
"window_id",
"start",
"end",
"focus_start",
"focus_end",
]
)
_window_id: int = -1

feature: str # Chromosome
region: Tuple[int, int]

n_probes: int
window_size: int
window_shift: float

# Either in nt (x>1) or fraction of window_size (0<x<=1)
focus_size: Union[int, float]
# Either in nt (x>1) or fraction of focus_size (0<x<=1)
focus_step: Union[int, float]

_growing: bool = False

def __init__(self, region: Tuple[int, int]):
super(GenomicWindowSet, self).__init__()
self.region = region
assert self.region[0] <= self.region[1]

@property
def growing(self) -> bool:
return self._growing

@property
def reached_last_window(self) -> bool:
return (self._window_id + 1) == self._window_data.shape[0]

def init_windows_for_n_probes(self, n_probes: int) -> None:
if 0 < self._window_data.shape[0]:
logging.warning("cannot re-initalize windows.")
return

def init_windows_by_size(self, size: int, shift: float) -> None:
if 0 < self._window_data.shape[0]:
logging.warning("cannot re-initalize windows.")
return
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ifpd2"
version = "0.0.1"
version = "1.0.0-alpha"
description = "An iFISH probe design pipeline (II)"
authors = ["Gabriele Girelli <gigi.ga90@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit cdb2e14

Please sign in to comment.