Interactions of proteins with DNA are essential for carrying out DNA's biological functions and performing a cellular cycle. Such processes as DNA replication, expression and repair are performed by an organised action of various proteins. To better understand the function of protein machinery many methods have been developed over the years. They can be divided into two categories: single molecule and bulk techniques. In comparison to bulk experiments, where the effect of an ensemble of proteins is measured, single molecule techniques analyse each molecule one by one. This fact allows to detect rare events and avoid averaging over the population. Moreover, some single molecule techniques can be used for mechanical manipulation of biomolecules, i.e. twisting, stretching, etc. The objective of this thesis was to make a single molecule technique combining nanocapillaries and optical tweezers for the characterisation of DNA-protein complexes in physiological conditions. There were three main steps in this thesis: 1) building and characterisation of the setup 2) using it for detection and characterisation of DNA-protein complexes and 3) localisation and discrimination of DNA-protein complexes. On the first step of the project we combined two single molecule techniques: optical tweezers and glass nanocapillaries. We characterised the electrophoretic force acting on DNA in this setup by using nanocapillaries with openings of different sizes, at different applied voltages and with DNA molecules of different lengths. We observed that the position-dependent electrophoretic force acting on the DNA depends on all above-mentioned parameters. We modelled the system and found out that this effect is due to a non-uniform distribution of the potential inside the nanocapillary, which originates from its elongated shape. After having built and characterised the setup, we detected proteins bound to DNA during their controlled translocation through the opening. The proteins were visualised by a sudden decrease in the force acting on the bare DNA followed up by its slow restoration when the capillary was moved further away. We made a stochastic model to explain this force profile. From the fits of the model to experimental results we extracted the effective charges of DNA-protein complexes inside the nanocapillary. In the case of all three proteins (RecA, EcoRI and RNAP) the effective charge was of opposite sign than the one in solution. We attributed this fact to the dominant impact of the drag force in comparison to the electrostatic force inside the nanocapillary. On the last step of the project we showed the ability to localise and discriminate DNA-protein complexes in our setup using dCas9 and RNAP proteins. During controlled translocation of the DNA-protein complexes we measured multiple parameters, including protein's location on the DNA, work required to translocate the complex, and conductance change. We demonstrated that the measured location of the proteins is shifted from the designed binding site. We made a model that explained this phenomenon and that can account for the shift in our experiments. In addition, protein-specific work and conductance parameters allowed us to discriminate between RNAP and dCas9 proteins.