Module: Sample

Extended by:
Entity
Defined in:
lib/rbbt/entity/study/samples.rb,
lib/rbbt/entity/study/cnv/samples.rb,
lib/rbbt/entity/study/genotypes/samples.rb,
lib/rbbt/entity/study/methylation/samples.rb

Instance Method Summary collapse

Instance Method Details

#dirObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/rbbt/entity/study/samples.rb', line 11

def dir
  return nil if study.nil?
  return study.dir if study.respond_to? :dir
  begin
    Study.setup(study).dir
  rescue
    Log.warn "Error accessing sample dir from study: #{$!.message}"
    nil
  end
end

#organismObject



22
23
24
25
# File 'lib/rbbt/entity/study/samples.rb', line 22

def organism
  return nil if study.nil?
  study.organism
end

#studyObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/rbbt/entity/study/samples.rb', line 27

def study
  @study ||= begin
               study = info[:study] 
               if study.nil?
                 study = Study.identify_study(self)
                 self.study = study
               end
               study
             end
end