def add_duplicate_analysis(self, src_analysis, destination_slot,
                               ref_gid=None):
        """
        Creates a duplicate of the src_analysis passed in. If the analysis
        passed in is not an IRoutineAnalysis, is retracted or has dependent
        services, returns None.If no reference analyses group id (ref_gid) is
        set, the value will be generated automatically.
        :param src_analysis: analysis to create a duplicate from
        :param destination_slot: slot where duplicate analysis must be stored
        :param ref_gid: the reference analysis group id to be set
        :return: the duplicate analysis or None
        """
        if not src_analysis:
            return None

        if not IRoutineAnalysis.providedBy(src_analysis):
            logger.warning('Cannot create duplicate analysis from a non '
                           'routine analysis: {}'.format(src_analysis.getId()))
            return None

        if api.get_review_status(src_analysis) == 'retracted':
            logger.warning('Cannot create duplicate analysis from a retracted'
                           'analysis: {}'.format(src_analysis.getId()))
            return None

        # TODO Workflow - Duplicate Analyses - Consider duplicates with deps
        # Removing this check from here and ensuring that duplicate.getSiblings
        # returns the analyses sorted by priority (duplicates from same
        # AR > routine analyses from same AR > duplicates from same WS >
        # routine analyses from same WS) should be almost enough
        calc = src_analysis.getCalculation()
        if calc and calc.getDependentServices():
            logger.warning('Cannot create duplicate analysis from an'
                           'analysis with dependent services: {}'
                           .format(src_analysis.getId()))
            return None

        # Create the duplicate
        duplicate = _createObjectByType("DuplicateAnalysis", self, tmpID())
        duplicate.setAnalysis(src_analysis)

        # Set ReferenceAnalysesGroupID (same id for the analyses from
        # the same Reference Sample and same Worksheet)
        if not ref_gid:
            ref_gid = self.nextRefAnalysesGroupID(duplicate.getRequest())
        duplicate.setReferenceAnalysesGroupID(ref_gid)

        # Add the duplicate into the worksheet
        self.addToLayout(duplicate, destination_slot)
        self.setAnalyses(self.getAnalyses() + [duplicate, ])

        # Reindex
        duplicate.reindexObject(idxs=["getAnalyst", "getWorksheetUID",
                                      "getReferenceAnalysesGroupID"])
        self.reindexObject(idxs=["getAnalysesUIDs"])
        return duplicate
Creates a duplicate of the src_analysis passed in. If the analysis
        passed in is not an IRoutineAnalysis, is retracted or has dependent
        services, returns None.If no reference analyses group id (ref_gid) is
        set, the value will be generated automatically.
        :param src_analysis: analysis to create a duplicate from
        :param destination_slot: slot where duplicate analysis must be stored
        :param ref_gid: the reference analysis group id to be set
        :return: the duplicate analysis or None