Sha256: 1120813209bf44bec6fd5f73e7fe8afba6f50e92f08f9cdac7d3f7685de7971d

Contents?: true

Size: 606 Bytes

Versions: 39

Compression:

Stored size: 606 Bytes

Contents

module ArrayExpress

  def self.tpm(code, organism = Organism.default_code("Hsa"))
    url = "https://www.ebi.ac.uk/gxa/experiments-content/#{code}/resources/ExperimentDownloadSupplier.RnaSeqBaseline/tpms.tsv"
    io = TSV.traverse Open.open(url), :type => :line, :into => :stream do |line|
      next if line =~ /^#/
      parts = line.split("\t")
      line = parts[0] << "\t" << parts[2..-1] * "\t"
      line = "#" + line if line =~ /Gene ID/
      line
    end
    tsv = TSV.open(io, :type => :list, :cast => :to_f)
    tsv.key_field = "Ensembl Gene ID"
    tsv.namespace = organism
    tsv
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
rbbt-sources-3.4.2 lib/rbbt/sources/array_express.rb
rbbt-sources-3.4.1 lib/rbbt/sources/array_express.rb
rbbt-sources-3.3.0 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.16 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.15 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.14 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.13 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.12 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.11 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.10 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.9 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.8 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.6 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.4 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.3 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.2 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.1 lib/rbbt/sources/array_express.rb
rbbt-sources-3.2.0 lib/rbbt/sources/array_express.rb
rbbt-sources-3.1.52 lib/rbbt/sources/array_express.rb
rbbt-sources-3.1.51 lib/rbbt/sources/array_express.rb