public Alignment bandedAlign(String ref, String query) throws Exception {
   ACGTSequence r = new ACGTSequence(ref);
   ACGTSequence q = new ACGTSequence(query);
   Alignment alignment = SmithWatermanAligner.bandedAlign(r, q);
   _logger.debug(alignment);
   return alignment;
 }
Example #2
0
 @Test
 public void parseLine() throws IOException, RecognitionException {
   DTDParser parser =
       DTDParserUtil.createParser(
           FileResource.find(DTDParserTest.class, "simple.dtd").openStream());
   DTDParser.dtd_return r = parser.dtd();
   CommonTree t = (CommonTree) r.getTree();
   _logger.debug(ANTLRUtil.parseTree(t, DTDParser.tokenNames));
 }
 @Test
 public void scan() throws Exception {
   ACGTSequence q =
       new ACGTSequence(
           "TTTATACGTGTTTGAATAACTTGGCCAAATCGCCGAGAAGGAATAGAATACTGGACGACATTGTACATATTTTCCAAAAAATCAGAAAGTAGATGACGGG");
   PrefixScan scan =
       PrefixScan.scanRead(fmIndex, q, Strand.FORWARD, new StaircaseFilter(q.length(), 7));
   _logger.debug(scan);
 }
  HashedArrayList<String, String> parse(String file) throws Exception {
    JSONStreamReader reader =
        new JSONStreamReader(FileResource.open(JSONStreamReaderTest.class, file));
    TreeEvent e;

    HashedArrayList<String, String> data = new HashedArrayList<String, String>();

    while ((e = reader.next()) != null) {
      _logger.debug(e);

      if (e.isVisit()) data.put(e.nodeName, e.nodeValue);
    }

    return data;
  }
  public static void main(String[] args) throws OptionParserException, IOException {
    Config config = new Config();
    OptionParser optionParser = new OptionParser(config);

    optionParser.parse(args);
    if (config.displayHelp) {
      optionParser.printUsage();
    }

    if (config.verbose) {
      Logger.getRootLogger().setLogLevel(LogLevel.ALL);
    }

    if (config.searchFolderName == null) {
      System.err.println("no search folder is specified");
      return;
    }

    _logger.debug("search folder = " + config.searchFolderName);

    if (config.packageName == null || config.className == null) {
      System.err.println("no package or class name is given");
      return;
    }

    // search track classes
    File searchFolder = new File(config.searchFolderName);
    TrackResourceFinder finder = new TrackResourceFinder(searchFolder);
    finder.enter(searchFolder);

    // template
    Template template =
        new Template(
            FileResource.find(TrackLoaderGenerator.class, "TrackLoader.java.template")
                .openStream());
    Properties p = new Properties();
    p.put("trackClasses", finder.trackClassFile);
    p.put("trackGroupClasses", finder.trackGroupClassFile);
    p.put("packageName", config.packageName);
    p.put("className", config.className);
    String result = template.apply(p);
    System.out.print(result);
  }
Example #6
0
 public void addRelation(Relation relation) {
   _logger.debug("add relation: " + relation.toString());
 }