Package org.patika.mada.util

Examples of org.patika.mada.util.XRef


   */
  private void extractReferences()
  {
    for (xref xr : cmp.getXREF())
    {
      this.addReference(new XRef(xr));
    }
  }
View Full Code Here


          if (id.length() < 1) continue;
         
          String dbtext = Character.isDigit(id.charAt(0)) ?
            XRef.ENTREZ_GENE : XRef.UNIPROT;

          refs.add(new XRef(dbtext + ":" + id));
        }
      }
    }

    if (!refs.isEmpty())
    {
      try
      {
        main.lockWithMessage("Querying Pathway Commons Database ...");

        PathwayCommonsIOHandler ioHandler = new PathwayCommonsIOHandler(new SimpleIOHandler());
        Map<String, String> pathToID = new HashMap<String, String>();
        List<String> resultPathways = new ArrayList<String>();

        XRef xr = XRef.getFirstRef(refs,
          new String[]{XRef.CPATH, XRef.ENTREZ_GENE, XRef.UNIPROT});

        refs.clear();
        if (xr != null)
        {
View Full Code Here

          {
            continue;
          }
          for (String ref : line.split(" "))
          {
            refs.add(new XRef(ref));
          }
        }

        reader.close();
      }
View Full Code Here

      String s = (String) this.getValueAt(r, 0);

      StringTokenizer st = new StringTokenizer(s);
      while (st.hasMoreTokens())
      {
        refs.add(new XRef(st.nextToken()));
      }
    }
    return refs;
  }
View Full Code Here

      String d = "";

      for (Object ref : row.getRef())
      {
        d += new XRef((Reference) ref).toString() + " ";
      }

      d = d.trim();
      d = d.toLowerCase();
View Full Code Here

        if (name.length() == 0) name = "noname";
      }

      BasicSIFNode node = new BasicSIFNode(root, id, name);

      node.addReference(new XRef("NAME:"+node.getName()));

      if (terms.length > 1)
      {
        for (String ref : terms[1].split(INNER_SEP))
        {
          if (ref.length() > 0)
          {
            if (ref.indexOf(XRef.SEPARATOR) < 0)
            {
              System.out.println("defective line = " + line);
            }
            else
            {
              node.addReference(new XRef(ref));
            }
          }
        }
      }
      if (terms.length > 2)
      {
        for (String ref : terms[2].split(INNER_SEP))
        {
          if (ref.length() > 0)
          {
            if (ref.indexOf(XRef.SEPARATOR) < 0)
            {
              System.out.println("defective line = " + line);
            }
            else
            {
              node.addReference(new XRef(ref));
            }
          }
        }
      }
View Full Code Here

          if (id.length() < 1) continue;

          String dbtext = Character.isDigit(id.charAt(0)) ?
            XRef.ENTREZ_GENE : XRef.UNIPROT;

          refs.add(new XRef(dbtext + ":" + id));
        }
      }
    }

    if (!refs.isEmpty())
    {
      try
      {
        main.lockWithMessage("Querying Pathway Commons Database ...");
        PathwayCommonsIOHandler ioHandler = new PathwayCommonsIOHandler();

        // Names of new pathways for the neighborhood
        Map<XRef, String> ref2pname = new HashMap<XRef, String>();

        // Query for only one xref

        XRef xr = XRef.getFirstRef(refs,
          new String[]{XRef.CPATH, XRef.ENTREZ_GENE, XRef.UNIPROT});

        refs.clear();
        if (xr != null)
        {
View Full Code Here

          {
            continue;
          }
          for (String ref : line.split(" "))
          {
            refs.add(new XRef(ref));
          }
        }

        reader.close();
      }
View Full Code Here

  {
    String names = "";

    if (ent.getSHORT_NAME() != null && ent.getSHORT_NAME().length() > 0)
    {
      this.addReference(new XRef(NAME_REF, ent.getSHORT_NAME()));
      names = ent.getSHORT_NAME();
    }

    if (ent.getNAME() != null && ent.getNAME().length() > 0)
    {
      this.addReference(new XRef(NAME_REF, ent.getNAME()));
      names += (names.length() == 0 ? "" : "\n") + ent.getNAME();
    }

    for (String syn : ent.getSYNONYMS())
    {
      if (syn != null)
      {
        XRef ref = new XRef(NAME_REF, syn);

        if (!this.getReferences().contains(ref))
        {
          this.addReference(ref);
          names += (names.length() == 0 ? "" : "\n") + syn;
        }
      }
    }

//    for (xref xr : new ClassFilterSet<unificationXref>(ent.getXREF(), unificationXref.class))
    for (xref xr : ent.getXREF())
    {
      if (xr != null)
      {
        this.addReference(new XRef(xr));
      }
    }

    return names;
  }
View Full Code Here

   */
  private void extractReferences()
  {
    for (Xref xr : cmp.getXref())
    {
      this.addReference(new XRef(xr));
    }
  }
View Full Code Here

TOP

Related Classes of org.patika.mada.util.XRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.