Beispiel #1
0
  public String resolveURL(String urlTemplate, GenomeRange locus) {
    String url = urlTemplate;
    if (url == null) return url;

    if (locus != null) {
      if (locus.getName() != null) {
        if (url.contains("%q")) url = url.replaceAll("%q", locus.getName());
        if (url.contains("%qname")) url = url.replaceAll("%qname", locus.getName());
      }

      if (url.contains("%qstart"))
        url = url.replaceAll("%qstart", Integer.toString(locus.getStart()));
      if (url.contains("%qend")) url = url.replaceAll("%qend", Integer.toString(locus.getEnd()));
      if (url.contains("%qlen")) url = url.replaceAll("%qlen", Integer.toString(locus.length()));
    }

    // replace track group properties
    return resolvePropertyValues(url);
  }
Beispiel #2
0
 public static boolean isReadCoverage(GenomeRange data) {
   DataChecker dataChecker = new DataChecker();
   data.accept(dataChecker);
   return dataChecker.flag;
 }