As a result of a high rate of mutations and recombination events, an RNA-virus exists as a heterogeneous "swarm." The ability of next-generation sequencing to produce massive quantities of genomic data inexpensively has allowed virologists to study the structure of viral populations from an infected host at an unprecedented resolution. However, high similarity and low frequency of the viral variants as well high sequencing error rate impose a huge challenge to sequencing data analysis. We present a novel method based on linkage between single nucleotide variations to efficiently distinguish them from read errors. This method is able to tolerate the high error-rate of the single-molecule protocol and reconstruct very mutant variants. It is anticipated to facilitate not only viral quasispecies reconstruction, but also other biological questions that require detection of rare haplotypes such as genetic diversity in cancer cell population, and monitoring B-cell and T-cell receptor repertoire. We then show how accurate reconstruction of intra-host viral populations can be applied for identification of transmission clusters and sources, as well as inferring transmission directions of highly heterogeneous viruses such as HIV and HCV. The proposed novel algorithms are based on cluster analysis, random walks in networks and model simulations. The validation on real and simulated data show advantages of the proposed algorithms over consensus based methods.