From f87a66b36ba4c060658158a1c7180297e32fd396 Mon Sep 17 00:00:00 2001 From: cjfields Date: Thu, 8 Mar 2007 14:40:47 +0000 Subject: [PATCH] removed tests from old bracket_string method (will add to Simplealign tests) svn path=/bioperl-live/trunk/; revision=11266 --- t/alignUtilities.t | 63 ++++++++---------------------------------------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/t/alignUtilities.t b/t/alignUtilities.t index 785018c82..f57d9ae33 100644 --- a/t/alignUtilities.t +++ b/t/alignUtilities.t @@ -2,7 +2,7 @@ ## Bioperl Test Harness Script for Modules ## $Id$ use strict; -use constant NUMTESTS => 35; +use constant NUMTESTS => 14; use vars qw($DEBUG); $DEBUG = $ENV{'BIOPERLDEBUG'} || 0; @@ -55,56 +55,11 @@ is scalar @$replicates, 3; my $repl_aln = pop @$replicates; is $repl_aln->no_sequences, 3; -my %testdata = ( - 'allele1' => 'GGATCCATT[G/C]CTACT', - 'allele2' => 'GGAT[C/-][C/-]ATT[G/C]CT[A/C]CT', - 'allele3' => 'G[G/C]ATCCATTGCTACT', - 'allele4' => 'GGATCCATTGCTACT', - 'allele5' => 'GGATCCATTGCTAC[T/A]', - 'allele6' => 'GGATCCATTGCTA[C/G][T/A]', - 'testseq' => 'GGATCCATTGCTACT' - ); - -my $alnin = Bio::AlignIO->new(-format => 'fasta', - -file => Bio::Root::IO->catfile( - "t","data","alleles.fas")); - -$dna_aln = $alnin->next_aln; - -# compare all to test seq -my %bic = bracket_strings($dna_aln, 'allele2'); - -is (scalar(keys %bic), 7); - -for my $key (sort keys %bic) { - ok(exists $testdata{$key}); -} - -# fall back to first seq as ref seq -%bic = bracket_strings($dna_aln); - -is (scalar(keys %bic), 7); - -for my $key (sort keys %bic) { - ok(exists $testdata{$key}); -} - -# only compare these seqids to ref seq -my @seqids = qw(allele1 allele2 allele4 allele6); - -%bic = bracket_strings($dna_aln, undef, \@seqids); - -is (scalar(keys %bic), 4); - -for my $key (sort keys %bic) { - ok(exists $testdata{$key}); -} - -#use IO::String; -#use Bio::AlignIO; -#my $string; -#my $out = IO::String->new($string); -# -#my $strout = Bio::AlignIO->new(-fh => $out,'-format' => 'pfam'); -#$strout->write_aln($repl_aln); -#is $string, ""; +##use IO::String; +##use Bio::AlignIO; +##my $string; +##my $out = IO::String->new($string); +## +##my $strout = Bio::AlignIO->new(-fh => $out,'-format' => 'pfam'); +##$strout->write_aln($repl_aln); +##is $string, ""; -- 2.11.4.GIT