Go to the documentation of this file.
56 nsymbols = strlen(alphabet);
59 t->i2c = gk_cmalloc(256,
"gk_i2c_create_common");
60 t->c2i = gk_imalloc(256,
"gk_i2c_create_common");
63 gk_cset(256, -1,
t->i2c);
64 gk_iset(256, -1,
t->c2i);
66 for(
i=0;
i<nsymbols;
i++){
67 t->i2c[
i] = alphabet[
i];
68 t->c2i[(
int)alphabet[
i]] =
i;
87 size_t ntokens, nbytes,
len;
92 static char *AAORDER =
"ARNDCQEGHILKMFPSTWYVBZX*";
93 static int PSSMWIDTH = 20;
97 header = gk_cmalloc(PSSMWIDTH,
"gk_seq_ReadGKMODPSSM: header");
108 seq->sequence = gk_imalloc(
len,
"gk_seq_ReadGKMODPSSM");
109 seq->pssm = gk_iAllocMatrix(
len, PSSMWIDTH, 0,
"gk_seq_ReadGKMODPSSM");
110 seq->psfm = gk_iAllocMatrix(
len, PSSMWIDTH, 0,
"gk_seq_ReadGKMODPSSM");
112 seq->nsymbols = PSSMWIDTH;
124 for (
i=0;
i<PSSMWIDTH;
i++)
125 header[
i] = tokens.
list[
i][0];
131 for (
i=0, ii=0; ii<
len; ii++) {
139 for (
j=0;
j<PSSMWIDTH;
j++) {
141 seq->psfm[
i][converter->
c2i[(
int)header[
j]]] = atoi(tokens.
list[2+PSSMWIDTH+
j]);
168 gk_iFreeMatrix(&
seq->pssm,
seq->len,
seq->nsymbols);
169 gk_iFreeMatrix(&
seq->psfm,
seq->len,
seq->nsymbols);
void gk_free(void **ptr1,...)
void errexit(char *f_str,...)
char * gk_strtoupper(char *)
Converts a string to upper case.
FILE * gk_fopen(char *, char *, const char *)
void gk_strtokenize(char *line, char *delim, gk_Tokens_t *tokens)
void gk_freetokenslist(gk_Tokens_t *tokens)
void gk_getfilestats(char *fname, size_t *r_nlines, size_t *r_ntokens, size_t *r_max_nlntokens, size_t *r_nbytes)
void gk_seq_free(gk_seq_t *seq)
This function frees the memory allocated to the seq structure.
char * gk_getbasename(char *path)
void gk_seq_init(gk_seq_t *seq)
size_t len(handle h)
Get the length of a Python object.
gk_seq_t * gk_seq_ReadGKMODPSSM(char *filename)
This function reads a pssm in the format of gkmod pssm.
gk_i2cc2i_t * gk_i2cc2i_create_common(char *alphabet)
This function creates the localizations for the various sequences.
void * gk_malloc(size_t nbytes, char *msg)
internal::enable_if<!(symbolic::is_symbolic< FirstType >::value||symbolic::is_symbolic< LastType >::value), ArithmeticSequence< typename internal::cleanup_index_type< FirstType >::type, Index > >::type seq(FirstType f, LastType l)
for(size_t i=1;i< poses.size();++i)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:10