Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
science
xtandem
tandem2csv.xsl
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tandem2csv.xsl of Package xtandem
<?xml version="1.0" encoding="UTF-8"?> <!-- Transforms X!Tandem output file into CSV format --> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text" encoding="UTF-8" media-type="text/csv"/> <xsl:template match="/bioml"> <xsl:text>Protein</xsl:text> <xsl:text>,Peptide</xsl:text> <xsl:text>,Modifications</xsl:text> <xsl:text>,Start</xsl:text> <xsl:text>,End</xsl:text> <xsl:text>,mh</xsl:text> <xsl:text>,Charge</xsl:text> <xsl:text>,Delta</xsl:text> <xsl:text>,SumIntensity</xsl:text> <xsl:text>,Spectrum#</xsl:text> <xsl:text>,ProteinExpect</xsl:text> <xsl:text>,PeptideExpect</xsl:text> <xsl:value-of select="' '"/> <xsl:apply-templates/> </xsl:template> <xsl:template match="/bioml/group[@type = 'model']/protein"> <!-- Protein --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="note[@label = 'description']"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Peptide --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@seq"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Modifications --> <xsl:variable name="mods"> <xsl:call-template name="getmods"> <xsl:with-param name="domain" select="peptide/domain"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="$mods"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Start --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@start"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- End --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@end"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- mh --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@mh"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Charge --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="../@z"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Delta --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@delta"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- SumIntensity --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="@sumI"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- Spectrum# --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="substring-before(@id, '.')"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- ProteinExpect --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="@expect"/> </xsl:call-template> <xsl:value-of select="','"/> <!-- PeptideExpect --> <xsl:call-template name="enquote"> <xsl:with-param name="s" select="peptide/domain/@expect"/> </xsl:call-template> <xsl:value-of select="' '"/> </xsl:template> <xsl:template name="getmods"> <xsl:param name="domain" select="."/> <xsl:for-each select="$domain/aa"> <xsl:if test="position() > 1">,</xsl:if> <xsl:value-of select="concat(@modified, '(', @type, ')@', @at)"/> </xsl:for-each> </xsl:template> <xsl:template name="enquote"> <xsl:param name="s" select="."/> <xsl:value-of select="'"'"/> <xsl:call-template name="escape"> <xsl:with-param name="s" select="$s"/> </xsl:call-template> <xsl:value-of select="'"'"/> </xsl:template> <xsl:template name="escape"> <xsl:param name="s" select="."/> <xsl:choose> <xsl:when test="contains($s, '"')"> <xsl:call-template name="escape"> <xsl:with-param name="s" select="substring-before($s, '"')"/> </xsl:call-template> <xsl:value-of select="'""'"/> <xsl:call-template name="escape"> <xsl:with-param name="s" select="substring-after($s, '"')"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$s"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="@*|node()"> <xsl:apply-templates select="*"/> </xsl:template> </xsl:transform>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor