trivial refactoring: isFile renamed to isIntervalFile and made public
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3541 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
c3b68cc58d
commit
7b7d3341f0
|
|
@ -47,7 +47,7 @@ public class IntervalUtils {
|
||||||
for (String fileOrInterval : argument.split(";")) {
|
for (String fileOrInterval : argument.split(";")) {
|
||||||
|
|
||||||
// if it's a file, add items to raw interval list
|
// if it's a file, add items to raw interval list
|
||||||
if (isFile(fileOrInterval))
|
if (isIntervalFile(fileOrInterval))
|
||||||
rawIntervals.addAll(GenomeLocParser.intervalFileToList(fileOrInterval));
|
rawIntervals.addAll(GenomeLocParser.intervalFileToList(fileOrInterval));
|
||||||
|
|
||||||
// otherwise treat as an interval -> parse and add to raw interval list
|
// otherwise treat as an interval -> parse and add to raw interval list
|
||||||
|
|
@ -85,7 +85,7 @@ public class IntervalUtils {
|
||||||
* @param str token to identify as a filename.
|
* @param str token to identify as a filename.
|
||||||
* @return true if the token looks like a filename, or false otherwise.
|
* @return true if the token looks like a filename, or false otherwise.
|
||||||
*/
|
*/
|
||||||
private static boolean isFile(String str) {
|
public static boolean isIntervalFile(String str) {
|
||||||
// should we define list of file extensions as a public array somewhere?
|
// should we define list of file extensions as a public array somewhere?
|
||||||
// is regex or endsiwth better?
|
// is regex or endsiwth better?
|
||||||
if (str.toUpperCase().endsWith(".BED") || str.toUpperCase().endsWith(".LIST") ||
|
if (str.toUpperCase().endsWith(".BED") || str.toUpperCase().endsWith(".LIST") ||
|
||||||
|
|
@ -100,4 +100,7 @@ public class IntervalUtils {
|
||||||
|
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue