# allos


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install allos
```

## Basic workflow

### Plot transcript module

Plot transcript module can be used on its own to explore the structure
on known and especialy new transcripts. The long read sequencing methods
are great to discovar new isoforms and it is often important to compare
their structure with known isoforms. Transcript’s structure can be
visualized with draw_transcript function from your own list of exons or
directly by indicating a valid Ensemble id. get_coord_from_tscrpt_id
function takes a transcript’s Ensemble id as an input and returns
coordinates of exons and strand.

``` python
import allos.plot_transcripts as ptr
```

![](index_files/figure-commonmark/cell-2-output-1.png)

To draw custom transcript provide the exons coordinate as in the example
below:

``` python
new_isoform = [[134195740, 134195631],
  [134197486, 134197414],
  [134198150, 134197978],
  [134200306, 134200115],
  [134201154, 134200643]]
# ptr.draw_transcript takes as arguments a list of exons coordinates, strand (1 or -1) and color
ptr.draw_transcript(new_isoform, -1, color="lightblue")
```

![](index_files/figure-commonmark/cell-3-output-1.png)

The exons coordinates for know isoforms can be retrieved with
get_coord_from_tscrpt_id(transcipt_id) function. In this case to
visualize known transcript use:

``` python
draw_transcript(get_coord_from_tscrpt_id("ENSMUST00000030636"), 1, color="lightblue")
```

Multiple transcripts can be vizualized on one panel with the function
draw_transcripts_list where the transcripts’ ids are provided as a list.
The list can be a mix of known and novev, custom defined transcripts:

``` python
ptr.draw_transcripts_list(["ENSMUST00000030636", "ENSMUST00000105867", "ENSMUST00000105868", "ENSMUST00000130253", "ENSMUST00000127279"])
```

![](index_files/figure-commonmark/cell-4-output-1.png)

### Gene report module

``` python
import allos.gene_report as gr
```

    /home/diamant/.conda/envs/iso_swt/lib/python3.9/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
      @numba.jit()
    /home/diamant/.conda/envs/iso_swt/lib/python3.9/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
      @numba.jit()
    /home/diamant/.conda/envs/iso_swt/lib/python3.9/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
      @numba.jit()
    /home/diamant/.conda/envs/iso_swt/lib/python3.9/site-packages/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
      @numba.jit()
    2024-08-27 11:29:16.065303: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
    2024-08-27 11:29:16.375468: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
    To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
    2024-08-27 11:29:17.611483: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT

    <Figure size 100x100 with 0 Axes>

plot_isoforms_summary is a nice way to build a basic summary of your
data. It summs up information on how many genes are expressed per cell
type, how many transcripts contains your dataset in general and reports
on how many genes are expressed by multiple isoforms.
