Skip to main content

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.

DAG of the simulation

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

motif1 motif2

Multimerisation of motifs

by providing distances between the motif components.

Motif_1 and motif_2 multimerised by setting a positive distance.

dim1

...or a negative distance.

dim2

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

MIT license

Metadata

Release files for inMOTIFin 4.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inMOTIFin 4.1.1
File Size Uploaded
inmotifin-4.1.1.tar.gz 48.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inMOTIFin 4.1.1
File Interpreter ABI Platform
inmotifin-4.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 113.6 kB

Release files / inmotifin-4.1.1.tar.gz

Download URL inmotifin-4.1.1.tar.gz
Size 48.2 kB
Tags Source
SHA-256 checksum
How to use checksums
079907474e355442b5c6ff4e3fdac7d4c9518b331093dd566e709b57f6a449b1
BLAKE2b-256 checksum
How to use checksums
4417d091fccc05396a5ca9fa4d07e94947d0febe2bc9f3864d821b4042776bfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.7

Release files / inmotifin-4.1.1-py2.py3-none-any.whl

Download URL inmotifin-4.1.1-py2.py3-none-any.whl
Size 65.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
65e783d885ba8a836791f7c8f932121fe64a6131eb990f50f7c6614bb966be85
BLAKE2b-256 checksum
How to use checksums
4859b45fbeb41596cf1ed5593cbbb0c157accc7c02c2f8648f34817d35ff7c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

4.1.1 This release

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page