def METHOD_NAME(
    experiment: Experiment,
    rt_alignment_number: int,
    analysis_number: int,
    source_atlas_unique_id: str,
    configuration: Config,
    workflow: Workflow,
    analysis: Analysis,
    username: Optional[Username] = None,
    lcmsruns: Optional[LcmsRunsList] = None,
    groups: Optional[GroupList] = None,
) -> MetatlasDataset:
    """All data processing that needs to occur before the annotation GUI in Targeted notebook"""
    params = analysis.parameters
    ids = analysis_ids.AnalysisIdentifiers(
        project_directory=params.project_directory,
        experiment=experiment,
        analysis_number=analysis_number,
        configuration=configuration,
        workflow=workflow.name,
        analysis=analysis.name,
        source_atlas_unique_id=source_atlas_unique_id,
        username=getpass.getuser() if username is None else username,
        rt_alignment_number=rt_alignment_number,
        lcmsruns=lcmsruns,
        groups=groups,
    )
    shutil.copy2(params.config_file_name, ids.additional_output_dir)
    ids.display_lcmsruns()
    ids.display_groups()
    if params.clear_cache:
        logger.info("Clearing cache.")
        shutil.rmtree(ids.cache_dir)
    metatlas_dataset = MetatlasDataset(ids=ids, max_cpus=params.max_cpus)
    metatlas_dataset.filter_compounds_by_signal(params.num_points, params.peak_height, params.msms_score)
    return metatlas_dataset