Skip to content

Commit

Permalink
Fixed issue where exits didn't show failed state.
Browse files Browse the repository at this point in the history
  • Loading branch information
u0028003 committed Mar 14, 2022
1 parent b5e73d1 commit ffe2b82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/edu/utah/seq/parsers/jpileup/BamPileup.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public void processArgs(String[] args) throws Exception{
tot[0] = IO.extractFiles(forExtraction, ".bam");
tot[1] = IO.extractFiles(forExtraction,".cram");
bamFiles = IO.collapseFileArray(tot);
if (bamFiles == null || bamFiles.length ==0 || bamFiles[0].canRead() == false) Misc.printExit("\nError: cannot find your xxx.bam or xxx.cram files!\n");
if (bamFiles == null || bamFiles.length ==0 || bamFiles[0].canRead() == false) Misc.printErrAndExit("\nError: cannot find your xxx.bam or xxx.cram files!\n");
Arrays.sort(bamFiles);
if (bamFiles.length == 1) printAll = true;

Expand All @@ -232,10 +232,10 @@ public void processArgs(String[] args) throws Exception{
if (results == null ) Misc.printErrAndExit("\nError: please provide a results file that ends with xxx.gz");

//pull tabix and bgzip
if (tabixBinDirectory == null) Misc.printExit("\nError: please point to your HTSlib directory containing the tabix and bgzip executables (e.g. ~/BioApps/HTSlib/1.10.2/bin/ )\n");
if (tabixBinDirectory == null) Misc.printErrAndExit("\nError: please point to your HTSlib directory containing the tabix and bgzip executables (e.g. ~/BioApps/HTSlib/1.10.2/bin/ )\n");
bgzip = new File (tabixBinDirectory, "bgzip");
tabix = new File (tabixBinDirectory, "tabix");
if (bgzip.canExecute() == false || tabix.canExecute() == false) Misc.printExit("\nCannot find or execute bgzip or tabix executables from "+tabixBinDirectory);
if (bgzip.canExecute() == false || tabix.canExecute() == false) Misc.printErrAndExit("\nCannot find or execute bgzip or tabix executables from "+tabixBinDirectory);


//number of workers
Expand All @@ -248,7 +248,7 @@ public void processArgs(String[] args) throws Exception{
public static void printDocs(){
System.out.println("\n" +
"**************************************************************************************\n" +
"** Bam Pileup: Sept 2021 **\n" +
"** Bam Pileup: March 2022 **\n" +
"**************************************************************************************\n" +
"BP extracts pileup information for each bam file over a list of regions. This includes\n"+
"the # A,C,G,T,N,Del,Ins,FailingBQ bps for each bam. Provide the max memory available\n"+
Expand Down

0 comments on commit ffe2b82

Please sign in to comment.