User:Lindenb/Notebook/UMR915/20110201

From OpenWetWare

Jump to: navigation, search

20110131        Top        20110203       


Proteomics

wrote software for CĂ©line. See fr.inserm.umr915.proteomics.MassSpecProduct

used a stylesheet to extract the fields from a HTML form:
<?xml version='1.0'  encoding="UTF-8" ?>
<xsl:stylesheet
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
       
        version='1.0'
        >
<xsl:output method="text"/>

<xsl:template match="/">
class HttpParam
	{
	private String name;
	private String value;
	public HttpParam(String name,String value)
		{
		this.name=name;
		this.value=value;
		}
	public String getName()
		{
		return this.name;
		}
	public String getValue()
		{
		return this.value;
		}
	public String toString()
		{
		return getName()+"="+getValue();
		}
	}
<xsl:apply-templates select="//form"/>
</xsl:template>


<xsl:template match="form">

<xsl:apply-templates select=".//input|//select|//textarea|//button"/>
	
</xsl:template>

<xsl:template match="input">
<xsl:choose>
<xsl:when test="@type='checkbox'">
	<xsl:if test="@checked">
	params.add(new HttpParam("<xsl:value-of select="@name"/>","<xsl:value-of
 select="@value"/>"));//<xsl:value-of select="@type"/>
	</xsl:if>
</xsl:when>
<xsl:when test="@type='reset'">
</xsl:when>
<xsl:otherwise>
	params.add(new HttpParam("<xsl:value-of select="@name"/>","<xsl:value-of
 select="@value"/>"));//<xsl:value-of select="@type"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="select">
<xsl:variable name="fieldName" select="@name"/>
<xsl:for-each select="option">
	<xsl:if test="@selected">
		<xsl:choose>
			<xsl:when test="@value">
				params.add(new HttpParam("<xsl:value-of select="
$fieldName"/>","<xsl:value-of select="@value"/>"));//select
			</xsl:when>
			<xsl:otherwise>
				params.add(new HttpParam("<xsl:value-of select="
$fieldName"/>","<xsl:value-of select="."/>"));//select
			</xsl:otherwise>
		</xsl:choose>
	</xsl:if>
</xsl:for-each>
</xsl:template>

<xsl:template match="textarea">
params.add(new HttpParam("<xsl:value-of select="@name"/>","<xsl:value-of select=
"."/>"));//textarea
</xsl:template>
</xsl:stylesheet>

Project 'B'

started remove duplicates with picard.

AngelHeart

Added support for NCBI-Gene: Thread looking at NCBI-Gene to get the gene definition.

Personal tools