Background: Non-target screening consists in searching a sample for all present substances, suspected or unknown, with very little prior knowledge about the sample. This approach has been introduced more than a decade ago in the field of water analysis, but is still very scarce for indoor and atmospheric trace gas measurements, despite the clear need for a better understanding of the atmospheric trace gas composition. For a systematic detection of emerging trace gases in the atmosphere, a new and powerful analytical method is gas chromatography (GC) of preconcentrated samples, followed by electron ionisation, high resolution mass spectrometry (EI-HRMS). In this work, we present data analysis tools to enable automated identification of unknown compounds measured by GC-EI-HRMS. Results: Based on co-eluting mass/charge fragments, we developed an innovative data analysis method to reliably reconstruct the chemical formulae of the fragments, using efficient combinatorics and graph theory. The method (i) does not to require the presence of the molecular ion, which is absent in $\sim$40% of EI spectra, and (ii) permits to use all measured data while giving more weight to mass/charge ratios measured with better precision. Our method has been trained and validated on >50 halocarbons and hydrocarbons with a molar masses of 30-330 g mol-1 , measured with a mass resolution of approx. 3500. For >90% of the compounds, more than 90% of the reconstructed signal is correct. Cases of wrong identification can be attributed to the scarcity of detected fragments per compound (less than six measured mass/charge) or the lack of isotopic constrain (no rare isotopocule detected). Conclusions: Our method enables to reconstruct most probable chemical formulae independently from spectral databases. Therefore, it demonstrates the suitability of EI-HRMS data for non-target analysis and paves the way for the identification of substances for which no EI mass spectrum is registered in databases. We illustrate the performances of our method for atmospheric trace gases and suggest that it may be well suited for many other types of samples.