37 : file_name(_file_name),
38 alignment_type(_alignment_type),
67 if (strcmp(file_name,
"/dev/null") == 0)
69 return new OutputFile(file_name, aln_type, bnt);
72 if (len >= strlen(
".sam"))
74 if (strcmp(&file_name[len - strlen(
".sam")],
".sam") == 0)
76 return new SamOutput(file_name, aln_type, bnt);
80 if (len >= strlen(
".bam"))
82 if (strcmp(&file_name[len - strlen(
".bam")],
".bam") == 0)
84 return new BamOutput(file_name, aln_type, bnt);
88 if (len >= strlen(
".dbg"))
90 if (strcmp(&file_name[len - strlen(
".dbg")],
".dbg") == 0)
96 log_warning(stderr,
"could not determine file type for %s; guessing SAM\n", file_name);
97 return new SamOutput(file_name, aln_type, bnt);