public ComparisonResult comparisonDomainsWithGenesOnlyBorder(Chromosome other, int epsilon) // <---- other this is genes
    {
        int Closer = 4;
        int InsideNotCloser = 6;
        int CloserAndInside = 7;
        int Other = 1;

        ComparisonResult comparisonResult = new ComparisonResult();
//        for (Interval genes : other.intervals) {
//            for (Interval domain : intervals) {
//                if (genes.isRightBorder2(domain) || genes.isLeftBorder2(domain)) {
//                    intersectBorder(comparisonResult, genes);
//                } else if (genes.closerToTheRight(domain, epsilon) || genes.closerToTheLeft(domain, epsilon)) {
//                    comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, CloserAndInside); // <--- closer
//                } else if (genes.isInsideGene(domain)) {
//                    if (!comparisonResult.numberGenesOnBorderIntervalAllSide.containsKey(genes.name)) {
//                        comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, InsideNotCloser); //<--inside исключая крайние
//                    } else
//                        comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, CloserAndInside); // и у края и внутри
//                }
//            }
//            if (!comparisonResult.numberGenesOnBorderIntervalAllSide.containsKey(genes.name)) {
//                comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, Other);
//            }
//        }
        System.out.println("Size " + other.intervals.size());
        for (Interval genes : other.intervals)
        {
            for(Interval domain : intervals)
            {
                if (genes.isRightBorder2(domain) || genes.isLeftBorder2(domain))
                    intersectBorder(comparisonResult, genes);                       // <--- intersected or longer
                if (genes.closerToTheRight(domain, epsilon) || genes.closerToTheLeft(domain, epsilon))
                    comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, CloserAndInside);
                if (genes.isInsideGene(domain) && !comparisonResult.numberGenesOnBorderIntervalAllSide.containsKey(genes.name))
                        comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, InsideNotCloser);
            }
            if (!comparisonResult.numberGenesOnBorderIntervalAllSide.containsKey(genes.name))
                comparisonResult.numberGenesOnBorderIntervalAllSide.put(genes.name, Other);

        }
        return comparisonResult;
    }