Skip to main content

Chen and Yang Lab Multi fork Development cell lineage tree alignment

Project description

mDELTA: an algorithm for multifuricating Developmental cEll Lineage Tree Alignment.

PyPI - Python Version PyPI license

  • mDELTA is an algorithm for multifuricating Developmental cEll Lineage Tree Alignment. In essence, it compares two rooted, unordered, tip-labeled trees, and finds the best global / local correspondence between the nodes. The mDELTA program is designed for analyzing developmental cell lineage trees reconstructed through single-cell DNA barcoding (such as done by scGESTALT or SMALT, while greater cellular coverage is expected to yield more meaningful mDELTA alignments).

  • Except for dealing with cell lineage trees instead of biological sequences, mDELTA is conceptually similar to sequence alignment. It helps quantify similarity among different lineage trees, disentangle the consensus and variation, find recurrent motifs, and facilitate comparative/evolutionary analyses.

  • Also included in this repository are Python/R scripts for statistical analyses and visualization of mDELTA results, which facilitates their biological interpretation.

  • mDELTA was developed by Jingyu Chen under the supervision of Professor Jian-Rong Yang at the Zhongshan School of Medicine of Sun Yat-Sen University in China.

For details, please visit https://github.com/Chenjy0212/mdelta/blob/main/README2.md/.

Quick start

Installation

pip install mdelta

This will install mDELTA and its prerequisites

Running the program

mDELTA.py -h
usage: mDELTA [-h] [-nt NAME2TYPEFILE] [-nt2 NAME2TYPEFILE2] [-sd SCOREDICTFILE] [-t TOP] [-ma MAV] [-mi MIV] [-p PV] [-T TQDM]
              [-n NOTEBOOK] [-P PERM] [-a ALG] [-c CPUS] [-o OUTPUT] [-x DIFF] [-mg MERGE]
              TreeSeqFile TreeSeqFile2

Multifuricating Developmental cEll Lineage Tree Alignment(mDELTA)

positional arguments:
  TreeSeqFile           [path/filename] A text file storing cell lineage tree #1 in newick format. Tips can be labeled by name or
                        cell type. Branch lengths should be removed.
  TreeSeqFile2          [path/filename] A text file storing cell lineage tree #2 in newick format. Tips can be labeled by name or
                        cell type. Branch lengths should be removed.

optional arguments:
  -h, --help            show this help message and exit
  -nt NAME2TYPEFILE, --Name2TypeFile NAME2TYPEFILE
                        [path/filename] List of correspondance between tip name and cell type for cell lineage tree #1.
  -nt2 NAME2TYPEFILE2, --Name2TypeFile2 NAME2TYPEFILE2
                        [path/filename] List of correspondance between tip name and cell type for cell lineage tree #2.
  -sd SCOREDICTFILE, --ScoreDictFile SCOREDICTFILE
                        [path/filename] A comma-delimited text file used to determine similarity scores between cells. If there
                        are exactly three columns, they will be interpreted as (1) the cell (name or type) in Tree #1, (2) the
                        cell in Tree #2, and (3) the similarity score. If otherwise, the first column will be interpreted as the
                        cell (name or type) and the remaining columns as features of the cell (e.g. expression of a gene). The
                        similarity scores will be estimated between all pairs of cells based on the Euclidean distance calculated
                        using all the features. Overrides `-ma` and `-mi`.
  -t TOPN, --top TOPN   [int > 0] Performs local (instead of global) alignment, and output the top TOPNUM local alignments with the
                        highest score (e.g. `-t 10`). In the case of global alignment, this parameter should be omitted.
  -ma MAV, --mav MAV    [float]
  -mi MIV, --miv MIV    [float] Shorthand for a simple matching score scheme, where the matching score between a pair of the same
                        cell types is MAV and all other pairs are MIV. (e.g. `-ma 2 -mi -2`). Overridden by `-sd`.
  -p PV, --pv PV        [float] The score for pruning a tip of the tree (e.g. `-p -2`). Default to -1.
  -T TQDM, --Tqdm TQDM  [0(off) or 1(on)] Toggle for the jupyter notebook environment.
  -n NOTEBOOK, --notebook NOTEBOOK
                        [0(off) or 1(on)] Toggle for the jupyter notebook environment.
  -P PERM, --PERM PERM  [int > 0] Toggle for the statistical significance. For each observed alignment, the aligned trees will be
                        permuted PERM times to generate a null distribution of alignment scores, with which a P value can be
                        calculated for the observed alignment score.
  -a ALG, --Alg ALG     [KM / GA] Use Kuhn-Munkres or Greedy Algorithm to find the optimal alignment score.
  -c CPUS, --CPUs CPUS  [int > 0] Number of threads for multi-processing. Default to 50., it can reach the maximum number of local
                        CPU cores - 1.
  -o OUTPUT, --output OUTPUT
                        [path/filename] Output filename
  -x DIFF, --diff DIFF  [int > 0] Alignment must consist of a minimal 
                        of DIFF% aligned cell pairs that are different from previous(better) local
                        alignments in order to be considered as another new alignment (e.g. `-x 20` means 20%).
  -mg MERGE, --merge MERGE
                        [float] This is the scaling factor for calculating the score of merging an internal node (e.g. -mg -1),
                        which is multiplied by the number of tips of the internal node to be merged. Default to 0.

More details on https://github.com/Chenjy0212/mdelta

Aligning a tree with itself, output top three local alignments

mDELTA.py ExampleFile/tree.nwk ExampleFile/tree.nwk -t 3

:writing_hand: Authors

    Jingyu Chen (EeWhile) :man:

    Student of SYSU. :school:

    ZHONGSHAN SCHOOL OF MEDICINE,SYSU https://zssom.sysu.edu.cn/zh-hans :sparkling_heart:

    Undergraduate majoring in computer science, master majoring in bioinformatics. :man_technologist:

    Below is the contact information of the author. :eyes:

    Github Stars Bilibili Zhihu Weibo neteasy-mysic douyin instagram
    QQ wechat mail gmail
    sysu

    sysulogo

If you use this project in your research, please cite this project.

@misc{mdelta2022,
    author = {Jingyu Chen},
    title = {mDELTA: Multifuricating Developmental cEll Lineage Tree Alignment},
    year = {2022},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/Chenjy0212/mdelta}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdelta-1.0.31.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

mdelta-1.0.31-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file mdelta-1.0.31.tar.gz.

File metadata

  • Download URL: mdelta-1.0.31.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for mdelta-1.0.31.tar.gz
Algorithm Hash digest
SHA256 7c33f2853b29cab7d6b19363a508b9efc8989c1505c7825b4303ea3c98dbb1b9
MD5 e675325de94d772b1e2854fb4cf0916b
BLAKE2b-256 bf07f3ef1046eeb879c5c7b38729b6ce659db20d832eb2256d1a8d7f3a48fb95

See more details on using hashes here.

File details

Details for the file mdelta-1.0.31-py3-none-any.whl.

File metadata

  • Download URL: mdelta-1.0.31-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for mdelta-1.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 5de9fac3749f619bfac2ae5814dd299a3051ee0157354f8e64b5f10fe6d1c235
MD5 292f1a9dfe2e3c74484862945eb21272
BLAKE2b-256 fcf7cce4be6ce2d8adaa7e987f7072f350ca88caf5faea0c269c53faf7e6f3bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page