#! /usr/bin/perl

use Test::More tests => 3;
use Test::Deep;

use Bio::BioStudio;
use Data::Dumper;

use strict;
use warnings;

my $BS = Bio::BioStudio->new();
$BS->genome_repository("t/test_repo");
$BS->db_engine('memory');

my $rchr = bless(
  {
      'chromosome_id'      => '01',
      'seq_id'             => 'chr01',
      'chromosome_version' => '00',
      'species'            => 'test',
      'gbrowse'            => 0,
      'genome_version'     => '0',
      'db_engine'          => 'memory',
      'provisional'        => -1,
      'mask'               => ignore(),
      'repo'               => 't/test_repo/',
      'tag'                => undef,
      '_root_verbose'      => 0,
      'GD'                 => ignore(),
  },
  'Bio::BioStudio::Chromosome'
);
my $tchr = $BS->set_chromosome(-chromosome => 'test_chr01_0_00');
cmp_deeply($tchr, $rchr, "Set_chromosome");

my $ritchr = bless(
  {
      'chromosome_id'      => '01',
      'seq_id'             => 'chr01',
      'chromosome_version' => '01',
      'species'            => 'test',
      'gbrowse'            => 0,
      'genome_version'     => '1',
      'db_engine'          => 'memory',
      'provisional'        => 1,
      'mask'               => ignore(),
      'repo'               => 't/test_repo/',
      'tag'                => undef,
      '_root_verbose'      => 0,
      'GD'                 => ignore(),
      'database'           => bless(
          {
              'fasta_file' => ignore(),
              '_index' => {
                  'attribute' => {
                      'essential_status' => {
                          'essential' => {
                              '4' => undef
                          },
                          'nonessential' => {
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      },
                      'gene' => {
                          'cdc24' => {
                              '4' => undef
                          },
                          'gcv3' => {
                              '5' => undef
                          },
                          'rbg1' => {
                              '1' => undef
                          }
                      },
                      'load_id' => {
                          'yal036c' => {
                              '1' => undef
                          },
                          'yar028w' => {
                              '3' => undef
                          },
                          'yal044w-a' => {
                              '2' => undef
                          },
                          'yal044c' => {
                              '5' => undef
                          },
                          'yal041w' => {
                              '4' => undef
                          }
                      },
                      'dbxref' => {
                          'sgd:s000000034' => {
                              '1' => undef
                          },
                          'sgd:s000007586' => {
                              '2' => undef
                          },
                          'sgd:s000000039' => {
                              '4' => undef
                          },
                          'sgd:s000000042' => {
                              '5' => undef
                          },
                          'sgd:s000000076' => {
                              '3' => undef
                          }
                      },
                      'note' => {
      '10-methylene-thf; expression is regulated by levels of levels of 5'
                            => {
                              '5' => undef
                            },
                          ' putative dna repair protein' => {
                              '2' => undef
                          },
      'h subunit of the mitochondrial glycine decarboxylase complex'
                            => {
                              '5' => undef
                            },
      ' and mutants have morphological defects in bud formation and shmooing'
                            => {
                              '4' => undef
                            },
                          ' required for the catabolism of glycine to 5' => {
                              '5' => undef
                          },
      'member of the drg family of gtp-binding proteins; interacts with translating ribosomes and with tma46p'
                            => {
                              '1' => undef
                            },
                          'putative integral membrane protein' => {
                              '3' => undef
                          },
                          'similar to pombe uvi31' => {
                              '2' => undef
                          },
                          ' member of dup240 gene family' => {
                              '3' => undef
                          },
      'guanine nucleotide exchange factor (gef or gdp-release factor) for cdc42p; required for polarity establishment and maintenance'
                            => {
                              '4' => undef
                            },
                          '10-methylene-thf in the cytoplasm' => {
                              '5' => undef
                          }
                      },
                      'orf_classification' => {
                          'uncharacterized' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'verified' => {
                              '4' => undef,
                              '1' => undef,
                              '5' => undef
                          }
                      },
                      'ontology_term' => {
                          'go:0006546' => {
                              '5' => undef
                          },
                          'go:0001403' => {
                              '4' => undef
                          },
                          'go:0030468' => {
                              '4' => undef
                          },
                          'go:0000723' => {
                              '5' => undef
                          },
                          'go:0004375' => {
                              '5' => undef
                          },
                          'go:0007119' => {
                              '4' => undef
                          },
                          'go:0000004' => {
                              '1' => undef,
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0007264' => {
                              '4' => undef
                          },
                          'go:0005739' => {
                              '5' => undef
                          },
                          'go:0005960' => {
                              '5' => undef
                          },
                          'go:0005634' => {
                              '4' => undef
                          },
                          'go:0005737' => {
                              '1' => undef
                          },
                          'go:0008372' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0043332' => {
                              '4' => undef
                          },
                          'go:0007124' => {
                              '4' => undef
                          },
                          'go:0005525' => {
                              '1' => undef
                          },
                          'go:0000131' => {
                              '4' => undef
                          },
                          'go:0006033' => {
                              '4' => undef
                          },
                          'go:0006730' => {
                              '5' => undef
                          },
                          'go:0000750' => {
                              '4' => undef
                          },
                          'go:0004871' => {
                              '4' => undef
                          },
                          'go:0005089' => {
                              '4' => undef
                          },
                          'go:0005554' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0007096' => {
                              '4' => undef
                          },
                          'go:0000753' => {
                              '4' => undef
                          },
                          'go:0007118' => {
                              '4' => undef
                          },
                          'go:0005935' => {
                              '4' => undef
                          }
                      },
                      'alias' => {
                          'cdc24' => {
                              '4' => undef
                          },
                          'gcv3' => {
                              '5' => undef
                          },
                          'cls4' => {
                              '4' => undef
                          },
                          'fun11' => {
                              '1' => undef
                          },
                          'rbg1' => {
                              '1' => undef
                          }
                      }
                  },
                  'location' => {
                      'chr01' => {
                          '0' => {
                              '4' => undef,
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      }
                  },
                  'ids' => {
                      '4' => undef,
                      '1' => undef,
                      '3' => undef,
                      '2' => undef,
                      '5' => undef
                  },
                  'name' => {
                      'yal036c' => {
                          '1' => 1
                      },
                      'cdc24' => {
                          '4' => 2
                      },
                      'gcv3' => {
                          '5' => 2
                      },
                      'yal044w-a' => {
                          '2' => 1
                      },
                      'rbg1' => {
                          '1' => 2
                      },
                      'yar028w' => {
                          '3' => 1
                      },
                      'cls4' => {
                          '4' => 2
                      },
                      'fun11' => {
                          '1' => 2
                      },
                      'yal044c' => {
                          '5' => 1
                      },
                      'yal041w' => {
                          '4' => 1
                      }
                  },
                  'type' => {
                      'gene' => {
                          'sgd' => {
                              '4' => undef,
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      }
                  }
              },
              '_data' => {
                  '4' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 4,
                          'store'       => ignore(),,
                          'stop'        => 6463,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL041W',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Essential' ],
                              'load_id'          => [ 'YAL041W' ],
                              'gene'             => [ 'CDC24' ],
                              'Note'             => [
      'Guanine nucleotide exchange factor (GEF or GDP-release factor) for Cdc42p; required for polarity establishment and maintenance',
      ' and mutants have morphological defects in bud formation and shmooing'
                              ],
                              'dbxref'             => [ 'SGD:S000000039' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'CDC24', 'CLS4' ],
                              'Ontology_term'      => [
                                  'GO:0043332', 'GO:0030468',
                                  'GO:0000753', 'GO:0000750',
                                  'GO:0007264', 'GO:0007124',
                                  'GO:0007119', 'GO:0007118',
                                  'GO:0007096', 'GO:0006033',
                                  'GO:0005935', 'GO:0005634',
                                  'GO:0005089', 'GO:0004871',
                                  'GO:0001403', 'GO:0000131'
                              ]
                          },
                          'start' => 3899
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '1' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 1,
                          'store'       => ignore(),,
                          'stop'        => 1360,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL036C',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => -1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Nonessential' ],
                              'load_id'          => [ 'YAL036C' ],
                              'gene'             => [ 'RBG1' ],
                              'Note'             => [
      'Member of the DRG family of GTP-binding proteins; interacts with translating ribosomes and with Tma46p'
                              ],
                              'dbxref'             => [ 'SGD:S000000034' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'RBG1', 'FUN11' ],
                              'Ontology_term' =>
                                [ 'GO:0005737', 'GO:0005525', 'GO:0000004' ]
                          },
                          'start' => 251
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '3' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 3,
                          'store'       => ignore(),,
                          'stop'        => 3398,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAR028W',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'orf_classification' => [ 'Uncharacterized' ],
                              'essential_status'   => [ 'Nonessential' ],
                              'load_id'            => [ 'YAR028W' ],
                              'Ontology_term' =>
                                [ 'GO:0008372', 'GO:0005554', 'GO:0000004' ],
                              'Note' => [
                                  'Putative integral membrane protein',
                                  ' member of DUP240 gene family'
                              ],
                              'dbxref' => [ 'SGD:S000000076' ]
                          },
                          'start' => 2694
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '2' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 2,
                          'store'       => ignore(),,
                          'stop'        => 2193,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL044W-A',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'orf_classification' => [ 'Uncharacterized' ],
                              'essential_status'   => [ 'Nonessential' ],
                              'load_id'            => [ 'YAL044W-A' ],
                              'Ontology_term' =>
                                [ 'GO:0008372', 'GO:0005554', 'GO:0000004' ],
                              'Note' => [
                                  'Similar to pombe uvi31',
                                  ' putative DNA repair protein'
                              ],
                              'dbxref' => [ 'SGD:S000007586' ]
                          },
                          'start' => 1861
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '5' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 5,
                          'store'       => ignore(),,
                          'stop'        => 7476,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL044C',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => -1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Nonessential' ],
                              'load_id'          => [ 'YAL044C' ],
                              'gene'             => [ 'GCV3' ],
                              'Note'             => [
      'H subunit of the mitochondrial glycine decarboxylase complex',
                                  ' required for the catabolism of glycine to 5',
      '10-methylene-THF; expression is regulated by levels of levels of 5',
                                  '10-methylene-THF in the cytoplasm'
                              ],
                              'dbxref'             => [ 'SGD:S000000042' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'GCV3' ],
                              'Ontology_term'      => [
                                  'GO:0006730', 'GO:0006546',
                                  'GO:0005960', 'GO:0005739',
                                  'GO:0004375', 'GO:0000723'
                              ]
                          },
                          'start' => 6964
                      },
                      'Bio::DB::SeqFeature'
                  )
              },
              '_children' => {},
              'setting'   => {
                  'serializer'        => 'Storable',
                  'compress'          => undef,
                  'index_subfeatures' => 1
              },
              'fasta_fh'        => ignore(),
              'seqfeatureclass' => 'Bio::DB::SeqFeature',
              'fasta_db'        => ignore(),
          },
          'Bio::DB::SeqFeature::Store::memory'
      ),
  },
  'Bio::BioStudio::Chromosome'
);
my $titchr = $tchr->iterate(-genver => 1);
#print Dumper($titchr);
cmp_deeply($titchr, $ritchr, "iterate_genome_version");

$ritchr = bless(
  {
      'chromosome_id'      => '01',
      'seq_id'             => 'chr01',
      'chromosome_version' => '01',
      'species'            => 'test',
      'gbrowse'            => 0,
      'genome_version'     => '0',
      'db_engine'          => 'memory',
      'provisional'        => 1,
      'mask'               => ignore(),
      'repo'               => 't/test_repo/',
      'tag'                => undef,
      '_root_verbose'      => 0,
      'GD'                 => ignore(),
      'database'           => bless(
          {
              'fasta_file' => ignore(),
              '_index' => {
                  'attribute' => {
                      'essential_status' => {
                          'essential' => {
                              '4' => undef
                          },
                          'nonessential' => {
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      },
                      'gene' => {
                          'cdc24' => {
                              '4' => undef
                          },
                          'gcv3' => {
                              '5' => undef
                          },
                          'rbg1' => {
                              '1' => undef
                          }
                      },
                      'load_id' => {
                          'yal036c' => {
                              '1' => undef
                          },
                          'yar028w' => {
                              '3' => undef
                          },
                          'yal044w-a' => {
                              '2' => undef
                          },
                          'yal044c' => {
                              '5' => undef
                          },
                          'yal041w' => {
                              '4' => undef
                          }
                      },
                      'dbxref' => {
                          'sgd:s000000034' => {
                              '1' => undef
                          },
                          'sgd:s000007586' => {
                              '2' => undef
                          },
                          'sgd:s000000039' => {
                              '4' => undef
                          },
                          'sgd:s000000042' => {
                              '5' => undef
                          },
                          'sgd:s000000076' => {
                              '3' => undef
                          }
                      },
                      'note' => {
      '10-methylene-thf; expression is regulated by levels of levels of 5'
                            => {
                              '5' => undef
                            },
                          ' putative dna repair protein' => {
                              '2' => undef
                          },
      'h subunit of the mitochondrial glycine decarboxylase complex'
                            => {
                              '5' => undef
                            },
      ' and mutants have morphological defects in bud formation and shmooing'
                            => {
                              '4' => undef
                            },
                          ' required for the catabolism of glycine to 5' => {
                              '5' => undef
                          },
      'member of the drg family of gtp-binding proteins; interacts with translating ribosomes and with tma46p'
                            => {
                              '1' => undef
                            },
                          'putative integral membrane protein' => {
                              '3' => undef
                          },
                          'similar to pombe uvi31' => {
                              '2' => undef
                          },
                          ' member of dup240 gene family' => {
                              '3' => undef
                          },
      'guanine nucleotide exchange factor (gef or gdp-release factor) for cdc42p; required for polarity establishment and maintenance'
                            => {
                              '4' => undef
                            },
                          '10-methylene-thf in the cytoplasm' => {
                              '5' => undef
                          }
                      },
                      'orf_classification' => {
                          'uncharacterized' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'verified' => {
                              '4' => undef,
                              '1' => undef,
                              '5' => undef
                          }
                      },
                      'ontology_term' => {
                          'go:0006546' => {
                              '5' => undef
                          },
                          'go:0001403' => {
                              '4' => undef
                          },
                          'go:0030468' => {
                              '4' => undef
                          },
                          'go:0000723' => {
                              '5' => undef
                          },
                          'go:0004375' => {
                              '5' => undef
                          },
                          'go:0007119' => {
                              '4' => undef
                          },
                          'go:0000004' => {
                              '1' => undef,
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0007264' => {
                              '4' => undef
                          },
                          'go:0005739' => {
                              '5' => undef
                          },
                          'go:0005960' => {
                              '5' => undef
                          },
                          'go:0005634' => {
                              '4' => undef
                          },
                          'go:0005737' => {
                              '1' => undef
                          },
                          'go:0008372' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0043332' => {
                              '4' => undef
                          },
                          'go:0007124' => {
                              '4' => undef
                          },
                          'go:0005525' => {
                              '1' => undef
                          },
                          'go:0000131' => {
                              '4' => undef
                          },
                          'go:0006033' => {
                              '4' => undef
                          },
                          'go:0006730' => {
                              '5' => undef
                          },
                          'go:0000750' => {
                              '4' => undef
                          },
                          'go:0004871' => {
                              '4' => undef
                          },
                          'go:0005089' => {
                              '4' => undef
                          },
                          'go:0005554' => {
                              '3' => undef,
                              '2' => undef
                          },
                          'go:0007096' => {
                              '4' => undef
                          },
                          'go:0000753' => {
                              '4' => undef
                          },
                          'go:0007118' => {
                              '4' => undef
                          },
                          'go:0005935' => {
                              '4' => undef
                          }
                      },
                      'alias' => {
                          'cdc24' => {
                              '4' => undef
                          },
                          'gcv3' => {
                              '5' => undef
                          },
                          'cls4' => {
                              '4' => undef
                          },
                          'fun11' => {
                              '1' => undef
                          },
                          'rbg1' => {
                              '1' => undef
                          }
                      }
                  },
                  'location' => {
                      'chr01' => {
                          '0' => {
                              '4' => undef,
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      }
                  },
                  'ids' => {
                      '4' => undef,
                      '1' => undef,
                      '3' => undef,
                      '2' => undef,
                      '5' => undef
                  },
                  'name' => {
                      'yal036c' => {
                          '1' => 1
                      },
                      'cdc24' => {
                          '4' => 2
                      },
                      'gcv3' => {
                          '5' => 2
                      },
                      'yal044w-a' => {
                          '2' => 1
                      },
                      'rbg1' => {
                          '1' => 2
                      },
                      'yar028w' => {
                          '3' => 1
                      },
                      'cls4' => {
                          '4' => 2
                      },
                      'fun11' => {
                          '1' => 2
                      },
                      'yal044c' => {
                          '5' => 1
                      },
                      'yal041w' => {
                          '4' => 1
                      }
                  },
                  'type' => {
                      'gene' => {
                          'sgd' => {
                              '4' => undef,
                              '1' => undef,
                              '3' => undef,
                              '2' => undef,
                              '5' => undef
                          }
                      }
                  }
              },
              '_data' => {
                  '4' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 4,
                          'store'       => ignore(),,
                          'stop'        => 6463,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL041W',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Essential' ],
                              'load_id'          => [ 'YAL041W' ],
                              'gene'             => [ 'CDC24' ],
                              'Note'             => [
      'Guanine nucleotide exchange factor (GEF or GDP-release factor) for Cdc42p; required for polarity establishment and maintenance',
      ' and mutants have morphological defects in bud formation and shmooing'
                              ],
                              'dbxref'             => [ 'SGD:S000000039' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'CDC24', 'CLS4' ],
                              'Ontology_term'      => [
                                  'GO:0043332', 'GO:0030468',
                                  'GO:0000753', 'GO:0000750',
                                  'GO:0007264', 'GO:0007124',
                                  'GO:0007119', 'GO:0007118',
                                  'GO:0007096', 'GO:0006033',
                                  'GO:0005935', 'GO:0005634',
                                  'GO:0005089', 'GO:0004871',
                                  'GO:0001403', 'GO:0000131'
                              ]
                          },
                          'start' => 3899
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '1' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 1,
                          'store'       => ignore(),
                          'stop'        => 1360,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL036C',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => -1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Nonessential' ],
                              'load_id'          => [ 'YAL036C' ],
                              'gene'             => [ 'RBG1' ],
                              'Note'             => [
      'Member of the DRG family of GTP-binding proteins; interacts with translating ribosomes and with Tma46p'
                              ],
                              'dbxref'             => [ 'SGD:S000000034' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'RBG1', 'FUN11' ],
                              'Ontology_term' =>
                                [ 'GO:0005737', 'GO:0005525', 'GO:0000004' ]
                          },
                          'start' => 251
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '3' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 3,
                          'store'       => ignore(),,
                          'stop'        => 3398,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAR028W',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'orf_classification' => [ 'Uncharacterized' ],
                              'essential_status'   => [ 'Nonessential' ],
                              'load_id'            => [ 'YAR028W' ],
                              'Ontology_term' =>
                                [ 'GO:0008372', 'GO:0005554', 'GO:0000004' ],
                              'Note' => [
                                  'Putative integral membrane protein',
                                  ' member of DUP240 gene family'
                              ],
                              'dbxref' => [ 'SGD:S000000076' ]
                          },
                          'start' => 2694
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '2' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 2,
                          'store'       => ignore(),,
                          'stop'        => 2193,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL044W-A',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => 1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'orf_classification' => [ 'Uncharacterized' ],
                              'essential_status'   => [ 'Nonessential' ],
                              'load_id'            => [ 'YAL044W-A' ],
                              'Ontology_term' =>
                                [ 'GO:0008372', 'GO:0005554', 'GO:0000004' ],
                              'Note' => [
                                  'Similar to pombe uvi31',
                                  ' putative DNA repair protein'
                              ],
                              'dbxref' => [ 'SGD:S000007586' ]
                          },
                          'start' => 1861
                      },
                      'Bio::DB::SeqFeature'
                  ),
                  '5' => bless(
                      {
                          'source'      => 'SGD',
                          'primary_id'  => 5,
                          'store'       => ignore(),,
                          'stop'        => 7476,
                          'ref'         => 'chr01',
                          'is_circular' => 0,
                          'name'        => 'YAL044C',
                          'score'       => undef,
                          'phase'       => undef,
                          'strand'      => -1,
                          'type'        => 'gene',
                          'attributes'  => {
                              'essential_status' => [ 'Nonessential' ],
                              'load_id'          => [ 'YAL044C' ],
                              'gene'             => [ 'GCV3' ],
                              'Note'             => [
      'H subunit of the mitochondrial glycine decarboxylase complex',
                                  ' required for the catabolism of glycine to 5',
      '10-methylene-THF; expression is regulated by levels of levels of 5',
                                  '10-methylene-THF in the cytoplasm'
                              ],
                              'dbxref'             => [ 'SGD:S000000042' ],
                              'orf_classification' => [ 'Verified' ],
                              'Alias'              => [ 'GCV3' ],
                              'Ontology_term'      => [
                                  'GO:0006730', 'GO:0006546',
                                  'GO:0005960', 'GO:0005739',
                                  'GO:0004375', 'GO:0000723'
                              ]
                          },
                          'start' => 6964
                      },
                      'Bio::DB::SeqFeature'
                  )
              },
              '_children' => {},
              'setting'   => {
                  'serializer'        => 'Storable',
                  'compress'          => undef,
                  'index_subfeatures' => 1
              },
              'fasta_fh'        => ignore(),
              'seqfeatureclass' => 'Bio::DB::SeqFeature',
              'fasta_db'        => ignore()
          },
          'Bio::DB::SeqFeature::Store::memory'
      ),
      
  },
  'Bio::BioStudio::Chromosome'
);
$titchr = $tchr->iterate(-chrver => 1);
cmp_deeply($titchr, $ritchr, "iterate_chromosome_version");
