2
Copyright (C) 2009- The University of Notre Dame
3
This software is distributed under the GNU General Public License.
4
See the file COPYING for details.
12
#include "compressed_sequence.h"
16
static void show_version(const char *cmd)
18
printf("%s version %d.%d.%d built by %s@%s on %s at %s\n", cmd, CCTOOLS_VERSION_MAJOR, CCTOOLS_VERSION_MINOR, CCTOOLS_VERSION_MICRO, BUILD_USER, BUILD_HOST, __DATE__, __TIME__);
21
static void show_help(const char *cmd)
23
printf("Use: %s [options] compressed_reads > fasta_reads\n", cmd);
24
printf("where options are:\n");
25
printf(" -q Quiet mode: suppress summary line.\n");
26
printf(" -v Show version string.\n");
27
printf(" -h Show this help screen\n");
30
int main(int argc, char ** argv)
32
const char *progname = "sand_uncompress_reads";
40
while((d=getopt(argc,argv,"qhi"))!=(char)-1) {
46
show_version(progname);
58
infile = fopen(argv[optind], "r");
60
fprintf(stderr,"%s: couldn't open %s: %s\n",progname,argv[optind],strerror(errno));
69
outfile = fopen(argv[optind],"w");
71
fprintf(stderr,"%s: couldn't open %s: %s\n",progname,argv[optind],strerror(errno));
79
while((c=cseq_read(infile))) {
80
struct seq *s = cseq_uncompress(c);
88
fprintf(stderr,"%d sequences uncompressed.\n",count);