graphConverter            package:RpsiXML            R Documentation

_m_a_p_s _o_n_e _t_y_p_e _o_f _g_r_a_p _o_n_t_o _a_n_o_t_h_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     The graphConverter function takes a graphNEL object, along with
     some information about what species that graphNEL is from and what
     species you wish to convert it into, and then uses the mappings in
     the inparanoid packages to convert that graph into an equivalent
     graph from the other species.  The hyperGraphConverter performs
     the same service for either an incidence matrix or a Hypergraph.

_U_s_a_g_e:

       graphConverter(graph, srcSpecies, destSpecies,
         srcIDType, destIDType, keepMultGeneMatches=FALSE,
         keepMultProtMatches=FALSE)
       hyperGraphConverter(graph, srcSpecies, destSpecies, srcIDType,
         destIDType, mapCols=FALSE, keepMultGeneMatches=FALSE,
         keepMultProtMatches=FALSE)

_A_r_g_u_m_e_n_t_s:

   graph: If calling graphConverter. then this is a graphNEL object. 
          Otherwise, it will be an incidence matrix or a hyperGraph

srcSpecies: The original source species in in paranoid format. In other
          words, the 3 letters of the genus followed by 2 letters of
          the species in all caps.  Ie. 'HOMSA' is for Homo sapiens
          etc.

destSpecies: the destination species in inparanoid format

srcIDType: The source ID type written exactly as it would be used in a
          mapping name for an eg package.  So for example, 'UNIPROT' is
          how the uniprot mappings are always written, so we keep that
          convention here.

destIDType: the destination ID, written the same way as you would write
          the srcIDType.

 mapCols: For hyperGraphConverter set to true if the cols are gene
          names so that they too will be mapped.

keepMultGeneMatches: Do you want to try and keep the 1st ID in those
          ambiguous cases where more than one protein is suggested? 
          (You probably want to filter them out - hence the default is
          FALSE)

keepMultProtMatches: Do you want to try and keep the 1st ID in those
          ambiguous cases where more than one protein is suggested?
          (default = FALSE)

_V_a_l_u_e:

     a graphNEL containing as many nodes as it was possible to find
     matches for.

_A_u_t_h_o_r(_s):

     Marc Carlson

_E_x_a_m_p_l_e_s:

       ##Set up a graphNEL object to convert
       library(RpsiXML)  
       directory <- system.file("/extdata/psi25files",
                                package="RpsiXML")
       mintXML <- file.path(directory, 
                            "mint_200711_test.xml")
       mintGraph <- separateXMLDataByExpt(xmlFiles=mintXML, 
                                          psimi25source = MINT.PSIMI25, 
                                          type = "indirect", 
                                          directed=TRUE, 
                                          abstract=FALSE)

       if(require("hom.Mm.inp.db")) {
         ##convert it
         newGraph = graphConverter(mintGraph[[1]], "MUSMU", "HOMSA")
       }

       ##Get a hypergraph
       xmlDir <- system.file("/extdata/psi25files",package="RpsiXML")
       intactComplexxml <- file.path(xmlDir,"intact_complexSample.xml")
       hyperGraph <- buildPCHypergraph(intactComplexxml, INTACT.PSIMI25)

       if(require("hom.Hs.inp.db")) {
       ##Convert it
       newHyper = hyperGraphConverter(hyperGraph, "HOMSA", "MUSMU", "UNIPROT",
       "UNIPROT")
       }

       ##Get a incidence matrix from ScISI
       if(require(ScISI)) {
         data(ScISIC)

         if(require("org.Sc.eg.db")) {
         ##Convert it
         newScISIC = hyperGraphConverter(ScISIC, "SACCE", "MUSMU",
         srcIDType="ORF", destIDType = "EG")
       }
       }

