@@ -5,7 +5,7 @@ with 'npg_qc::ultimagen::sample_retriever';
55package main_test ;
66use strict;
77use warnings;
8- use Test::More tests => 9 ;
8+ use Test::More tests => 28 ;
99use Test::Exception;
1010
1111use_ok(' sample_retriever_test' );
@@ -16,21 +16,37 @@ throws_ok { sample_retriever_test->new()->get_samples() }
1616 qr / Either runfolder_path or manifest_path should be set/ ,
1717 ' error if no attributes are set' ;
1818
19- my $samples_from_li = sample_retriever_test-> new(
19+ my $samples_li = sample_retriever_test-> new(
2020 runfolder_path => $rf
2121)-> get_samples();
22- my $samples_from_ma = sample_retriever_test-> new(
22+ is (scalar @{$samples_li }, 8, ' returned eight samples' );
23+
24+ my $samples_ma = sample_retriever_test-> new(
2325 runfolder_path => $rf ,
2426 manifest_path => " ${rf} /manifest.csv"
2527)-> get_samples();
28+ is (scalar @{$samples_ma }, 8, ' returned eight samples' );
29+
30+ for my $sample (($samples_li -> [0], $samples_ma -> [0])) {
31+ is ($sample -> id(), ' iNeuron15923026' , ' correct sample id' );
32+ is ($sample -> library_name(), ' 1_GEX_iA_iN_SCREEN' , ' correct library name' );
33+ is ($sample -> index_label(), ' Z0001' , ' correct index label' );
34+ is ($sample -> index_sequence(), ' CAGCTCGAATGCGAT' , ' correct index sequence' );
35+ is ($sample -> tag_index, 1, ' correct NPG tag index' );
36+ }
37+ is ($samples_li -> [0]-> application_type(), ' scRNA_GEX_10x_5prime_v3' ,
38+ ' correct application type' );
39+ is ($samples_ma -> [0]-> application_type(), undef , ' undefined application type' );
2640
27- is (scalar @{$samples_from_li }, 8, ' returned eight samples' );
28- is_deeply ($samples_from_li , $samples_from_ma , ' identical sample info' );
29- my $sample = $samples_from_li -> [0];
30- is ($sample -> id(), ' iNeuron15923026' , ' correct sample id' );
31- is ($sample -> library_name(), ' 1_GEX_iA_iN_SCREEN' , ' correct library name' );
32- is ($sample -> index_label(), ' Z0001' , ' correct index label' );
33- is ($sample -> index_sequence(), ' CAGCTCGAATGCGAT' , ' correct index sequence' );
34- is ($sample -> tag_index, 1, ' correct NPG tag index' );
41+ for my $sample (($samples_li -> [7], $samples_ma -> [7])) {
42+ is ($sample -> id(), ' iNeuron15923033' , ' correct sample id' );
43+ is ($sample -> library_name(), ' 4_dgRNA_iA_iN_SCREEN' , ' correct library name' );
44+ is ($sample -> index_label(), ' Z0008' , ' correct index label' );
45+ is ($sample -> index_sequence(), ' CACATCCTGCATGTGAT' , ' correct index sequence' );
46+ is ($sample -> tag_index, 8, ' correct NPG tag index' );
47+ }
48+ is ($samples_li -> [7]-> application_type(), ' native' ,
49+ ' correct application type' );
50+ is ($samples_ma -> [7]-> application_type(), undef , ' undefined application type' );
3551
36521;
0 commit comments