README.md 4.07 KB
Newer Older
1
# CoMut
2
[![License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/MIT)
3
[![codecov](https://codecov.io/gh/ypradat/comut/branch/master/graph/badge.svg?token=CQX2XVVU60)](https://codecov.io/gh/ypradat/comut)
Jett Crowdis's avatar
Jett Crowdis committed
4

5
CoMut is a Python library for creating comutation plots to visualize genomic and phenotypic information.
Jett Crowdis's avatar
Jett Crowdis committed
6

7
![melanoma_comut](examples/melanoma_comut.png)
Jett Crowdis's avatar
Jett Crowdis committed
8

9
10
## Installation

11
12
13
14
The original version (v0.0.3) of `comut` is available on pypi [here](https://pypi.org/project/comut/) and can be
installed via `pip install comut`.

This version is not yet available on `pypi` and may be installed via cloning of this repository on your session and then
15

16
17
18
```
pip install -e /path/to/this/repo
```
19

20
## Colab Quickstart
21

22
23
24
25
26
For those who do not want to install Python or other packages, there is a [Google Colab
notebook](https://colab.research.google.com/github/vanallenlab/comut/blob/master/examples/quickstart.ipynb) where you
can simply upload a [MAF](https://software.broadinstitute.org/software/igv/MutationAnnotationFormat) file and run the
notebook to make a basic comutation plot. This file is also available as a [jupyter
notebook](https://github.com/vanallenlab/comut/blob/master/examples/quickstart.ipynb) for local use. 
27

28
29
## Citation 

30
31
32
33
34
CoMut is now published
[here](https://academic.oup.com/bioinformatics/article/doi/10.1093/bioinformatics/btaa554/5851837). If you use CoMut in
a paper, please cite: 
> Crowdis, J., He, M.X., Reardon, B. & Van Allen, E. M. CoMut: Visualizing integrated molecular information with
comutation plots. Bioinformatics (2020). doi:10.1093/bioinformatics/btaa554
35

36
37
## Documentation

38
39
40
There is also a [Documentation notebook](https://github.com/vanallenlab/comut/blob/master/examples/documentation.ipynb)
that provides documentation for CoMut. It describes the fundamentals of creating comutation plots and provides the code
used to generate the comut above.
41
42
43
44

## Development

If you would like to report a bug or request a feature, please do so using the [issues page](https://github.com/vanallenlab/comut/issues)
45
46
47

## Dependencies

48
CoMut runs on python 3.6 or later. CoMut requires the following packages as dependencies (they will be installed along with CoMut if using `pip`)
49
50
51
52
53
54

```
numpy>=1.18.1
pandas>=0.25.3
palettable>=3.3.0
matplotlib>=3.3.1
55
56
57
58
```

## Versions

59
60
61
62
63
64
65
66
67
1.0.0 - Multiple changes
- Add arguments in the like of `xtick_style`, `xtick_fontdict`, `xtick_show`, `xtick_rotation`, `xlabel`,
`xlabel_fontsize`, `xlabel_fontweight` to the functions `add_categorical_data`, `add_continuous_data`, `add_bar_data`.
- Add functions `add_scatter_data`, `_plot_scatter_data` for drawing symbols on selected tiles (see example 2 below).
- Add functions `add_side_error_data`, `_plot_side_error_data` for drawing an error bar plot (see example 4).
- Modify `_plot_side_bar_data` to allow for grouped bars in `unstacked` mode. Add arguments to the function
  `add_side_bar_data` to control for the heights and gaps between the bars.


Jett Crowdis's avatar
Jett Crowdis committed
68
0.0.3 - No code is changed, description updated for public release  
69
0.0.2 - Introduce compatibility for Python 3.6  
70
0.0.1 - Initial release
71
72
73
74
75
76
77
78
79

## Examples

For the full code underlying these examples, see in `tests/test_comut`.
 
### Example 1

Basic example. 

80
![comut_design_1](tests/plots/comut_design_1.svg)
81
82
83
84
85
86
87

### Example 2

As compared to example 1, star symbols are added on certain cells and percentage labels were added on the left bar plot.
Observe that the star sometimes are composed of 2 colors. Additionally, xtick labels of the central plot have been
hidden.

88
![comut_design_2](tests/plots/comut_design_2.svg)
89
90
91
92
93
94


### Example 3

As compared to example 2, add a bar plot on the right.

95
![comut_design_3](tests/plots/comut_design_3.svg)
96
97
98
99
100
101


### Example 4

As compared to example 3, replace the right bar plot by a right error bar plot.

102
![comut_design_4](tests/plots/comut_design_4.svg)
103
104
105
106
107
108


### Example 5

As compared to example 4, add another bar plot right of the right bar plot.

109
![comut_design_5](tests/plots/comut_design_5.svg)
110
111
112
113
114

### Example 6

As compared to example 1, replace a simple bar plot by grouped bar plot.

115
![comut_design_6](tests/plots/comut_design_6.svg)