private static void calculateOverlap(String nameSetA, EnumMap<RatChromosomes, ArrayList<Deletion>> deletionSetA, String nameSetB, EnumMap<RatChromosomes, ArrayList<Deletion>> deletionSetB) {

        //initialize the maps to store the concordant and discordant call
        EnumMap<RatChromosomes, ArrayList<Deletion>> concordantWithSetB = new EnumMap<RatChromosomes, ArrayList<Deletion>>(RatChromosomes.class);
        for (RatChromosomes ratChromosomes : RatChromosomes.values()) {
            ArrayList<Deletion> deletions = new ArrayList<Deletion>();
            concordantWithSetB.put(ratChromosomes, deletions);
        }

        EnumMap<RatChromosomes, ArrayList<Deletion>> discordantWithSetB = new EnumMap<RatChromosomes, ArrayList<Deletion>>(RatChromosomes.class);
        for (RatChromosomes ratChromosomes : RatChromosomes.values()) {
            ArrayList<Deletion> deletions = new ArrayList<Deletion>();
            discordantWithSetB.put(ratChromosomes, deletions);
        }

        //initialize the concordant and discordant counters
        Integer concordantWithBCounter = 0;
        Integer discordantWithBCounter = 0;

        for (RatChromosomes ratChromosome : RatChromosomes.values()) {
            List<Deletion> deletionListSetA = deletionSetA.get(ratChromosome);
            List<Deletion> deletionListSetB = deletionSetB.get(ratChromosome);

            for (Deletion deletionA : deletionListSetA) {
                Boolean overLap = false;
                for (Deletion deletionB : deletionListSetB) {
//                    if (deletionA.getLocation().isOverlappedBy(deletionB.getLocation())) {
//                        overLap = true;
//                    }
                    
                    if (deletionA.getLocation().isOverlappedBy(deletionB.getLocation())) 
                    {
                        Range<Integer> intersection = deletionA.getLocation().intersectionWith(deletionB.getLocation());
                        Double overlapLenght = new Double(intersection.getMaximum() - intersection.getMinimum());
                        Double deletionALenght = new Double(deletionA.getLocation().getMaximum() - deletionA.getLocation().getMinimum());
                        Double deletionBLenght = new Double(deletionB.getLocation().getMaximum() - deletionB.getLocation().getMinimum());
                        Double overlapFractionOfA = overlapLenght / deletionALenght;
                        Double overlapFractionOfB = overlapLenght / deletionBLenght;
                        Double cutOff = new Double("0.5");
                        
                        if(overlapFractionOfA > cutOff && overlapFractionOfB > cutOff)
                        //if(overlapFractionOfA > cutOff)
                        {
                            overLap = true;
                        }
                    }
                    

                }
                if (overLap == true) {
                    concordantWithBCounter++;
                    concordantWithSetB.get(ratChromosome).add(deletionA);

                } else {
                    discordantWithBCounter++;
                    discordantWithSetB.get(ratChromosome).add(deletionA);
                }

            }
        }

        System.out.println(concordantWithBCounter + " from set " + nameSetA + " concordant with " + nameSetB);
        System.out.println(discordantWithBCounter + " from set " + nameSetA + " disconcordant with " + nameSetB);

        Double overlapPercentage = new Double(concordantWithBCounter) / (new Double(concordantWithBCounter) + new Double(discordantWithBCounter)) * new Double(100);

        System.out.println(overlapPercentage + " % overlap from set " + nameSetA + "  with " + nameSetB);

     //  printDeletions(concordantWithSetB, "concordantWith "+nameSetB);
       //printDeletions(discordantWithSetB, "disconcordantWith "+nameSetB);




    }