Created
January 31, 2011 16:35
-
-
Save rjpbonnal/804318 to your computer and use it in GitHub Desktop.
Recover stats from genes list using targetscan filtered by miRNA 125b
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
def gene_list(genes_str) | |
genes_str.split("\n").select{|gene| !(gene.empty? || gene.match(/LOC/))} | |
end | |
def targetted_genes(genes_ary) | |
Bio::Kb::Targetscan::Prediction.where(['gene_symbol IN (?) and species = 9606', genes_ary]).select("distinct gene_symbol").count | |
end | |
def targetted_125b(genes_ary) | |
Bio::Kb::Targetscan::Prediction.search(genes_ary,'hsa-miR-125b').count | |
end | |
def show_time(genes_str) | |
genes = gene_list(genes_str) | |
{:targetscan_all=>targetted_genes(genes), :targetscan_125b=>targetted_125b(genes)} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment