public ComparisonResult findGenes(Chromosome other) {
        ComparisonResult comparisonResult = new ComparisonResult(); // знаю имя координаты нужного гена, найти нужный домен
        comparisonResult.sizeGenes = other.intervals.size();
        System.out.println(other.intervals.size());
        for (Interval domain: intervals)
        {
            for (Interval currentGene: other.intervals)
            {
                for (Interval otherGene: other.intervals)
                {
                    if (domain.isInsideDomain(otherGene) && domain.isInsideDomain(currentGene) && !otherGene.name.equals(currentGene.name))
                    {
                        comparisonResult.pairs ++;
                        if (!comparisonResult.coupleGenes.containsKey(domain))
                        {
                            comparisonResult.coupleGenes.put(domain, new ArrayList<String>());
                            comparisonResult.coupleGenes.get(domain).add(currentGene.name);
                        }
                        else if (!comparisonResult.coupleGenes.get(domain).contains(currentGene.name))
                                    comparisonResult.coupleGenes.get(domain).add(currentGene.name);
//                        else if (!comparisonResult.coupleGenes.get(currentGene.name).contains(otherGene.name) && !currentGene.name.equals(otherGene.name))
//                                            comparisonResult.coupleGenes.get(currentGene.name).add(otherGene.name);
                    }
                }
            }
        }
//        for (Interval interval : intervals) {
//            ArrayList<String> coordinatesDomainInside = new ArrayList<String>();  //contains two field start end
//            ArrayList<String> coordinatesDomainOnRight = new ArrayList<String>();
//            ArrayList<String> coordinatesDomainOnLeft = new ArrayList<String>();
//            for (Interval intervalDomain : other.intervals) {
//                if (interval.isInsideGene(intervalDomain)) {
//                    coordinatesDomainInside.add(Integer.toString(intervalDomain.a));
//                    coordinatesDomainInside.add(Integer.toString(intervalDomain.b));
//                    comparisonResult.informationAboutGenesInside.put(interval, coordinatesDomainInside);
//                } else if (intervalDomain.isRightBorder(interval)) {
//                    coordinatesDomainOnRight.add(Integer.toString(intervalDomain.a));
//                    coordinatesDomainOnRight.add(Integer.toString(intervalDomain.b));
//                    comparisonResult.informationAboutGenesRight.put(interval, coordinatesDomainOnRight);
//                } else if (intervalDomain.isLeftBorder(interval)) {
//                    coordinatesDomainOnLeft.add(Integer.toString(intervalDomain.a));
//                    coordinatesDomainOnLeft.add(Integer.toString(intervalDomain.b));
//                    comparisonResult.informationAboutGenesLeft.put(interval, coordinatesDomainOnLeft);
//                }
//            }
//        }
        return comparisonResult;
    }