1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include "my_assert.h"
#include "wiggle.h"
using namespace std;
int main(int argc, char* argv[]) {
if (argc != 3) {
printf("Usage: rsem-bam2readdepth sorted_bam_input readdepth_output\n");
exit(-1);
}
ofstream fout(argv[2]);
general_assert(fout.is_open(), "Cannot write to " + cstrtos(argv[2]) + "!");
ReadDepthWriter depth_writer(fout);
build_wiggles(argv[1], depth_writer);
fout.close();
return 0;
}
|