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