class PerTranscriptCoverage < ActiveRecord::Base
  belongs_to :read_group, :inverse_of => :per_transcript_coverages
  belongs_to :bedgraph_file, :inverse_of => :per_transcript_coverages, :dependent => :destroy
  validates_presence_of :read_group
  validates_presence_of :bedgraph_file
end

class PerTranscriptCoverage < ActiveRecord::Base
  belongs_to :read_group, :inverse_of => :per_transcript_coverages
  belongs_to :bedgraph_file, :inverse_of => :per_transcript_coverages
  validates_presence_of :read_group
  validates_presence_of :bedgraph_file
end

Fix bug which prevented deleting read group
Fix bug which prevented deleting read group

The bug was caused by extra ':dependent => :destroy' in
PerTranscriptCoverage model:

belongs_to :bedgraph_file, :inverse_of => :per_transcript_coverages, :dependent => :destroy

Deleting read group caused deleting per_transcript_coverages, which
caused deleting bedgraph_file. This is incorrect, bc this
bedgraph_file could be associated with other existing read groups via
per_transcript_coverages.

Thanks to Brad for help with this and prev bugs that I introduced in
the last round of changes.
