com.compomics.util.experiment.identification.ptm
Class PtmSiteMapping

java.lang.Object
  extended by com.compomics.util.experiment.identification.ptm.PtmSiteMapping

public class PtmSiteMapping
extends Object

This class contains convenience methods to map ptms on potential sites.

Author:
Marc Vaudel

Constructor Summary
PtmSiteMapping()
           
 
Method Summary
static HashMap<Integer,Integer> align(Collection<Integer> serie1, Collection<Integer> serie2)
          Aligns two series of integer, minimizing the distance between them and excluding outliers.
static HashMap<Integer,Integer> alignAll(Collection<Integer> serie1, Collection<Integer> serie2)
          Aligns two series of integer, minimizing the distance between them.
static HashMap<Integer,Integer> alignAll(HashMap<Integer,ArrayList<Integer>> input)
          Aligns a serie of integer on possible targets maximizing the number of matched targets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PtmSiteMapping

public PtmSiteMapping()
Method Detail

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: serie1 = {0, 1, 13, 25, 15, 6, 99} serie2 = {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 serie 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.


Copyright © 2013. All Rights Reserved.