public static List<PTM> filterPTMsByAminoAcidSpecificityPosition(List<PTM> resultMaps, String position) {
        List<Specificity> specificities = new ArrayList<>();
        Set<PTM> resultPTMs = new HashSet<>();

        if(Specificity.parsePositon(position) == Specificity.Position.NTERM){
            // For NTerm some time the original information do not keep the diffent at peptide level between peptide and protein
            specificities.add(new Specificity(Specificity.AminoAcid.NONE, Specificity.Position.NTERM));
            specificities.add(new Specificity(Specificity.AminoAcid.NONE, Specificity.Position.PNTERM));
        }else if(Specificity.parsePositon(position) == Specificity.Position.CTERM){
            specificities.add(new Specificity(Specificity.AminoAcid.NONE, Specificity.Position.CTERM));
            specificities.add(new Specificity(Specificity.AminoAcid.NONE, Specificity.Position.PCTERM));
        }else{
            specificities.add(new Specificity(Specificity.AminoAcid.NONE, Specificity.parsePositon(position)));
        }

        for(PTM ptm: resultMaps){
            for(Specificity currentSpecificity: ptm.getSpecificityCollection())
                for(Specificity specificity: specificities)
                    if(specificity.getPosition().equals(currentSpecificity.getPosition()))
                        resultPTMs.add(ptm);
        }
        List<PTM> ptms = new ArrayList<>();
        for(PTM ptm: resultPTMs)
            ptms.add(ptm);

        return ptms;
    }