Skip to content
Snippets Groups Projects
Commit a8b1dea9 authored by tjc's avatar tjc
Browse files

additional constructors to handle files over http and ftp

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@16128 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent f3579a17
Branches
Tags
No related merge requests found
......@@ -28,8 +28,10 @@ package uk.ac.sanger.artemis.components.variant;
/* Contact: Heng Li <hengli@broadinstitute.org> */
import net.sf.samtools.util.BlockCompressedInputStream;
import net.sf.samtools.util.SeekableStream;
import java.io.*;
import java.net.URL;
import java.nio.*;
import java.util.HashMap;
import java.util.ArrayList;
......@@ -93,6 +95,18 @@ public class TabixReader extends AbstractVCFReader
readIndex();
}
public TabixReader(final String fn, final SeekableStream ins) throws IOException {
mFn = fn;
mFp = new BlockCompressedInputStream(ins);
readIndex();
}
public TabixReader(final String fn, final URL url) throws IOException {
mFn = fn;
mFp = new BlockCompressedInputStream(url);
readIndex();
}
private static int reg2bins(final int beg, final int _end, final int[] list) {
int i = 0, k, end = _end;
if (beg >= end) return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment