inMOTIFin
Project description
README
inMOTIFin is a lightweight python package for simulating cis-regulatory elements. It consists of four command line modules and python access to the backend for advanced usage.
Complete documentation is found at https://inmotifin.readthedocs.io/en/latest/.
Simulation of sequences with inserted motif instances
This option of the inMOTIFin package is built using DagSim a simulation framework for causal models.
The directed acyclic graph (DAG) shown below describes the nodes and their relationship for the simulation. Each node describes a value or sampling strategy (depending on user input). The output of one node is the input to its downstream nodes.
Simulation of random sequences
by controlling their length, alphabet, and base preference
{
'background_sim_seq_0': 'CGCGTACGGGGTCCGACCCTTAAAA',
'background_sim_seq_1': 'CCGCGAACGTGGCCGTCTGCAGAAC',
'background_sim_seq_2': 'AGAGCACCGGACGTGACCGCGGAAT',
'background_sim_seq_3': 'GTTCCACCCGAAACCACAGCGGCTA',
'background_sim_seq_4': 'ACCGTACAAAGGAGGTAAATCGATG'
}
Simulation of motifs
by controlling their length, information content, and alphabet.
Left: simulated motif_1 ; right: simulated motif_2
Multimerisation of motifs
by providing distances between the motif components.
Motif_1 and motif_2 multimerised by setting a positive distance.
...or a negative distance.
How do I get set up?
Summary of set up
You can either install from pypi with the command
python -m pip install inmotifin
or pull the container at dockerhub. If you have docker installed, you can run from within the docker container with
sudo docker run -it cbgr/inmotifin:latest bash
Altenarively, you can also clone this repository, you may install the package locally by pip install -e . run in the folder where the setup.py file resides.
Dependencies
The code is written in python 3.9 . Dependencies (click, numpy, pandas, DagSim, pyjaspar, and biopython) are installed with the software.
How to run tests
Unit tests can be run with the pytest . command after cloning and installing the package locally.
As a developer, you can also see the results of the unit tests and an intergation test at pipelines.
Contribution guidelines
Coding style
The code is written in object oriented way. The code is documented with docstring following the numpy style. Please add input and output types to each function. Please set linting with pylint and flake8.
Writing tests
The aim is to have a decent test coverage, such as your best effort. The test folder mirrors the structure of the source (inmotifin) folder. The tests are using the unittest framework.
If you are not sure what to test, one way to go about it is to find which lines of the code are covered. This can be done using coverage.py coverage run -m pytest && coverage html command.
This generates multiple outputs, the one to keep an eye on is htmlcov/index.html. When opening this in your browser you can check which lines are covered by test and which are not.
Code review
Upon pull request. Please do not merge to main/dev without contacting the authors.
Other guidelines
The repository is connected to Jira, where the features and issues are listed. After familiarizing yourself with the current status of the software and the style, pick a feature and (from dev) create a branch for it in Jira. Please work on that branch and use smart commits. Once the feature is added, linting and the unit tests are passing, open a pull request to dev.
Who do I talk to?
Repo owner or admin
Katalin Ferenc (k.t.ferenc@ncmm.uio.no)
Other community or team contact
Anthony Mathelier (anthony.mathelier@ncmm.uio.no)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inmotifin-4.1.1.tar.gz.
File metadata
- Download URL: inmotifin-4.1.1.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079907474e355442b5c6ff4e3fdac7d4c9518b331093dd566e709b57f6a449b1
|
|
| MD5 |
c134a75d40248e9f67ac1086684caaba
|
|
| BLAKE2b-256 |
4417d091fccc05396a5ca9fa4d07e94947d0febe2bc9f3864d821b4042776bfd
|
File details
Details for the file inmotifin-4.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: inmotifin-4.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 65.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65e783d885ba8a836791f7c8f932121fe64a6131eb990f50f7c6614bb966be85
|
|
| MD5 |
b3e503882cc8edc0f4072208cb434188
|
|
| BLAKE2b-256 |
4859b45fbeb41596cf1ed5593cbbb0c157accc7c02c2f8648f34817d35ff7c11
|