Skip to content

Commit

Permalink
added accession method to get accession id for each object
Browse files Browse the repository at this point in the history
  • Loading branch information
inutano committed Jan 7, 2015
1 parent b51f921 commit 162b0ad
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions sra_metadata_parser.rb
Expand Up @@ -13,6 +13,10 @@ def initialize(id, xml)
def alias
@submission.attr("alias").to_s
end

def accession
@submission.attr("accession").to_s
end

def submission_comment
@submission.attr("submission_comment").to_s
Expand Down Expand Up @@ -52,6 +56,10 @@ def alias
@study.attr("alias").to_s
end

def accession
@study.attr("accession").to_s
end

def center_name
@study.attr("center_name").to_s
end
Expand Down Expand Up @@ -123,6 +131,10 @@ def alias
@exp.attr("alias").to_s
end

def accession
@exp.attr("accession").to_s
end

def center_name
@exp.attr("center_name").to_s
end
Expand Down Expand Up @@ -312,6 +324,10 @@ def initialize(id, xml)
def alias
@sample.attr("alias").to_s
end

def accession
@sample.attr("accession").to_s
end

def title
@sample.css("TITLE").inner_text
Expand Down Expand Up @@ -392,6 +408,10 @@ def initialize(id, xml)
def alias
@run.attr("alias").to_s
end

def accession
@run.attr("accession").to_s
end

def center_name
@run.attr("center_name").to_s
Expand Down

0 comments on commit 162b0ad

Please sign in to comment.