The construction of the C*-algebra associated to a directed graph E is extended to incorporate a family C consisting of partitions of the sets of edges emanating from the vertices of E. These C*-algebras C * (E, C) are analyzed in terms of their ideal theory and K-theory, mainly in the case of partitions by finite sets. The groups K 0 (C * (E, C)) and K 1 (C * (E, C)) are completely described via a map built from an adjacency matrix associated to (E, C). One application determines the K-theory of the C*-algebras U nc m,n , confirming a conjecture of McClanahan. A reduced C*-algebra C * red (E, C) is also introduced and studied. A key tool in its construction is the existence of canonical faithful conditional expectations from the C*-algebra of any row-finite graph to the C*-subalgebra generated by its vertices. Differences between C * red (E, C) and C * (E, C), such as simplicity versus non-simplicity, are exhibited in various examples, related to some algebras studied by McClanahan.