-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add handling of exceptions for fasta and BED: in multithreading mode …
…and sinlge modes.
- Loading branch information
1 parent
e2995c9
commit 8b72904
Showing
11 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/astrazeneca/vardict/exception/RegionBoundariesException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.astrazeneca.vardict.exception; | ||
|
||
|
||
import java.util.Locale; | ||
|
||
public class RegionBoundariesException extends RuntimeException { | ||
public final static String RegionBoundariesExceptionMessage = "The region %s:%d-%d is wrong. " + | ||
"We have problem while reading it, possible the start is after the end of the region or " + | ||
"the fasta doesn't contain this region."; | ||
|
||
public RegionBoundariesException(String chr, int start, int end, Throwable e) { | ||
super(String.format(Locale.US, RegionBoundariesExceptionMessage, chr, start, end) , e); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/astrazeneca/vardict/exception/RegionMissedSourceException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.astrazeneca.vardict.exception; | ||
|
||
|
||
public class RegionMissedSourceException extends RuntimeException { | ||
public final static String RegionSourceMissedMessage = "The required BED file or region missed, please, set it " + | ||
"with path to BED or with -R option."; | ||
|
||
public RegionMissedSourceException() { | ||
super(RegionSourceMissedMessage); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/astrazeneca/vardict/exception/WrongFastaOrBamException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.astrazeneca.vardict.exception; | ||
|
||
|
||
import java.util.Locale; | ||
|
||
public class WrongFastaOrBamException extends RuntimeException { | ||
public final static String WrongFastaOrBamExceptionMeassage = "The name of this chromosome \"%s\" is missing in your" + | ||
" fasta file. Please be sure that chromosome names in BAM, fasta and BED are in correspondence " + | ||
"with each other and you use correct fasta for your BAM (can be checked in BAM header)."; | ||
|
||
public WrongFastaOrBamException(String chr, Throwable e) { | ||
super(String.format(Locale.US, WrongFastaOrBamExceptionMeassage, chr), e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters