def getAllSpectralLibraries():
    projectId = request.args.get('projectId')

    if (projectDAO.getProjectById(projectId)):
        spec_libs = spectralLibraryDAO.getAllLibrariesForProject(projectId)
        for s in spec_libs:
            augmentedClinicalSamples = clinicalSampleDAO.augmentClinicalSampleNames(
                s['clinicalSamples'])
            augmentedMSRuns = MSRunDAO.augmentMSRunNames(s['msRunIds'])
            s['clinicalSamples'] = augmentedClinicalSamples
            s['msRunIds'] = augmentedMSRuns
        return jsonify(spec_libs), status.HTTP_200_OK
    else:
        return 'Project with id does not exist.', status.HTTP_404_NOT_FOUND
def getAllSwathAnalysis():
    projectId = request.args.get('projectId')

    if (projectDAO.getProjectById(projectId)):
        swath_analysis = swathAnalysisDAO.getSWATHByProject(projectId)
        for s in swath_analysis:
            augmentedClinicalSamples = clinicalSampleDAO.augmentClinicalSampleNames(
                s['clinicalSamples'])
            augmentedMSRuns = MSRunDAO.augmentMSRunNames(
                s['msRunIds'])
            s['clinicalSamples'] = augmentedClinicalSamples
            s['msRunIds'] = augmentedMSRuns
        return jsonify(swath_analysis), status.HTTP_200_OK
    else:
        return 'Project with id does not exist.', status.HTTP_404_NOT_FOUND