lib/cheripic/contig.rb in cheripic-1.2.0 vs lib/cheripic/contig.rb in cheripic-1.2.5
- old
+ new
@@ -20,20 +20,22 @@
# @return [String] id of the contig in assembly taken from fasta file
# @!attribute [r] length
# @return [Integer] length of contig in bases
class Contig
- attr_accessor :hm_pos, :ht_pos, :hemi_pos
+ attr_accessor :hm_pos, :ht_pos, :hemi_pos, :mean_depth, :sd_depth
attr_reader :id, :length
# creates a Contig object using fasta entry
# @param fasta [Bio::FastaFormat] an individual fasta entry from input assembly file
def initialize (fasta)
@id = fasta.entry_id
@length = fasta.length
@hm_pos = {}
@ht_pos = {}
@hemi_pos = {}
+ @mean_depth = nil
+ @sd_depth = nil
end
# Number of homozygous variants identified in the contig
# @return [Integer]
def hm_num