This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# Author:: Nelo Onyiah (mailto:io1@sanger.ac.uk) | |
# | |
# This is an example script demonstrating how you can | |
# interact with the I-DCC Targeting Repository via its | |
# web services interface. | |
# | |
# In this Perl example we use the REST::Client module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# Author:: Sébastien Briois (sebriois@gmail.com) | |
require "rubygems" | |
require "rest_client" | |
require "json" | |
IDCC_SITE = "http://user:pass@localhost:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Author:: Nelo Onyiah (mailto:io1@sanger.ac.uk) | |
use JSON; | |
use REST::Client; | |
my $domain = 'localhost:3000'; | |
my $user = 'user'; | |
my $pass = 'pass'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Author:: Nelo Onyiah (mailto:io1@sanger.ac.uk) | |
use JSON; | |
use REST::Client; | |
my $domain = 'localhost:3000'; | |
my $user = 'user'; | |
my $pass = 'pass'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Author:: Nelo Onyiah (mailto:io1@sanger.ac.uk) | |
# | |
# In this example we are going to update all the alleles | |
# for the KOMP-Regeneron pipeline. We are updating the | |
# "allele_symbol_superscript" for each Es Cell we find | |
# that needs updating. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# Helper functions for interacting with the IKMC Targeting Repository | |
# | |
# Authors:: Darren Oakley (mailto:do2@sanger.ac.uk) | |
# Nelo Onyiah (mailto:io1@sanger.ac.uk) | |
# | |
use strict; | |
use warnings FATAL => 'all'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package HTGT::REST; | |
use Moose; | |
use Moose::Util::TypeConstraints; | |
use JSON; | |
use Readonly; | |
use REST::Client; | |
use URI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Modern::Perl; | |
use Test::Most; | |
{ | |
package Some::Role; | |
use Moose::Role; | |
use MooseX::Types::Moose qw( Str ); | |
has attribute => ( is => 'ro', isa => Str, default => 'default' ); | |
no Moose::Role; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "RMagick" | |
# | |
# draw the sequence in the background | |
def draw_sequence( image ) | |
sequence = Magick::Draw.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "RMagick" | |
# | |
# draw an arrow at the point | |
# | |
def draw_arrow( image, point, direction="south" ) | |
arrow = Magick::Draw.new | |
# make the value of "point" the center (origin) |