From e82bc564d96e699e5ab535c18f45190916821e3f Mon Sep 17 00:00:00 2001 From: andrewjpage Date: Tue, 31 Jul 2012 12:05:48 +0100 Subject: [PATCH] novel combination marked as new st --- modules/MLST/Spreadsheet/Row.pm | 2 +- t/Output/SpreadsheetRow.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/MLST/Spreadsheet/Row.pm b/modules/MLST/Spreadsheet/Row.pm index 993b90f..f31e8a7 100644 --- a/modules/MLST/Spreadsheet/Row.pm +++ b/modules/MLST/Spreadsheet/Row.pm @@ -33,7 +33,7 @@ sub _build__common_cells my @common_cells = ( $self->compare_alleles->sequence_filename_root, $self->sequence_type_obj->sequence_type_or_nearest, - ($self->compare_alleles->new_st ? "New ST" : ''), + ($self->compare_alleles->new_st || defined($self->sequence_type_obj->nearest_sequence_type) ? "New ST" : ''), ($self->compare_alleles->contamination ? "Contamination" : ''), ); return \@common_cells; diff --git a/t/Output/SpreadsheetRow.t b/t/Output/SpreadsheetRow.t index 813f0e4..97f63e0 100644 --- a/t/Output/SpreadsheetRow.t +++ b/t/Output/SpreadsheetRow.t @@ -71,8 +71,8 @@ $sequence_type_obj = MLST::SequenceType->new( sequence_names => $compare_alleles->found_sequence_names ); ok(($spreadsheet_row_obj = MLST::Spreadsheet::Row->new(sequence_type_obj => $sequence_type_obj, compare_alleles => $compare_alleles)),'create a valid spreadsheet row obj with contamination'); -is_deeply($spreadsheet_row_obj->allele_numbers_row, ['contigs', 4,'','Contamination',3,3,1], 'valid allele_number row with contamination'); -is_deeply($spreadsheet_row_obj->genomic_row, ['contigs', 4,'','Contamination','GGGGAAAGGGACTCAGGCTCAGTTCATCATGGAGAAATATGGTATTCCGCAAATCTCCACTGGCGATATGCTGCGTGCTGCGGTCAAATCTGGCTCCGAGCTGGGTAAACAAGCAAAAGACATTATGGATGCTGGCAAACTGGTTACCGACGAACTGGTGATCGCGCTGGTTAAAGGGCGCATTGCTCAGGAAGACTGCCGTAATGGTTTCCTGTTGGACGGCTTCCCGCGTACCATTCCGCAGGCAGACGCGATGAAAGAAGCGGGCATCAATGTTGATTACGTTCTGGAATTCGACGTACCGGACGAACTGATCGTTGACCGTATCGTCGGTCGCCGCGTTCACGCGCCGTCTGGTCGTGTTTATCACGTTAAATTCAATCCGCCGAAAGTAGAAGGTAAAGACGACGTTACCGGTGAAGAACTGACTACCCGTAAAGACGATCAGGAAGAAACCGTACGTAAACGTCTGGTTGAATACCATCAGATGACAGCACCGCTGATCGGCTACTACTCCAAAGAAGCTGAAGCGGGTA', +is_deeply($spreadsheet_row_obj->allele_numbers_row, ['contigs', 4,'New ST','Contamination',3,3,1], 'valid allele_number row with contamination'); +is_deeply($spreadsheet_row_obj->genomic_row, ['contigs', 4,'New ST','Contamination','GGGGAAAGGGACTCAGGCTCAGTTCATCATGGAGAAATATGGTATTCCGCAAATCTCCACTGGCGATATGCTGCGTGCTGCGGTCAAATCTGGCTCCGAGCTGGGTAAACAAGCAAAAGACATTATGGATGCTGGCAAACTGGTTACCGACGAACTGGTGATCGCGCTGGTTAAAGGGCGCATTGCTCAGGAAGACTGCCGTAATGGTTTCCTGTTGGACGGCTTCCCGCGTACCATTCCGCAGGCAGACGCGATGAAAGAAGCGGGCATCAATGTTGATTACGTTCTGGAATTCGACGTACCGGACGAACTGATCGTTGACCGTATCGTCGGTCGCCGCGTTCACGCGCCGTCTGGTCGTGTTTATCACGTTAAATTCAATCCGCCGAAAGTAGAAGGTAAAGACGACGTTACCGGTGAAGAACTGACTACCCGTAAAGACGATCAGGAAGAAACCGTACGTAAACGTCTGGTTGAATACCATCAGATGACAGCACCGCTGATCGGCTACTACTCCAAAGAAGCTGAAGCGGGTA', 'ATAACGCGCGTGAGAAAGCGCGTGGCGCGAAAGCGATCGGCACCACCGGTCGTGGTATCGGGCCTGCTTATGAAGATAAAGTGGCACGTCGCGGTCTGCGTGTTGGCGACCTTTTCGACAAAGAAACCTTCGCTGAAAAACTGAAAGAAGTGATGGAATATCACAACTTCCAGTTGGTTAACTACTACAAAGCTGAAGCGGTTGATTACCAGAAAGTTCTGGATGATACGATGGCTGTTGCCGACATCCTGACTTCTATGGTGGTTGACGTTTCTGACCTGCTCGACCAGGCGCGTCAGCGTGGCGATTTCGTCATGTTCGAAGGTGCGCAGGGTACGCTGCTGGATATCGACCACGGTACTTATCCGTACGTAACTTCTTCCAACACCACTGCTGGTGGCGTGGCGACCGGTTCCGGCCTGGGCCCGCGTTATGTTGATTACGTTCTGGGTATCCTCAAAGCTTACTCAACTCGTGT', 'CGCACGTAAACTGGGCGTCGATATCGACAACCTGCTGTGCTCCCAGCCGGACACCGGCGAGCAGGCACTGGAAATCTGTGACGCCCTGGCGCGTTCTGGTGCAGTAGACGTTATCGTCGTTGACTCCGTGGCGGCACTGACGCCGAAAGCGGAAATCGAAGGCGAAATCGGCGACTCTCACATGGGCCTTGCGGCACGTATGATGAGCCAGGCGATGCGTAAGCTGGCGGGTAACCTGAAGCAGTCCAACACGCTGCTGATCTTCATCAACCAGATCCGTATGAAAATTGGTGTGATGTTCGGTAACCCGGAAACCACTACCGGTGGTAACGCGCTGAAATTCTACGCCTCTGTTCGTCTCGACATCCGTCGTATCGGCGCGGTGAAAGAGGGCGAAAACGTGGTGGGTAGCGAAACCCGCGTGAAAGTGGTGAAGAACAAAATCGCTGCACCGTTTAAACAGGCTGAATTTCAGATCCTCTACGGCGAAGGTATCAACTTCTACGGCGA'], 'valid genomic row with contamination');