-
-
Save lindenb/316aab24e7f9695256dcd2c40986c460 to your computer and use it in GitHub Desktop.
How to get names and class information from a list of target IDs from the JASPAR database? https://www.biostars.org/p/9551867/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="text"/> | |
<xsl:template match="/"> | |
<xsl:apply-templates select="//h3[text()='Profile summary']" /> | |
</xsl:template> | |
<xsl:template match="h3"> | |
<xsl:apply-templates select="../../div/table" /> | |
</xsl:template> | |
<xsl:template match="table"> | |
<xsl:value-of select="normalize-space(tr[normalize-space(td[1])='Matrix ID:']/td[2]/text())"/> | |
<xsl:text> </xsl:text> | |
<xsl:value-of select="normalize-space(tr[normalize-space(td[1])='Name:']/td[2]/text())"/> | |
<xsl:text> </xsl:text> | |
<xsl:value-of select="normalize-space(tr[normalize-space(td[1])='Class:']/td[2]/text())"/> | |
<xsl:text> </xsl:text> | |
<xsl:value-of select="normalize-space(tr[normalize-space(td[1])='Family:']/td[2]/text())"/> | |
<xsl:text> | |
</xsl:text> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment