Skip to main content

some description

Project description

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.

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

TCRnumba-0.2.6.tar.gz (27.9 kB view details)

Uploaded Source

File details

Details for the file TCRnumba-0.2.6.tar.gz.

File metadata

  • Download URL: TCRnumba-0.2.6.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for TCRnumba-0.2.6.tar.gz
Algorithm Hash digest
SHA256 3878cbdf8a635c0b1ba64974b4ab89c26f820b2347e9bac85cf7f1cd3b3acf54
MD5 dfdb984848ccba9eda67691f1668f562
BLAKE2b-256 3e217eab7964db09b9da41c77f164c82c2dd59f5590c777ffd3938166aa06721

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