[Bio] / Kmers2 / rna_seq.c Repository:
ViewVC logotype

Diff of /Kmers2/rna_seq.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Wed Jul 24 15:30:31 2013 UTC revision 1.2, Wed Apr 9 16:58:43 2014 UTC
# Line 323  Line 323 
323    }    }
324    
325    *id_index_ar    = malloc(ID_TAB_MAX_ENTRIES * sizeof(char *));    *id_index_ar    = malloc(ID_TAB_MAX_ENTRIES * sizeof(char *));
326      char **p_index  = *id_index_ar;
327    
328    char *vals      = malloc(ID_TAB_SZ);    char *vals      = malloc(ID_TAB_SZ);
329    char *p         = vals;    char *p         = vals;
330    FILE *ifp      = fopen(filename,"r");    FILE *ifp      = fopen(filename,"r");
# Line 338  Line 340 
340        fprintf(stderr,"Your index must be dense and in order (see line %ld, should be %d)\n",p-vals,sz);        fprintf(stderr,"Your index must be dense and in order (see line %ld, should be %d)\n",p-vals,sz);
341        exit(1);        exit(1);
342      }      }
343      *(id_index_ar[sz]) = p;               /* the fgets leaves the \n at the end of each line */      p_index[sz] = p;
344      p += strlen(*(id_index_ar[sz])) -1;  
345        p += strlen(p) -1;
346      *(p++) = '\0';      *(p++) = '\0';
347      if ((sz >= ID_TAB_MAX_ENTRIES) || ((p-vals) > (ID_TAB_SZ - 1000))) {      if ((sz >= ID_TAB_MAX_ENTRIES) || ((p-vals) > (ID_TAB_SZ - 1000))) {
348        fprintf(stderr,"Your contig id array is too small; bump ID_TAB_MAX_ENTRIES and ID_TAB_SZ\n");        fprintf(stderr,"Your contig id array is too small; bump ID_TAB_MAX_ENTRIES and ID_TAB_SZ\n");

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3