@@ -350,7 +350,11 @@ int vcf_read_line(gzFile vcf_fh, VCFInfo *vcf_info, SNP *snp,
350350 if (token == NULL ) {
351351 my_err ("expected at least %d tokens per line\n" , n_fix_header );
352352 }
353- util_strncpy (snp -> chrom , token , sizeof (snp -> chrom ));
353+
354+ /* we don't bother to store chromosome since we store
355+ * SNPs from each chromosome in their own table
356+ */
357+ /* util_strncpy(snp->chrom, token, sizeof(snp->chrom)); */
354358
355359
356360 /* pos */
@@ -372,26 +376,31 @@ int vcf_read_line(gzFile vcf_fh, VCFInfo *vcf_info, SNP *snp,
372376 if (token == NULL ) {
373377 my_err ("expected at least %d tokens per line\n" , n_fix_header );
374378 }
375- vcf_info -> ref_len = strlen (token );
376379 ref_len = util_strncpy (snp -> allele1 , token , sizeof (snp -> allele1 ));
377380
378- if (ref_len != vcf_info -> ref_len ) {
379- my_warn ("truncating long allele (%ld bp) to %ld bp\n" ,
380- vcf_info -> ref_len , ref_len );
381- }
381+ /* used to warn about truncations, but makes program too
382+ * chatty if there are a lot of them
383+ */
384+ vcf_info -> ref_len = 0 ;
385+ /* vcf_info->ref_len = strlen(token); */
386+ /* if(ref_len != vcf_info->ref_len) { */
387+ /* my_warn("truncating long allele (%ld bp) to %ld bp\n", */
388+ /* vcf_info->ref_len, ref_len); */
389+ /* } */
382390
383391 /* alt */
384392 token = strsep (& cur , delim );
385393 if (token == NULL ) {
386394 my_err ("expected at least %d tokens per line\n" , n_fix_header );
387395 }
388- vcf_info -> alt_len = strlen (token );
389396 alt_len = util_strncpy (snp -> allele2 , token , sizeof (snp -> allele2 ));
390-
391- if (alt_len != vcf_info -> alt_len ) {
392- my_warn ("truncating long allele (%ld bp) to %ld bp\n" ,
393- vcf_info -> alt_len , alt_len );
394- }
397+
398+ vcf_info -> alt_len = 0 ;
399+ /* vcf_info->alt_len = strlen(token); */
400+ /* if(alt_len != vcf_info->alt_len) { */
401+ /* my_warn("truncating long allele (%ld bp) to %ld bp\n", */
402+ /* vcf_info->alt_len, alt_len); */
403+ /* } */
395404
396405 /* qual */
397406 token = strsep (& cur , delim );
0 commit comments