1 package CXGN
::Genotype
::ParseUpload
;
6 use Moose
::Util
::TypeConstraints
;
8 with
'MooseX::Object::Pluggable';
11 has
'chado_schema' => (
13 isa
=> 'DBIx::Class::Schema',
23 has
'filename_intertek_marker_info' => (
28 has
'nd_protocol_id' => (
33 has
'observation_unit_type_name' => ( #Can be accession, plot, plant, tissue_sample
39 has
'organism_id' => (
45 has
'create_missing_observation_units_as_accessions' => (
51 has
'igd_numbers_included' => (
57 has
'parse_errors' => (
60 writer
=> '_set_parse_errors',
61 reader
=> 'get_parse_errors',
62 predicate
=> 'has_parse_errors',
65 has
'_parsed_data' => (
68 writer
=> '_set_parsed_data',
69 predicate
=> '_has_parsed_data',
75 if (!$self->_validate_with_plugin()) {
76 my $errors = $self->get_parse_errors();
77 #print STDERR "\nCould not validate genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
81 if (!$self->_parse_with_plugin()) {
82 my $errors = $self->get_parse_errors();
83 #print STDERR "\nCould not parse genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
87 if (!$self->_has_parsed_data()) {
88 my $errors = $self->get_parse_errors();
89 #print STDERR "\nNo parsed data for genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
92 return $self->_parsed_data();
95 my $errors = $self->get_parse_errors();
96 #print STDERR "\nError parsing genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
100 sub parse_with_iterator
{
103 if (!$self->_validate_with_plugin()) {
104 my $errors = $self->get_parse_errors();
105 #print STDERR "\nCould not validate genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
109 if (!$self->_parse_with_plugin()) {
110 my $errors = $self->get_parse_errors();
111 #print STDERR "\nCould not parse genotypes file: ".$self->get_filename()."\nError:".Dumper($errors)."\n";
119 return $self->next_genotype();