Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Commit 1b646a8

Browse files
committed
Add bz2 support
1 parent 15e0435 commit 1b646a8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/libra/common/helpers/PathHelper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
public class PathHelper {
2323

24-
private static final String[] COMPRESSED_EXT = {"gz"};
24+
private static final String[] COMPRESSED_EXT = {"gz", "bz2"};
2525

2626
public static String getParent(String path) {
2727
// check root
@@ -59,7 +59,7 @@ public static String concatPath(String path1, String path2) {
5959
return sb.toString();
6060
}
6161

62-
public static String getExtensionWithoutCompressed(String name) {
62+
public static String getExtensionOfDecompressedFile(String name) {
6363
String myname = name;
6464
int idx = myname.lastIndexOf(".");
6565
if(idx > 0) {

src/libra/common/sequence/FastaPathFilter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class FastaPathFilter implements PathFilter {
2929

3030
@Override
3131
public boolean accept(Path path) {
32-
String ext = PathHelper.getExtensionWithoutCompressed(path.getName());
32+
String ext = PathHelper.getExtensionOfDecompressedFile(path.getName());
3333
if(ext != null) {
3434
ext = ext.toLowerCase();
3535
}

src/libra/common/sequence/FastqPathFilter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class FastqPathFilter implements PathFilter {
2929

3030
@Override
3131
public boolean accept(Path path) {
32-
String ext = PathHelper.getExtensionWithoutCompressed(path.getName());
32+
String ext = PathHelper.getExtensionOfDecompressedFile(path.getName());
3333
if(ext != null) {
3434
ext = ext.toLowerCase();
3535
}

0 commit comments

Comments
 (0)