Edit: C# Functions used in our system, slightly paired down for to simplfy
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
public class KEGGCaller
{
public object ReturnKEGGgif(string GlycanMonoCode, System.Web.HttpServerUtility HTTPUtilityHolder)
{
string CallURL = "http://www.genome.jp/dbget-bin/www_bfind_sub?dbkey=glycan&keywords=";
string GlycanURL = HTTPUtilityHolder.HtmlEncode(GlycanMonoCode);
WebClient wc = new WebClient();
System.Drawing.Image GlycanGif = default(System.Drawing.Image);
CallURL += GlycanURL + "&mode=bfind&max_hit=1";
StreamReader reader = new StreamReader(wc.OpenRead(CallURL));
string Gcode = FetchGcode(reader.ReadToEnd());
if (Gcode == "Failed") {
return 0;
} else {
System.Net.HttpWebRequest Request = default(System.Net.HttpWebRequest);
System.Net.HttpWebResponse Response = default(System.Net.HttpWebResponse);
Request = System.Net.WebRequest.Create("http://www.genome.jp/dbget-bin/www_bget?gl:" + Gcode + ".gif");
Response = (System.Net.WebResponse)Request.GetResponse;
if (Request.HaveResponse) {
if (Response.StatusCode == HttpStatusCode.OK) {
GlycanGif = System.Drawing.Image.FromStream(Response.GetResponseStream);
return GlycanGif;
} else {
return 2;
}
} else {
return 1;
}
}
}
public object FetchGcode(string PageBlock)
{
string MatchURLString = "?gl:G\d\d\d\d\d";
Match URLMatch = Regex.Match(PageBlock, MatchURLString);
if (URLMatch.Success) {
return Strings.Right(URLMatch.Value, 6);
} else {
return "Failed";
}
}
}
Remainder of the Answer
Biomodels.Net is a great resource to begin with and familiarize yourself with the field and get ideas of how to tackle your qualification needs. We used it when we were doing drug screens.
More specifically for glycans, you're going to be looking at KEGG. Then use KEGG draw for your visual application. If you actually just want to parse them, here is the table on the monosaccharides used (most places).
Here's a better link right to the download in case you didn't find it. The script we wrote was pretty simple, here is the basic logic.
Start with the monosaccharide code.
Call a single return of DBGET to GenomeNet pulling from KEGG Glycan. For example:
(GlcNAc)6 (Man)3 (Asn)1
would be called:
http://www.genome.jp/dbget-bin/www_bfind_sub?dbkey=glycan&keywords=%28GlcNAc%296+%28Man%293+%28Asn%291&mode=bfind&max_hit=1
Where http://www.genome.jp/dbget-bin/www_bfind_sub?dbkey=glycan&keywords=
and &mode=bfind&max_hit=1
are going to be constant and the middle part is going to be your search.
You need to change your monosaccharide to standard URL ASCII Reference, concatenating each monosaccharide with a "+". Thus (GlcNAc)6 (Man)3 (Asn)1
becomes %28GlcNAc%296+%28Man%293+%28Asn%291
.
That will give you one hit with the link to your exact match if there is one. There will be one link on the returned page in the format of http://www.genome.jp/dbget-bin/www_bget?gl:G#####
, where G##### is your glycan number (in our example G00021).
Once you have the glycan number you're good to go. All of the structure images can be found at:
http://www.genome.jp/Fig/glycan/G#####.gif
And then you just download your GIF. The way we did our batches was to do each step for all the hits then move to the next step.
Hope that helps more.