Skip to main content

Installation

To install on Linux type into the commandline:

pip install TCRnumba

It requires CUDA and is not yet tested for MacOS or Windows.

Usage

In Python you can import

import TCRnumba

Then, test the script, by running the additional commands

import TCRnumba.graph_numba as gn
import TCRnumba.convert_pure as cp
adjacency_sparse = gn.adjacency_matrix(['ABC', 'DEF', 'EFG', 'ABC', 'ABD', 'EEE', 'EEF', 'EFF', 'GGE', 'GAS'], N_part=2, len_xy=5, direct_output=True)
cp.convert_pure(adjacency_sparse, 2, 5)

Use SONIA to create files

sonia-generate --humanTRB -n 1000000 --pre -o pre_example.txt

Functions

convert_pure(sparse, single_sidelength, len_x)

Takes list of single digit indices and convert into a dense matrix.

dense_matrix(data, len_xy)

Takes list of two digit indices and convert that into a dense matrix.

total_idx(el, N_part, i, j, len_x, len_y)

Converts indices from single-number indices to two-number indices. "N_part" is the number of strings in each block. i and j are int numbers, referring to the index of the block. len_x and len_y are int numbers denoting the number of blocks in height and length.

adjacency_matrix(seq, name="sparse.txt", idx_max=0, name_params="data/sparse_params.txt", N_part=None, len_xy=None, direct_output=False)

Inputs a list of strings "seq" and calculate the distance matrix. Save under the filename "name". // define the other params of all the presented functions

robustness distribution

(a) The relative size of the largest connected component (LCC) as a function of $1-p$, where $p$ is the fraction of removed nodes. The TCR network has \NSeqRobustness nodes with lmax = 1. The TCR network does not exhibit a
percolation phase transition. Moreover, the system is robust against small node removal. (b) The corresponding degree distribution of the same network is plotted for (0.01, 0.49, 0.69, 0.89) with darker green indicating a smaller p. With increasing p, the curve shifts downwards and becomes steeper as the number of nodes decreases.

Release files for TCRnumba 0.2.6

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

Source distribution (sdist)

Source distribution for TCRnumba 0.2.6
File Size Uploaded
TCRnumba-0.2.6.tar.gz 27.9 kB Details

Release files / TCRnumba-0.2.6.tar.gz

Download URL TCRnumba-0.2.6.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3878cbdf8a635c0b1ba64974b4ab89c26f820b2347e9bac85cf7f1cd3b3acf54
BLAKE2b-256 checksum
How to use checksums
3e217eab7964db09b9da41c77f164c82c2dd59f5590c777ffd3938166aa06721
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.2.6 This release

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.1

1 release file

0.1.0

1 release file

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