Class ModificationSiteMapping

java.lang.Object
com.compomics.util.experiment.identification.modification.ModificationSiteMapping

public class ModificationSiteMapping
extends Object
This class contains convenience methods to map modifications on potential sites.
Author:
Marc Vaudel
  • Constructor Details

  • Method Details

    • align

      public static HashMap<Integer,​Integer> align​(Collection<Integer> serie1, Collection<Integer> serie2)
      Aligns two series of integer, minimizing the distance between them and excluding outliers. Example: series1 = {0, 1, 13, 25, 15, 6, 99} series2 = {100, 2, 12, 14, 18, 30, 115, 1000} result = {0>null, 1>2, 6>null, 13>12, 15>14, 25>18, 99>100}
      Parameters:
      serie1 - first list of integer
      serie2 - second list of integer
      Returns:
      a map of the doublets created.
    • alignAll

      public static HashMap<Integer,​Integer> alignAll​(Collection<Integer> serie1, Collection<Integer> serie2)
      Aligns two series of integer, minimizing the distance between them. Example: serie1 = {0, 1, 13, 25, 15, 6, 99} serie2 = {100, 2, 12, 14, 18, 30, 115, 1000} result = {0> 115, 1>2, 6>30, 13>12, 15>14, 25>18, 99>100}
      Parameters:
      serie1 - first list of integer
      serie2 - second list of integer
      Returns:
      a map of the doublets created.
    • alignAll

      public static HashMap<Integer,​Integer> alignAll​(HashMap<Integer,​ArrayList<Integer>> input)
      Aligns a series of integer on possible targets maximizing the number of matched targets. Example: input = { 0 > {100, 2, 12, 14, 18, 30, 115, 1000}, 1 > {12}, 2 > {3, 12, 14}, 8 > {12}, 13 > {3, 12, 14}, 25 > {100, 2, 12, 14, 18, 30, 115, 1000}, 15 > {100, 2, 12, 14, 18, 30, 115, 1000}, 6 > {100, 2, 12, 14, 18, 30, 115, 1000}, 99 > {3} } result = {1 > null, 8 > 12, 99 > 3, 13 > 14, 2 > null, 0 > 2, 6 > 100, 15 > 18, 25 > 30}
      Parameters:
      input - the input map
      Returns:
      a map of the doublets created.