Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 78f3e5c6 rédigé par lindenb's avatar lindenb
Parcourir les fichiers

cont

parent c9d64ec2
Branches ncbi
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
CURL=curl -sLk
SHELL=/bin/bash
EUTILS=http://eutils.ncbi.nlm.nih.gov/entrez/eutils/
EFETCH=${EUTILS}/efetch.fcgi
NCBI=
EUTILS=http://eutils.ncbi.nlm.nih.gov
ENTREZ=${EUTILS}/entrez/eutils
EFETCH=${ENTREZ}/efetch.fcgi
ESEARCH=${ENTREZ}/esearch.fcgi
ESUMMARY=${ENTREZ}/esummary.fcgi
ELINK=${ENTREZ}/elink.fcgi
HEADANDTAIL=(head -n 50; echo -e '\n\n(...)\n\n'; head -n 50)
XMLFORMAT= xmllint --format -
CUT=awk '{printf("%s\n",(length($$0)<100?$$0:sprintf("%s ...",substr($$0,1,100))));}'
.PHONY:all
all:
@echo "select a specific target"
u001:
u0010:
@${CURL} "${EFETCH}?db=nucleotide&id=25&rettype=gb"
u002:
u0020:
@${CURL} "${EFETCH}?db=nucleotide&id=25"
u003:
......@@ -22,24 +30,160 @@ u003:
u004:
@${CURL} "${EFETCH}?db=nucleotide&id=25&retmode=xml"
u005:
u0050:
@${CURL} "http://www.ncbi.nlm.nih.gov/dtd/NCBI_GBSeq.mod.dtd"
u006:
@${CURL} "${EUTILS}/einfo.fcgi"
u0060:
@${CURL} "${ENTREZ}/einfo.fcgi"
u007:
@${CURL} "${EUTILS}/einfo.fcgi?db=pubmed" | ${HEADANDTAIL}
u0070:
@${CURL} "${ENTREZ}/einfo.fcgi?db=pubmed" | ${HEADANDTAIL}
u008:
@${CURL} "http://eutils.ncbi.nlm.nih.gov/gquery?term=tyrannosaurus%20rex&retmode=xml" |\
u0080:
@${CURL} "${EUTILS}/gquery?term=tyrannosaurus%20rex&retmode=xml" |\
xmllint --format -
gquery2html.xsl:
${CURL} -o $@ "https://raw.githubusercontent.com/lindenb/courses/master/about.ncbi/$@"
trex1.html : gquery2html.xsl
${CURL} "http://eutils.ncbi.nlm.nih.gov/gquery?term=tyrannosaurus%20rex&retmode=xml" |\
${CURL} "${EUTILS}/gquery?term=tyrannosaurus%20rex&retmode=xml" |\
xsltproc $< - > $@
u0090:
@${CURL} "${ESEARCH}?db=nucleotide&term=%22Mammuthus%20primigenius%22%5BORGN%5D" | ${XMLFORMAT}
u0100:
@${CURL} "${ESEARCH}?db=nucleotide&term=%22Mammuthus%20primigenius%22%5BORGN%5D&retmax=2" | ${XMLFORMAT}
u0110:
@${CURL} "${ESEARCH}?db=nucleotide&term=%22Mammuthus%20primigenius%22%5BORGN%5D&retmax=3&retstart=10"| ${XMLFORMAT}
u0120:
@${CURL} "${ESUMMARY}?db=nucleotide&term=%22Mammuthus%20primigenius%22%5BORGN%5D&rettype=count" | ${XMLFORMAT}
u0130:
@${CURL} "${ESUMMARY}?db=nucleotide&id=507866428" | ${XMLFORMAT}
u0140:
@${CURL} "${ESUMMARY}?db=snp&id=25"| ${XMLFORMAT}
u0150:
@${CURL} "${ESUMMARY}?db=pubmed&id=7939126"| ${XMLFORMAT}
u0160:
@${CURL} "${EFETCH}?db=nucleotide&id=507866428" | ${HEADANDTAIL}
u0170:
@${CURL} "${EFETCH}?db=nucleotide&id=507866428&rettype=fasta"| ${HEADANDTAIL}
u0180:
@${CURL} "${EFETCH}?db=nucleotide&id=507866428&rettype=fasta&retmode=xml"| ${XMLFORMAT} | ${CUT}
u0190:
@${CURL} "${EFETCH}?db=nucleotide&id=507866428&retmode=xml"| ${XMLFORMAT} | ${CUT}
u0200:
@${CURL} "${EFETCH}?db=nucleotide&id=507866428&rettype=gb&retmode=xml"| ${XMLFORMAT} | ${CUT}
u0210:
@${CURL} "${EFETCH}?db=nucleotide&id=KC524742&rettype=gb&retmode=xml"| ${XMLFORMAT} | ${CUT}
u0220:
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" | ${XMLFORMAT}
u0230:
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=taxonomy&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL}
ncbi2epost.xsl:
${CURL} -o $@ "https://raw.githubusercontent.com/lindenb/courses/master/about.ncbi/$@"
u0240: ncbi2epost.xsl
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=taxonomy&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL} |\
xsltproc $< -
u0241: ncbi2epost.xsl
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=taxonomy&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL} |\
xsltproc $< - |\
/bin/bash
u0242: ncbi2epost.xsl
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=taxonomy&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL} |\
xsltproc $< - |\
/bin/bash |\
xmllint --xpath 'concat(/ePostResult/QueryKey/text(),",",/ePostResult/WebEnv/text())' - |\
awk -F, '{printf("${ESEARCH}?db=taxonomy&query_key=%s&usehistory=y&WebEnv=%s&term=Homo%20Sapiens\n",$$1,$$2);}' |\
xargs ${CURL} |\
${XMLFORMAT}
u0243: ncbi2epost.xsl
${CURL} "${ESEARCH}?usehistory=y&db=taxonomy&term=extinct%5BPROP%5D" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=taxonomy&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL} |\
xsltproc $< - |\
/bin/bash |\
xmllint --xpath 'concat(/ePostResult/QueryKey/text(),",",/ePostResult/WebEnv/text())' - |\
awk -F, '{printf("${ESEARCH}?db=taxonomy&query_key=%s&usehistory=y&WebEnv=%s&term=Tyrannosaurus\n",$$1,$$2);}' |\
xargs ${CURL} |\
${XMLFORMAT}
u0250:
${CURL} "${ELINK}?dbfrom=nucleotide&db=pubmed&id=507866428&cmd=neighbor_score"
u0251:
${CURL} "${ELINK}?dbfrom=nucleotide&db=pubmed&id=507866428&cmd=neighbor_score" |\
xmllint --xpath '/eLinkResult/LinkSet/LinkSetDb[1]/Link[1]/Id[1]/text()' - |\
awk -F, '{printf("\"${EFETCH}?db=pubmed&rettype=medline&id=%s\"\n",$$0);}' |\
xargs ${CURL}
u0260:
xsltproc <(${CURL} "https://raw.github.com/lindenb/xslt-sandbox/master/stylesheets/bio/ncbi/gb2svg.xsl") \
"${EFETCH}?db=nucleotide&id=14971102&retmode=xml&rettype=gbc" > $(addsuffix .svg,$@)
pubmed2rstats.xsl:
${CURL} -o $@ "https://raw.githubusercontent.com/lindenb/courses/master/about.ncbi/$@"
u0270: pubmed2rstats.xsl
${CURL} "${ESEARCH}?usehistory=y&db=pubmed&term=tyrannosaurus" |\
xmllint --xpath 'concat(/eSearchResult/QueryKey/text(),",",/eSearchResult/WebEnv/text())' - |\
awk -F, '{printf("${EFETCH}?db=pubmed&retmode=xml&usehistory=y&query_key=%s&WebEnv=%s\n",$$1,$$2);}' |\
xargs ${CURL} |\
xsltproc $< - | R --no-save --quiet
docsum_3.3.xsd:
${CURL} -o $@ "ftp://ftp.ncbi.nlm.nih.gov/snp/specs/$@"
u0280: docsum_3.3.xsd
xjc -d . $<
ParseDbSnp.java:
${CURL} -o $@ "https://raw.githubusercontent.com/lindenb/courses/master/about.ncbi/$@"
u0290 : ParseDbSnp.java u0280
javac $< gov/nih/nlm/ncbi/snp/docsum/*.java && \
${CURL} "ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/XML/ds_ch1.xml.gz" |\
gunzip -c | java ParseDbSnp
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter