generate the subgraph related to given concepts