MCPcopy Create free account
hub / github.com/arq5x/bedtools2 / Open

Method Open

src/utils/tabFile/tabFile.cpp:28–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28void TabFile::Open(void) {
29 if (_tabFile == "stdin" || _tabFile == "-") {
30 _tabStream = &cin;
31 }
32 else {
33 _tabStream = new ifstream(_tabFile.c_str(), ios::in);
34
35 if( isGzipFile(_tabStream) ) {
36 delete _tabStream;
37 _tabStream = new igzstream(_tabFile.c_str(), ios::in);
38 }
39 if ( _tabStream->fail() ) {
40 cerr << "Error: The requested file ("
41 << _tabFile
42 << ") "
43 << "could not be opened. "
44 << "Error message: ("
45 << strerror(errno)
46 << "). Exiting!" << endl;
47 exit (1);
48 }
49 }
50}
51
52
53// Close the TAB file

Callers 15

WindowIntersectBedMethod · 0.45
WindowIntersectBamMethod · 0.45
SingleFastqMethod · 0.45
PairedFastqMethod · 0.45
PairedFastqUseTagsMethod · 0.45
FlankBedMethod · 0.45
ProcessBedFunction · 0.45
OpenBedgraphFilesMethod · 0.45
initMethod · 0.45
ChromSweepMethod · 0.45
ExpandFunction · 0.45
IntersectBedPEMethod · 0.45

Calls 2

isGzipFileFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected