Class: Sample::Metadata
- Inherits:
-
Object
- Object
- Sample::Metadata
- Defined in:
- app/models/sample.rb
Overview
Reopens the Sample::Metadata class which was defined by has_metadata above Sample::Metadata tracks sample information, either for use in the lab, or passing to the EBI
Instance Method Summary collapse
-
#release ⇒ Object
Rarely actually used.
-
#released? ⇒ Boolean
This is misleading, as samples are rarely released through Sequencescape, so our flag gets out of sync with the ENA/EGA.
- #sex ⇒ Object
- #species ⇒ Object
-
#strain_or_line ⇒ Object
here we are aliasing ArrayExpress attribute from normal one This is easier that way so the name is exactly the name of the array-express field and the values can be easily remapped The other solution would be to have a different label for the accession file and the xml/edit page.
Instance Method Details
#release ⇒ Object
Rarely actually used
264 265 266 267 |
# File 'app/models/sample.rb', line 264 def release self.sample_sra_hold = 'Public' save! end |
#released? ⇒ Boolean
This is misleading, as samples are rarely released through Sequencescape, so our flag gets out of sync with the ENA/EGA
259 260 261 |
# File 'app/models/sample.rb', line 259 def released? sample_sra_hold == 'Public' end |
#sex ⇒ Object
244 245 246 |
# File 'app/models/sample.rb', line 244 def sex gender&.downcase end |
#species ⇒ Object
248 249 250 |
# File 'app/models/sample.rb', line 248 def species sample_common_name end |
#strain_or_line ⇒ Object
here we are aliasing ArrayExpress attribute from normal one This is easier that way so the name is exactly the name of the array-express field and the values can be easily remapped The other solution would be to have a different label for the accession file and the xml/edit page
240 241 242 |
# File 'app/models/sample.rb', line 240 def strain_or_line sample_strain_att end |