]> git.donarmstrong.com Git - samtools.git/commitdiff
Fixed a compiling error when knetfile is not used.
authorHeng Li <lh3@live.co.uk>
Sun, 5 Dec 2010 04:33:51 +0000 (04:33 +0000)
committerHeng Li <lh3@live.co.uk>
Sun, 5 Dec 2010 04:33:51 +0000 (04:33 +0000)
bam_reheader.c
bcftools/vcfutils.pl

index bae97c796fc7a6116751ff809e9b9f28dc7d4063..0b5226705aee8044c26ec72212f1979d03805e49 100644 (file)
@@ -22,10 +22,11 @@ int bam_reheader(BGZF *in, const bam_header_t *h, int fd)
        }
 #ifdef _USE_KNETFILE
        while ((len = knet_read(in->x.fpr, buf, BUF_SIZE)) > 0)
+               fwrite(buf, 1, len, fp->x.fpw);
 #else
        while (!feof(in->file) && (len = fread(buf, 1, BUF_SIZE, in->file)) > 0)
+               fwrite(buf, 1, len, fp->file);
 #endif
-               fwrite(buf, 1, len, fp->x.fpw);
        free(buf);
        fp->block_offset = in->block_offset = 0;
        bgzf_close(fp);
index 499a4e4ee5c8fd495898a0312ffbdc4765cab47b..3e5b7b253f10352eb37f1d49327fee23c2dbd082 100755 (executable)
@@ -455,7 +455,7 @@ sub hapmap2vcf {
 }
 
 sub vcf2fq {
-  my %opts = (d=>3, D=>100000, Q=>10, l=>10);
+  my %opts = (d=>3, D=>100000, Q=>10, l=>5);
   getopts('d:D:Q:l:', \%opts);
   die(qq/
 Usage:   vcfutils.pl vcf2fq [options] <all-site.vcf>