code: public static ReasonerQueryImpl create(ReasonerQueryImpl q, ConceptMap sub){
          return q.withSubstitution(sub).inferTypes();
      }
docs: create a reasoner query by combining an existing query and a substitution
  @param q base query for substitution to be attached
  @param sub (partial) substitution
  @return reasoner query with the substitution contained in the query