Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pierre LINDENBAUM
tdncbi
Commits
a615ef15
Commit
a615ef15
authored
Sep 28, 2015
by
lindenb
Browse files
cont
parent
141eaa84
Changes
3
Hide whitespace changes
Inline
Side-by-side
gquery2html.xsl
0 → 100644
View file @
a615ef15
<?xml version='1.0' encoding="UTF-8" ?>
<xsl:stylesheet
xmlns:xsl=
'http://www.w3.org/1999/XSL/Transform'
version=
'1.0'
>
<xsl:output
method=
"html"
/>
<xsl:template
match=
"/"
><html><body>
<xsl:apply-templates
select=
"Result"
/>
</body></html></xsl:template>
<xsl:template
match=
"Result"
>
<table><caption><xsl:value-of
select=
"Term"
/></caption>
<tr><th>
Database
</th><th>
Count
</th><th>
Status
</th></tr>
<xsl:apply-templates
select=
"eGQueryResult/ResultItem"
/>
</table>
</xsl:template>
<xsl:template
match=
"ResultItem"
>
<tr>
<td><a>
<xsl:attribute
name=
"href"
>
http://www.ncbi.nlm.nih.gov/
<xsl:value-of
select=
"DbName"
/>
?cmd=search
&
term=
<xsl:value-of
select=
"translate(/Result/Term,' ','+')"
/></xsl:attribute>
<xsl:value-of
select=
"DbName"
/></a></td>
<td><xsl:value-of
select=
"Count"
/></td>
<td><xsl:value-of
select=
"Status"
/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
ncbi2epost.xsl
0 → 100644
View file @
a615ef15
<?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:param
name=
"WebEnv"
></xsl:param>
<xsl:template
match=
"/"
>
<xsl:apply-templates
select=
"TaxaSet"
/>
</xsl:template>
<xsl:template
match=
"TaxaSet"
>
<xsl:text>
curl -d @- "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/epost.fcgi"
<<
EOF
db=taxonomy
&
WebEnv=
</xsl:text>
<xsl:value-of
select=
"$WebEnv"
/>
<xsl:text>
&
id=
</xsl:text>
<xsl:apply-templates
select=
"Taxon"
/>
<xsl:text>
EOF
</xsl:text>
</xsl:template>
<xsl:template
match=
"Taxon"
>
<xsl:apply-templates
select=
"TaxId"
/>
<xsl:text>
,
</xsl:text>
</xsl:template>
</xsl:stylesheet>
pubmed2rstats.xsl
0 → 100644
View file @
a615ef15
<?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=
"/"
>
date2count
<
- list()
<xsl:apply-templates
select=
"/PubmedArticleSet/PubmedArticle[MedlineCitation/DateCreated/Year]"
/>
df
<
- data.frame(
Year=as.integer(names(date2count)),
Count=unlist(date2count)
)
png('jeterpubmed.png')
plot(df)
title('pubmed: count(articles)=f(year)')
dev.off()
</xsl:template>
<xsl:template
match=
"PubmedArticle"
>
<xsl:variable
name=
"year"
select=
"MedlineCitation/DateCreated/Year"
/>
date2count[["
<xsl:value-of
select=
"$year"
/>
"]]
<
- ifelse(is.null(date2count[["
<xsl:value-of
select=
"$year"
/>
"]]),1,1+date2count[["
<xsl:value-of
select=
"$year"
/>
"]])
</xsl:template>
</xsl:stylesheet>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment