| 26 | } |
| 27 | |
| 28 | void BedFilePE::Open(void) { |
| 29 | if (bedFile == "stdin" || bedFile == "-") { |
| 30 | _bedStream = &cin; |
| 31 | } |
| 32 | else { |
| 33 | _bedStream = new ifstream(bedFile.c_str(), ios::in); |
| 34 | |
| 35 | if (isGzipFile(_bedStream) == true) { |
| 36 | delete _bedStream; |
| 37 | _bedStream = new igzstream(bedFile.c_str(), ios::in); |
| 38 | } |
| 39 | // can we open the file? |
| 40 | if ( _bedStream->fail() ) { |
| 41 | cerr << "Error: The requested BEDPE file (" |
| 42 | << bedFile |
| 43 | << ") " |
| 44 | << "could not be opened. " |
| 45 | << "Error message: (" |
| 46 | << strerror(errno) |
| 47 | << "). Exiting!" << endl; |
| 48 | exit (1); |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | |
| 54 |
nothing calls this directly
no test coverage detected