Saturday, June 23, 2007

Mapping Agilent Microarray ID to Affymetrix GeneChip using ActiveRecord

First, I make ActiveRecord model script (ensembl.rb) for Agilentprobe
table in EnsemblMart.

#!/usr/bin/env ruby

require 'rubygems'
require_gem 'activerecord'

ActiveRecord::Base.pluralize_table_names = false

:adapter => 'mysql',
:database => 'ensembl_mart_40',
:host => '',
:username => 'anonymous',
:password => ''

class Agilentprobe <>

Next, I make ID translation program (
affyprobe2moe4302.rb) using above script.

#!/usr/bin/env ruby

require 'ensembl'
agilentid = 'A_52_P654624'
agilentprobe = Agilentprobe.find_by_dbprimary_id('A_52_P654624')
moe4302 = Moe4302.find_all_by_gene_id_key(agilentprobe.gene_id_key)
moe4302.each do |entry|
puts [aglentid,
entry.gene_stable_id, entry.transcript_stable_id, entry.translation_stable_id,
Let's run it!

$ ruby affyprobe2moe4302.rb
A_52_P654624    ENSMUSG00000058140      ENSMUST00000081249      ENSMUSP00000080006      1429452_x_at
A_52_P654624 ENSMUSG00000058140 ENSMUST00000081249 ENSMUSP00000080006 1435353_a_at
A_52_P654624 ENSMUSG00000058140 ENSMUST00000071829 ENSMUSP00000071732 1429452_x_at

1 comment:

muvphxl9w2 said...

These ‘high rollers’ in Malaysia are best suited to taking part in} at any one of the following casino manufacturers. French roulette and European roulette are practically the identical sport. Sometimes French roulette identified as} 바카라 European roulette and vice versa. Crucially, roulette reached Louisiana earlier than the craze for the removing of the ’00’. This means that American roulette wheels still have the ‘0’ and ’00’ even 200 years later. Restricted games – Some games could contribute less than one hundred pc in the direction of|in path of} wagering, and some could not count at all.