F# Type providers

Sep 12, 2013 at 7:12 PM
Hi All,

Quick question for anyone who may be knowledgeable. I just saw a demo of F# type providers, and they really really looked awesome (converting text from websites into typed objects is a frequent, and giant waste of my time).

I am currently planning to interface a fair bit with selectome (http://selectome.unil.ch/) to grab MSAs, trees etc. The basic plan is Query->Selectome->.NET Bio typed trees, and MSAs, process data from these objects.

I thought this might be a good time to try out F# more seriously as the type of data processing it favors will work well for this process, and so was considering writing either a type provider or .NET bio interface to selectome for this. But I wanted to ask: F# type providers, anyone try them or have any experience? And assuming they turn out to be easy to write, could they be included in .NET bio?

Sep 13, 2013 at 3:05 PM
I know the F# guys and they have a longstanding interest in bioinformatics - in fact if you ever read the book 'F# for Scientists' by Jon Harrop, you will find a range of biological examples there. Those precede F# 3.0 where the type provider work was first released, though.

I also know there is a guy using F# and .NET Bio to build a genome browser - but I forget the details, it has been a while. I'm asking around here to see if I can relocate them, and if I do I'll put you in touch. Our own Jim Hogan at QUT also has an interest in F# for biology.

I can certainly see the value here, and it leverages one of the strengths of the CLR approach - it is entirely possible to write a set of database accessors in F# and taking advantage of F# type providers, and include them as part of .NET Bio release alongside the central C# codebase. Mixing languages to take advantage of strengths like these is a big part of the potential of .NET bio.

If you have an interest in pursuing this direction, I can put you in touch directly with the author of F# in Microsoft Research. I know he would love to see more people making use of this feature in biology.

All the best,

Sep 14, 2013 at 10:07 PM
[Typing this a second time after my web connection dropped out as I was posting. grrrrrr]

We do indeed have serious interests in this. We have students and an RA looking at this work. We have ported/are porting some tutorial examples, and our main serious interests lie in:
  • Type providers for the NCBI resources - genbank and ultimately anything under the entrez umbrella that makes sense.
  • Use of the F# pattern matching facilities for ad hoc search. (more on this one another time)
The genome browser was due to the websharper guys: http://t0yv0.blogspot.com/2012/01/websharper-goes-green-staph-genome-viz.html. Not sure what state it is in now - haven't looked for a while, but it was nice work.

Happy to chat, to share code and where possible student developers.

Sep 16, 2013 at 10:30 PM
The one I know about is also S. aureus - so likely to be the same...?

take a look here: http://app1.unmc.edu/fgx/

This is a project by Dr. Robert Boissy from UNMC. You can find his contact details on the web, I'm sure he would be interested in talking to anyone with similar interests.

Sep 17, 2013 at 4:32 AM
yes, the websharper guys collaborated with unmc.
Sep 22, 2013 at 3:16 AM
Hi Simon and Jim,

Thanks a lot for the responses, have to say the unmc tool looks quite nice. I spent (wasted?) a fair bit of time in my PhD doing visualizations of bacterial genomes, so am always thrilled to see an interactive tool.

Interesting you should mention that the F# team has an interest in bioinformatics. I actually learned about type libraries from a presentation at Microsoft Research Cambridge (MA). It was quite nice to meet other .NET developers and one person I was chatting with also mentioned that Don Syme was generally interested in bioinformatics and also suggested I get in contact with him. I am currently developing several mtDNA analysis tools at the Broad (related to the CLIA exome, GWAS, etc.) using C# (and perhaps F#), so it might be useful to chat with the F# team at some point if this is an area they have interest in. Do you know if most of them are in Cambridge England? I am going to a conference in a couple weeks at the Wellcomme Trust which I think is near the area, which might be a good opportunity.

Sep 24, 2013 at 3:00 AM
Hi Nigel

If your conference is at the Wellcome Trust Genome Campus in Hinxton, you will be only 15 miles or so from Cambridge and MSR Cambridge (which is now located in a new building next to the railway station). If you are at one of the Wellcome Trust places in London, Cambridge would be about an hour away by train. Either way, I would encourage you to get in touch with Don (or I can make an introduction if you prefer).

Most F# work for research happens in Cambridge. I believe a second team is based in the US for the commercial side (Visual Studio integration, etc) but I'm not sure.