Used .endswith() methods on output file name in add-tag command. Deleted the get_format function.
The logic now is like: if the output filename ends with .bam or .bam.sorted, then generate a bam file; elif it ends with .sam, then generate a sam file; otherwise print an "unknown" prompt and generate a bam file by default.
Used
.endswith()
methods on output file name inadd-tag
command. Deleted theget_format
function.The logic now is like: if the output filename ends with
.bam
or.bam.sorted
, then generate abam
file; elif it ends with.sam
, then generate asam
file; otherwise print an "unknown" prompt and generate abam
file by default.