For simple traversal like node/relationship selection, you can use SGraph.getvertices() and SGraph.getedges() to select the vertices and edges you need.
The general pattern is:
<pre><code>newg = SGraph( oldg.getvertices(...), oldg.getedges(...) )</code></pre>
If you want more complex traversal query, use triple_apply to label/mark the vertices and edges, and use the pattern above to extract the subgraph.
You might find our userguide and API doc helpful.