XT-neighbor
|
A collection of conversion operations turning CDR3 strings into numerical representation. More...
#include "util.cu"
#include <string.h>
Macros | |
#define | CODEC_DEF |
Functions | |
int | char_encode (char amino_acid) |
encode character into 5 bit value (0-31). More... | |
Int3 | str_encode (char *str) |
encode peptide string into int3 struct with 6 characters encoded into an integer. More... | |
char * | str_decode (Int3 binary) |
decode binary form into peptide string. More... | |
__device__ __host__ int | len_decode (Int3 binary) |
find the string length in original form. More... | |
__device__ __host__ Int3 | remove_char (Int3 binary, int position) |
remove one character from the string in binary form (without turning it into the original string form). More... | |
void | print_int3_arr (Int3 *arr, int n) |
conviniently print Int3* in readable form. More... | |
Variables | |
const int | A_CHAR = (int)'A' |
const int | BEFORE_A_CHAR = A_CHAR - 1 |
const int | Y_CHAR = (int) 'Y' |
const int | ESTIMATE_LENGTH = 18 |
const int | MAX_INPUT_LENGTH = 500 |
A collection of conversion operations turning CDR3 strings into numerical representation.
Also includes utilities to directly edit the representation.
#define CODEC_DEF |
int char_encode | ( | char | amino_acid | ) |
encode character into 5 bit value (0-31).
-1 for non amino acid character
__device__ __host__ int len_decode | ( | Int3 | binary | ) |
find the string length in original form.
void print_int3_arr | ( | Int3 * | arr, |
int | n | ||
) |
conviniently print Int3* in readable form.
remove one character from the string in binary form (without turning it into the original string form).
char* str_decode | ( | Int3 | binary | ) |
decode binary form into peptide string.
Int3 str_encode | ( | char * | str | ) |
encode peptide string into int3 struct with 6 characters encoded into an integer.
const int A_CHAR = (int)'A' |
const int BEFORE_A_CHAR = A_CHAR - 1 |
const int ESTIMATE_LENGTH = 18 |
const int MAX_INPUT_LENGTH = 500 |
const int Y_CHAR = (int) 'Y' |