Matt's Notepad

Willetts’s Speech on Open Access: Analysis

A great analysis and summary of the highlights of David Willetts’s recent speech on open access by Stephen Curry:

Text and data mining of the literature — which require unfettered access to the literature and the underlying data to be maximally valuable — are also considered and are clearly part of future plans. Willetts’ comments here are telling:

“I know that publishers share an appreciation of the potential of these technologies, and that some of you are supporting developers in creating new applications. We are considering how to advance UK capability in data mining in the light of the recommendations from Hargreaves, and I would like to thank the publishers who have engaged with this process. The Government wants to see an environment which enables researchers to use datasets from a number of different publishers without undue costs or obstacles – and without undermining research publishing.

Is there a subtle message here that only some publishers have realised the significance of permitting researchers access to text and data mining? I think there might be.

The transcript of the speech itself is also available.

    • #open access
    • #publishing
    • #ukpolitics
    • #text-mining
  • 1 week ago
  • Permalink
  • Share
    Tweet

1st International Workshop on Mining Scientific Publications

Interesting conference.

The recent development in natural language processing, information retrieval and the semantic web make it possible to transform the way we work with scientific publications.

  • 1 month ago
  • Permalink
  • Share
    Tweet

Facebook iOS SDK Singleton

Last year, Barry Murphy shared a great Objective-C category that extends the Facebook iOS SDK class to make it a singleton object that can be easily accessed from anywhere within your app without polluting your AppDelegate.

Recent changes to the Facebook iOS SDK mean that a lot of the methods needed renaming, and I wanted to use it in a project with automatic reference counting (ARC), which required a few changes to the singleton init method.

Here’s what I came up with:

Facebook+Singleton.h

#import "FBConnect.h"
#define kFBAccessTokenKey  @"FBAccessTokenKey"
#define kFBExpirationDateKey  @"FBExpirationDateKey"

@interface Facebook (Singleton) <FBSessionDelegate>
- (void)authorize;
+ (Facebook *)shared;
@end

Facebook+Singleton.m

#import "Facebook+Singleton.h"

@implementation Facebook (Singleton)

- (id)init {
    if ((self = [self initWithAppId:@"<APP-ID-HERE>" andDelegate:self])) {
        [self authorize];
    }
    return self;
}

- (void)authorize {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    if ([defaults objectForKey:kFBAccessTokenKey] && [defaults objectForKey:kFBExpirationDateKey]) {
        self.accessToken = [defaults objectForKey:kFBAccessTokenKey];
        self.expirationDate = [defaults objectForKey:kFBExpirationDateKey];
    }

    if (![self isSessionValid]) {
        NSArray *permissions =  [NSArray arrayWithObjects:@"email", @"user_about_me", nil];
        [self authorize:permissions];
    }
}

- (void)fbDidLogin {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:[self accessToken] forKey:kFBAccessTokenKey];
    [defaults setObject:[self expirationDate] forKey:kFBExpirationDateKey];
    [defaults synchronize];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"FBDidLogin" object:self];
}

- (void)fbDidNotLogin:(BOOL)cancelled {
    if (cancelled) {
        [[NSNotificationCenter defaultCenter] postNotificationName:@"FBLoginCancelled" object:self];
    } else {
        [[NSNotificationCenter defaultCenter] postNotificationName:@"FBLoginFailed" object:self];
    }
    [[NSNotificationCenter defaultCenter] postNotificationName:@"FBDidNotLogin" object:self];
}

- (void)fbDidLogout {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults removeObjectForKey:kFBAccessTokenKey];
    [defaults removeObjectForKey:kFBExpirationDateKey];
    [defaults synchronize];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"FBDidLogout" object:self];
}

static Facebook *shared = nil;

+ (Facebook *)shared {
    @synchronized(self) {
        if(shared == nil)
            shared = [[self alloc] init];
    }
    return shared;
}

Read more at Barry’s post on how to use this and the rationale behind this approach.

    • #ios
    • #xcode
    • #objective-c
    • #facebook
    • #iphone
  • 1 month ago
  • 3
  • Permalink
  • Share
    Tweet

Chemistry Safari Extensions

Just updated the chemistry Safari extensions I’ve made so they are compatible with the upcoming Safari 5.2.

They allow you to select any chemical name within a web page, then choose to resolve the structure using ChEMBL, OPSIN or ChemSpider.

Read more and download

    • #chemspider
    • #opsin
    • #chembl
    • #safari
    • #extensions
    • #browser
  • 1 month ago
  • Permalink
  • Share
    Tweet

Readmill Playpen

This is what all API documentation should be like.

    • #api
    • #documentation
    • #web services
  • 1 month ago
  • Permalink
  • Share
    Tweet

Science Markup

Promising start for microdata for science.

    • #semantics
    • #microdata
    • #cheminformatics
  • 1 month ago
  • Permalink
  • Share
    Tweet

The great promise of navigating the internet using InChIs

Presentation by Antony Williams. See also a poster on the accuracy of chemical structures found on the internet.

    • #cheminformatics
    • #chemspider
    • #inchi
  • 1 month ago
  • Permalink
  • Share
    Tweet

How Apple.com serves retina images to new iPads

Interesting, but seems to be a bit inefficient.

    • #apple
    • #ipad
    • #retina
    • #javascript
    • #webdev
  • 1 month ago
  • Permalink
  • Share
    Tweet

Scripting the Chemical Identifier Resolver

Integrating CIR with ChemBioDraw using AppleScript. Useful for any Mac app that allows you to paste in a chemical identifier of some sort.

    • #cir
    • #cheminformatics
    • #chemspider
    • #opsin
  • 1 month ago
  • Permalink
  • Share
    Tweet

CIRpy - A Python interface for the Chemical Identifier Resolver (CIR)

In the past I have used the ChemSpider API (through ChemSpiPy) to resolve chemical names to structures. Unfortunately this doesn’t work that well for IUPAC names and I found myself wondering whether it was worth setting up a system that would try a number of different resolvers. More specifically, I wanted a system that would first try using OPSIN to match IUPAC names, and if that failed, try a ChemSpider lookup. Just as I was about to start doing this myself, I came across the Chemical Identifier Resolver (CIR) that does exactly that (and much more).

CIR is a web service created by by the CADD Group at the NCI that performs various chemical name to structure conversions. In short, it will (attempt to) resolve the structure of any chemical identifier that you throw at it. Under the hood it uses a combination of OPSIN, ChemSpider and CIR’s own database.

To simplify interacting with CIR through Python, I wrote a simple wrapper called CIRpy that handles constructing url requests and parsing XML responses. It’s available on github here.

Using it is a simple case of copying cirpy.py into a directory on your python path. Here’s an example using the resolve function:

import cirpy

smiles_string = cirpy.resolve('Aspirin','smiles')

There are full details of all available options in the readme.

    • #cir
    • #cheminformatics
    • #chemspider
    • #opsin
  • 1 month ago
  • Permalink
  • Share
    Tweet
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.