We perform the analysis of scientific collaboration at the level of universities. The scope of this study is to answer two fundamental questions: (i) can one indicate a category (i.e., a scientific discipline) that has the greatest impact on the rank of the university and (ii) do the best universities collaborate with the best ones only? Using two university ranking lists (ARWU and QS) as well as data from the Science Citation Index we show how the number of publications in certain categories correlates with the university rank. Moreover, using complex networks analysis, we give hints that the scientific collaboration is highly embedded in the physical space and the number of common papers decays with the distance between them. We also show the strength of the ties between universities is proportional to product of their total number of publications.