File: bam2readdepth.cpp

package info (click to toggle)
rsem 1.3.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 37,700 kB
  • sloc: cpp: 19,230; perl: 1,326; python: 1,245; ansic: 547; makefile: 186; sh: 154
file content (27 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (5)
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;
}