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
sudo launchctl stop com.parallels.desktop.launchdaemon | |
sudo launchctl start com.parallels.desktop.launchdaemon |
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
it "should query all matched rule" do | |
eng = Bio::KB::Engine.new.configure do |s| | |
s.rule :mirna_mi, /MI\d{1,7}/, "Bio::KB::Mirbase::Mirna", "find_by_mirna_acc" | |
s.rule :mirna_mimat, /MIMAT\d{1,7}/ , "Bio::KB::Mirbase::MirnaMature", "find_by_mature_acc" | |
s.rule :mirna, /(.*)\-(mi(r|R)|let)\-(.*)/, ["Bio::KB::Mirbase::Mirna","Bio::KB::Mirbase::MirnaMature"], ["find_by_mirna_id", "find_by_mature_name"] | |
s.rule :ensembl_gene, /.*/, "::Ensembl::Core::Gene", ["find_by_name","find_by_stable_id"] do | |
Ensembl::Core::DBConnection.connect('homo_sapiens',61) | |
end | |
s.rule :tf, /ENSG.*/, "Bio::KB::Tags::Target", "find_by_rid" |
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
rake build # Build gem into pkg/ | |
rake clobber_rcov # Remove rcov products for rcov | |
rake clobber_rdoc # Remove rdoc products | |
rake console[script] # Start IRB with all runtime dependencies loaded | |
rake db:create # Create the database from config/database.yml for the current default (use db:create:all to create all dbs in the config) | |
rake db:drop # Drops the database for the current default (use db:drop:all to drop all databases) | |
rake db:fixtures:load # Load fixtures into the current environment's database. | |
rake db:migrate # Migrate the database (options: VERSION=x, VERBOSE=false). | |
rake db:migrate:status # Display status of migrations | |
rake db:rollback # Rolls the schema back to the previous version (specify steps w/ STEP=n). |
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
# @abstract Merge multiple sorted BAM. | |
# @param is_by_qname whether to sort by query name | |
# @param out output BAM file name | |
# @param headers name of SAM file from which to copy '@' header lines, | |
# or NULL to copy them from the first file to be merged | |
# @param n number of files to be merged | |
# @param fn names of files to be merged | |
# | |
# @discussion Padding information may NOT correctly maintained. This | |
# function is NOT thread safe. |
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
desc "tophat DIST INDEX OUTPUTDIR FASTQS", "run tophat as from command line, default 6 processors and then create a sorted bam indexed." | |
method_option :paired, :type => :boolean, :default => false, :desc => 'Are reads paired? If you chose this option pass just the basename of the file without forward/reverse and .fastq' | |
Bio::Ngs::Tophat.new.thor_task(self, :tophat) do |wrapper, task, dist, index, outputdir, fastqs| | |
wrapper.params = task.options #merge passed options to the wrapper. | |
wrapper.params = {"mate-inner-dist"=>dist, "output-dir"=>outputdir, "num-threads"=>6, "solexa1.3-quals"=>true} | |
fastq_files = task.options[:paired] ? ["#{fastqs}_forward.fastq","#{fastqs}_reverse.fastq"] : ["#{fastqs}"] | |
wrapper.run :arguments=>[index, fastq_files ].flatten, :separator=>"=" | |
accepted_hits_bam_fn = File.join(outputdir, "accepted_hit.bam") |
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
Dear All, | |
our project, is looking for students to participate at GSoC 2011, thanks to OBF and NESCENT | |
Please feel free to forward this message to your university-ml, lab or local ruby group. | |
Use our ml to discuss ideas and feel free to contact the mentors or any other member for the development team. | |
March 18-27: Would-be student participants discuss application ideas with mentoring organizations. | |
March 28: Student application period opens. | |
April 8 19:00 UTC Student application deadline. |
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 'yaml' | |
stats=YAML::load_stream(File.open("CD4_Th1_forward.stats")) | |
ary_stats=stats.documents | |
sum=0 | |
ary_stats.each do |record| | |
sum += record[:stats] [: reads_total] | |
end | |
#in sum troverai il risultato | |
#---------- |
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 |
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
# Recode a vector based on a block | |
class Pippo | |
def recode!(vector_name) | |
0.upto(@cases-1) {|i| | |
@vectors[vector_name].data[i]=yield case_as_hash(i) | |
} | |
@vectors[vector_name].set_valid_data | |
end | |
end |
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
irb(main):134:0> myGenSemWeb.fisrt | |
=> [<RDFS::Resource:0xb74abcb4 @predicates={}, @uri="http://bio2rdf.org/geneid:578147">, <RDFS::Resource:0xb74abc50 @predicates={}, @uri="http://www.w3.org/2000/01/rdf-schema#label">, "similar to TP53 regulating kinase (p53-related protein kinase) (Nori-2)[geneid:578147]"] | |