Frequently Asked Questions

  • Q: How do I fetch protocols from the object model? I have parsed an SDRF file, but I can't retrieve protocol nodes using:
     sdrf.lookupNodes("Protocol REF");
  • A: Protocols are handled in a special way. According to the SDRF spec, protocols and their parameters describe the edges in the SDRF graph. As the parser produces a graph-based model of SDRF, this aspect is preserved. Protocols are described in two ways - firstly, each application of a protocol with a given set of parameters to a single node results in the creation of a ProtocolApplicationNode. You can retrieve these from the SDRF, and recover the protocol referenced by doing this:
      Collection<ProtocolApplicationNode> pans = sdrf.lookupNodes(ProtocolApplicationNode.class);
      for (ProtocolApplicationNode pan : pans) {
        String protocolName = pan.protocol;

    Alternatively, you can retrieve a list of all the protocols named in the SDRF by doing:

      Collection<String> protocols = sdrf.lookupProtocols();

    This should allow you maximum sensitivity in dealing with protocols and their context.

  • Q: How do I retrieve the factor values from my SDRF? I don't see them in the graph model
  • A: Factor Values are another special case in the SDRF specification. Although in some cases they appear to act like nodes, they are actually attributes of the Hybridization, Assay or Scan node they are immediately downstream of. For this reason, the parser attaches them to the associated node. You can retrieve them like any other attribute:
      Collection<HybridizationNode> hybs = sdrf.lookupNodes(HybridizationNode.class);
      for (HybridizationNode hyb : hybs) {
        List<FactorValueAttribute> factorValues = hyb.factorValues;