1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#! perl
use strict;
use warnings;
use Test::More;
use lib '.';
use t::TestUtils;
use Grinder;
my ($factory, $nof_reads, $read);
# No profile
ok $factory = Grinder->new(
-reference_file => data('single_seq_database.fa'),
-read_dist => 50 ,
-total_reads => 100 ,
-unidirectional => 1 ,
), 'No profile';
while ( $read = $factory->next_read ) {
is $read->seq, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
};
# Grinder profile file that contains the same parameters as the previous test
ok $factory = Grinder->new(
-profile_file => data('profile.txt'),
), 'Grinder profile';
while ( $read = $factory->next_read ) {
is $read->seq, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
};
# A mix of profile and other command-line arguments
ok $factory = Grinder->new(
-desc_track => 0 ,
-num_libraries => 2 ,
-profile_file => data('profile.txt'),
-multiplex_ids => data('mids.fa') ,
-shared_perc => 100 ,
), 'Mix of profile and manually-specified options';
while ( $read = $factory->next_read ) {
is $read->seq, 'ACGTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
is $read->desc, undef;
};
done_testing();
|