User:Lindenb/Notebook/UMR915/20110131: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(New page: =Project 'B'= merging files =interactome for project 'B'= tried to open BIOGRID human in cytoscape= out of memory converted PSI to GEXF , the networks can be openeded in gephi <pre><?xml ...)
(No difference)

Revision as of 02:21, 31 January 2011

Project 'B'

merging files

interactome for project 'B'

tried to open BIOGRID human in cytoscape= out of memory

converted PSI to GEXF , the networks can be openeded in gephi

<?xml version='1.0'  encoding="UTF-8" ?>
<xsl:stylesheet
	xmlns:g="http://www.gexf.net/1.2draft"
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
	xmlns:p="net:sf:psidev:mi"
        version='1.0'
        >
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
<g:gexf  version="1.2">
<xsl:apply-templates select="p:entrySet"/>
</g:gexf>
</xsl:template>


<xsl:template match="p:entrySet">
<xsl:apply-templates select="p:entry"/>
</xsl:template>

<xsl:template match="p:entry">
  <g:graph mode="static" defaultedgetype="undirected">
	<g:nodes>
	<xsl:apply-templates select="p:interactorList"/>
	</g:nodes>
  </g:graph>
</xsl:template>


<xsl:template match="p:entry">
  <g:graph mode="static" defaultedgetype="directed">
    <xsl:apply-templates select="p:interactorList"/>
    <xsl:apply-templates select="p:interactionList"/>
  </g:graph>
</xsl:template>

<xsl:template match="p:interactorList">
<g:nodes>
  <xsl:apply-templates select="p:interactor"/>
</g:nodes>
</xsl:template>

<xsl:template match="p:interactor">
  <xsl:element name="g:node">
    <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
    <xsl:attribute name="label"><xsl:value-of select="p:names/p:shortLabel"/></xsl:attribute>
  </xsl:element>
</xsl:template>

<xsl:template match="p:interactionList">
<g:edges>
  <xsl:apply-templates select="p:interaction"/>
</g:edges>
</xsl:template>

<xsl:template match="p:interaction">
  <xsl:element name="g:edge">
    <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
    <xsl:attribute name="source"><xsl:value-of select="p:participantList/p:participant[1]/p:interactorRef"/></xsl:attribute>
    <xsl:attribute name="target"><xsl:value-of select="p:participantList/p:participant[2]/p:interactorRef"/></xsl:attribute>
  </xsl:element>
</xsl:template>


</xsl:stylesheet>

But it's slow & not very useful.