createCytoFiles         package:MetaNetwork         R Documentation

_W_r_i_t_e _C_y_t_o_s_c_a_p_e _v_i_s_u_a_l_i_z_a_t_i_o_n _f_i_l_e_s

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

     Create visualization files for Cytoscape, the network
     visualization software. Any correlation higher than 'simThres' is
     written into Cytoscape network files and can be loaded into
     Cytoscape for visualization.

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

     createCytoFiles(corrMatrix, filename, simThres = NULL, hideNodes = T)

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

corrMatrix: matrix for pair-wise correlation.
           See 'corrSecondOrder' example data. 

filename: network file name, without extension. Extensions .sif and
          .eda  will be added for network and edge attribute files,
          respectively. 

simThres: (optional) numeric similarity threshold if the values in 
          matrix are similarity values such as correlation
          coefficients. Default is NULL. 

hideNodes: (optional) logical value to hide nodes without any 
          significant links. Default is TRUE

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

     A network file ('filename'.sif) and edge attribute file 
     ('filename'.eda) are generated.

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

     Jingyuan Fu <j.fu@rug.nl>,  Morris Swertz <m.a.swertz@rug.nl>, 
     Ritsert Jansen <r.c.jansen@rug.nl>

_R_e_f_e_r_e_n_c_e_s:

     Fu J, Swertz MA, Keurentjes JJB, Jansen RC. MetaNetwork: a
     computational tool for the  genetic study of metabolism. Nature
     Protocols (2007). 

     <URL: http://gbic.biol.rug.nl/supplementary/2007/MetaNetwork>

     <URL: http://www.cytoscape.org/>

_S_e_e _A_l_s_o:

     Use 'cor', 'qtlCorrZeroOrder' and  'qtlCorrSecondOrder' to
     calculate 'corrMatrix' correlation matrix.
      Use 'MetaNetwork' for automated appliction of this function as 
     part a genetic analysis protocol on metabolites.

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

     ##NOTE: this method can be used on any correlation matrix.
     #Here we use MetaNetwork methods.

     ## load the example data provided with this package                        
     data(markers)   
     data(genotypes)
     data(traits)                                                       
                                                  
     ##OR: load your own data                     
     #markers        <- loadData("markers.csv")
     #genotypes      <- loadData("genotypes.csv")
     #traits         <- loadData("traits.csv")  
                                                  
     ##calculate the two part qtl
     qtlProfiles     <- qtlMapTwoPart(genotypes=genotypes, traits=traits, spike=4)
       
     ##set the qtl threshold
     qtlThres        <- 3.79

     ##OR: estimate the threshold yourself
     #qtlThres       <- qtlThreshold(genotypes, traits, spike=4)  
       
     ##calculate zero order correlation
     corrZeroOrder   <- qtlCorrZeroOrder(markers, qtlProfiles, qtlThres)

     ##calculate second order correlation
     corrSecondOrder <- qtlCorrSecondOrder( corrZeroOrder ) 

     ##set the correlation threshold
     corrThres       <- 0.14

     ##OR: estimate qtlCorrThreshold yourself
     #corrThres      <- qtlCorThreshold(markers, genotypes, traits, spike=4, qtlThres=qtlThres)  

     ##create cytoscape files "mynetwork.sif" and "mynetwork.eda"
     createCytoFiles(corrSecondOrder, "mynetwork", simThres = corrThres)

     cat("cytofiles mynetwork.sif and mynetwork.eda created\n")

