    public void subsetFile(String infile, String outfile, Set<Integer> columns,
        String delimiter) {
        try {
          Scanner scanner =  new Scanner(new File(infile));
          dbgLog.fine("outfile="+outfile);
          BufferedWriter out = new BufferedWriter(new FileWriter(outfile));
          scanner.useDelimiter("\\n");
          while (scanner.hasNext()) {
              String[] line = (scanner.next()).split(delimiter);
              if ((line.length <= 1) && (line[0].equals(""))) {
                  break;
              }
              List<String> ln = new ArrayList<String>();
              for (Integer i : columns) {
                  ln.add(line[i]);
              }
              dbgLog.fine(StringUtils.join(ln,"\t"));
              out.write(StringUtils.join(ln,"\t")+"\n");
              ln=null;
          }
          scanner.close();
          out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void subsetFile(String infile, String outfile, Set<Integer> columns,
        String delimiter) {
        try {
          Scanner scanner =  new Scanner(new File(infile));
          dbgLog.fine("outfile="+outfile);
          BufferedWriter out = new BufferedWriter(new FileWriter(outfile));
          scanner.useDelimiter("\\n");
          while (scanner.hasNext()) {
              String[] line = (scanner.next()).split(delimiter,-1);
              List<String> ln = new ArrayList<String>();
              for (Integer i : columns) {
                  ln.add(line[i]);
              }
              dbgLog.fine(StringUtils.join(ln,"\t"));
              out.write(StringUtils.join(ln,"\t")+"\n");
              ln=null;
          }
          scanner.close();
          out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
