diff --git a/src/sortBed/sortMain.cpp b/src/sortBed/sortMain.cpp index ee35b669d4e0c99c0ac96c147d4cd7917417246c..8f0f7925ef9f94223ba1577b928c5bbc4aaee08a 100644 --- a/src/sortBed/sortMain.cpp +++ b/src/sortBed/sortMain.cpp @@ -30,18 +30,17 @@ int main(int argc, char* argv[]) { bool showHelp = false; // input files - string bedFile; - bool haveBed = false; + string bedFile = "stdin"; + bool haveBed = true; int sortChoices = 0; - bool sortBySizeAsc = false; - bool sortBySizeDesc = false; - bool sortByChromThenSizeAsc = false; - bool sortByChromThenSizeDesc = false; - bool sortByChromThenScoreAsc = false; + bool sortBySizeAsc = false; + bool sortBySizeDesc = false; + bool sortByChromThenSizeAsc = false; + bool sortByChromThenSizeDesc = false; + bool sortByChromThenScoreAsc = false; bool sortByChromThenScoreDesc = false; - - if(argc <= 1) showHelp = true; + for(int i = 1; i < argc; i++) { int parameterLength = (int)strlen(argv[i]); @@ -61,7 +60,6 @@ int main(int argc, char* argv[]) { if(PARAMETER_CHECK("-i", 2, parameterLength)) { if ((i+1) < argc) { - haveBed = true; bedFile = argv[i + 1]; i++; }