Permalink
Browse files

remove hard tabs and trailing whitespace from some test files

  • Loading branch information...
carandraug committed Mar 28, 2013
1 parent 9396d5c commit 00cfe1b515f627279e0bf065bbc472bea1e66e1b
Showing with 109 additions and 109 deletions.
  1. +23 −23 t/AlignIO/AlignIO.t
  2. +51 −51 t/Annotation/Annotation.t
  3. +35 −35 t/Seq/Seq.t
View
@@ -4,12 +4,12 @@
use strict;
BEGIN {
- use lib '.';
+ use lib '.';
use Bio::Root::Test;
-
+
test_begin(-tests => 28);
-
- use_ok('Bio::AlignIO');
+
+ use_ok('Bio::AlignIO');
}
my $DEBUG = test_debug();
@@ -20,21 +20,21 @@ my ($str,$aln,$strout,$status);
# not all parsers support output (noted as 0)
my %files = (
# file format I O
- 'testaln.phylip' => ['phylip', 1, 1],
- 'testaln.psi' => ['psi', 1, 1],
- 'testaln.arp' => ['arp', 1, 0],
- 'rfam_tests.stk' => ['stockholm', 1, 1],
- 'testaln.pfam' => ['pfam', 1, 1],
- 'testaln.msf' => ['msf', 1, 1],
- 'testaln.fasta' => ['fasta', 1, 1],
- 'testaln.selex' => ['selex', 1, 1],
- 'testaln.mase' => ['mase', 1, 0],
- 'testaln.prodom' => ['prodom', 1, 0],
- 'testaln.aln' => ['clustalw', 1, 1],
- 'testaln.metafasta' => ['metafasta', 1, 1],
- 'testaln.nexus' => ['nexus', 1, 1],
- 'testaln.po' => ['po', 1, 1],
- 'testaln.xmfa' => ['xmfa', 1, 1],
+ 'testaln.phylip' => ['phylip', 1, 1],
+ 'testaln.psi' => ['psi', 1, 1],
+ 'testaln.arp' => ['arp', 1, 0],
+ 'rfam_tests.stk' => ['stockholm', 1, 1],
+ 'testaln.pfam' => ['pfam', 1, 1],
+ 'testaln.msf' => ['msf', 1, 1],
+ 'testaln.fasta' => ['fasta', 1, 1],
+ 'testaln.selex' => ['selex', 1, 1],
+ 'testaln.mase' => ['mase', 1, 0],
+ 'testaln.prodom' => ['prodom', 1, 0],
+ 'testaln.aln' => ['clustalw', 1, 1],
+ 'testaln.metafasta' => ['metafasta', 1, 1],
+ 'testaln.nexus' => ['nexus', 1, 1],
+ 'testaln.po' => ['po', 1, 1],
+ 'testaln.xmfa' => ['xmfa', 1, 1],
);
# input file handles
@@ -43,10 +43,10 @@ while (my ($file, $fdata) = each %files) {
my ($format, $in, $out) = @{$fdata};
if ($in) {
my $fhin = Bio::AlignIO->newFh(
- '-file' => test_input_file($file),
+ '-file' => test_input_file($file),
'-format' => $format);
my $fhout = Bio::AlignIO->newFh(
- '-file' => ">".test_output_file(),
+ '-file' => ">".test_output_file(),
'-format' => 'clustalw');
while ( $aln = <$fhin>) {
cmp_ok($aln->num_sequences, '>=', 2, "input filehandle method test : $format");
@@ -62,10 +62,10 @@ while (my ($file, $fdata) = each %files) {
if ($out) {
my $status = 0;
my $fhin = Bio::AlignIO->newFh(
- '-file' => test_input_file('testaln.aln'),
+ '-file' => test_input_file('testaln.aln'),
'-format' => 'clustalw');
my $fhout = Bio::AlignIO->newFh(
- '-file' => '>'.test_output_file(),
+ '-file' => '>'.test_output_file(),
'-format' => $format);
while ( $aln = <$fhin> ) {
$status = print $fhout $aln;
View
@@ -29,8 +29,8 @@ my $DEBUG = test_debug();
#simple value
my $simple = Bio::Annotation::SimpleValue->new(-tagname => 'colour',
- -value => '1',
- );
+ -value => '1',
+ );
isa_ok($simple, 'Bio::AnnotationI');
is $simple->display_text, 1;
@@ -44,8 +44,8 @@ is $simple->display_text, 0;
# link
my $link1 = Bio::Annotation::DBLink->new(-database => 'TSC',
- -primary_id => 'TSC0000030',
- );
+ -primary_id => 'TSC0000030',
+ );
isa_ok($link1,'Bio::AnnotationI');
is $link1->database(), 'TSC';
is $link1->primary_id(), 'TSC0000030';
@@ -55,8 +55,8 @@ isa_ok($ac,'Bio::AnnotationCollectionI');
$ac->add_Annotation('dblink',$link1);
$ac->add_Annotation('dblink',
- Bio::Annotation::DBLink->new(-database => 'TSC',
- -primary_id => 'HUM_FABV'));
+ Bio::Annotation::DBLink->new(-database => 'TSC',
+ -primary_id => 'HUM_FABV'));
my $comment = Bio::Annotation::Comment->new( '-text' => 'sometext');
is $comment->text, 'sometext';
@@ -66,18 +66,18 @@ $ac->add_Annotation('comment', $comment);
my $target = Bio::Annotation::Target->new(-target_id => 'F321966.1',
- -start => 1,
- -end => 200,
- -strand => 1,
- );
+ -start => 1,
+ -end => 200,
+ -strand => 1,
+ );
isa_ok($target,'Bio::AnnotationI');
ok $ac->add_Annotation('target', $target);
my $ref = Bio::Annotation::Reference->new( -authors => 'author line',
- -title => 'title line',
- -location => 'location line',
- -start => 12);
+ -title => 'title line',
+ -location => 'location line',
+ -start => 12);
isa_ok($ref,'Bio::AnnotationI');
is $ref->authors, 'author line';
is $ref->title, 'title line';
@@ -153,7 +153,7 @@ is (scalar($nested_ac->get_Annotations('dblink')), 0);
my @anns = $nested_ac->get_Annotations('gene names');
isa_ok($anns[0], "Bio::Annotation::StructuredValue");
@anns = map { $_->get_Annotations('dblink');
- } $nested_ac->get_Annotations('nested');
+ } $nested_ac->get_Annotations('nested');
is (scalar(@anns), 3);
is (scalar($nested_ac->flatten_Annotations()), 2);
is (scalar($nested_ac->get_Annotations()), 7);
@@ -164,8 +164,8 @@ SKIP: {
use_ok('Bio::Annotation::OntologyTerm');
# OntologyTerm annotation
my $termann = Bio::Annotation::OntologyTerm->new(-label => 'test case',
- -identifier => 'Ann:00001',
- -ontology => 'dumpster');
+ -identifier => 'Ann:00001',
+ -ontology => 'dumpster');
isa_ok($termann->term,'Bio::Ontology::Term');
is ($termann->term->name, 'test case');
is ($termann->term->identifier, 'Ann:00001');
@@ -178,14 +178,14 @@ SKIP: {
my $seq = Bio::Seq->new();
isa_ok($seq,"Bio::AnnotatableI");
SKIP: {
- test_skip(-requires_modules => [qw(Bio::SeqFeature::Annotated URI::Escape)],
- -tests => 4);
- my $fea = Bio::SeqFeature::Annotated->new();
- isa_ok($fea, "Bio::SeqFeatureI",'isa SeqFeatureI');
- isa_ok($fea, "Bio::AnnotatableI",'isa AnnotatableI');
- $fea = Bio::SeqFeature::Generic->new();
- isa_ok($fea, "Bio::SeqFeatureI",'isa SeqFeatureI');
- isa_ok($fea, "Bio::AnnotatableI",'isa AnnotatableI');
+ test_skip(-requires_modules => [qw(Bio::SeqFeature::Annotated URI::Escape)],
+ -tests => 4);
+ my $fea = Bio::SeqFeature::Annotated->new();
+ isa_ok($fea, "Bio::SeqFeatureI",'isa SeqFeatureI');
+ isa_ok($fea, "Bio::AnnotatableI",'isa AnnotatableI');
+ $fea = Bio::SeqFeature::Generic->new();
+ isa_ok($fea, "Bio::SeqFeatureI",'isa SeqFeatureI');
+ isa_ok($fea, "Bio::AnnotatableI",'isa AnnotatableI');
}
my $clu = Bio::Cluster::UniGene->new();
isa_ok($clu, "Bio::AnnotatableI");
@@ -199,13 +199,13 @@ isa_ok($factory, 'Bio::Factory::ObjectFactoryI');
# defaults to SimpleValue
$ann = $factory->create_object(-value => 'peroxisome',
- -tagname => 'cellular component');
+ -tagname => 'cellular component');
isa_ok($ann, 'Bio::Annotation::SimpleValue');
$factory->type('Bio::Annotation::OntologyTerm');
$ann = $factory->create_object(-name => 'peroxisome',
- -tagname => 'cellular component');
+ -tagname => 'cellular component');
ok(defined $ann);
isa_ok($ann, 'Bio::Annotation::OntologyTerm');
@@ -230,24 +230,24 @@ isa_ok($ann,'Bio::Annotation::Comment');
# factory guessing the type: Target
$factory = Bio::Annotation::AnnotationFactory->new();
$ann = $factory->create_object(-target_id => 'F1234',
- -start => 1,
- -end => 10 );
+ -start => 1,
+ -end => 10 );
ok defined $ann;
isa_ok($ann,'Bio::Annotation::Target');
# factory guessing the type: OntologyTerm
$factory = Bio::Annotation::AnnotationFactory->new();
ok(defined ($ann = $factory->create_object(-name => 'peroxisome',
- -tagname => 'cellular component')));
+ -tagname => 'cellular component')));
like(ref $ann, qr(Bio::Annotation::OntologyTerm));
# tree
my $tree_filename = test_input_file('longnames.dnd');
my $tree = Bio::TreeIO->new(-file=>$tree_filename)->next_tree();
my $ann_tree = Bio::Annotation::Tree->new(
- -tagname => 'tree',
- -tree_obj => $tree,
- );
+ -tagname => 'tree',
+ -tree_obj => $tree,
+ );
isa_ok($ann_tree, 'Bio::AnnotationI');
$ann_tree->tree_id('test');
@@ -257,16 +257,16 @@ is $ann_tree->tagname(), 'tree', "tagname()";
my $aln_filename = test_input_file('longnames.aln');
use Bio::AlignIO;
$aln = Bio::AlignIO->new(-file => $aln_filename,
- -format=>'clustalw')->next_aln();
+ -format=>'clustalw')->next_aln();
isa_ok($aln, 'Bio::AnnotatableI');
$ac = Bio::Annotation::Collection->new();
$ac->add_Annotation('tree',$ann_tree);
$aln->annotation($ac);
for my $treeblock ( $aln->annotation->get_Annotations('tree') ) {
my $treeref = $treeblock->tree();
my @nodes = sort { defined $a->id &&
- defined $b->id &&
- $a->id cmp $b->id } $treeref->get_nodes();
+ defined $b->id &&
+ $a->id cmp $b->id } $treeref->get_nodes();
is(@nodes, 26);
is $nodes[12]->id, 'Skud_Contig1703.7', "add tree to AlignI";
my $str;
@@ -284,31 +284,31 @@ isa_ok($ann,'Bio::Annotation::Tree');
#tagtree
my $struct = [ 'genenames' => [
- ['genename' => [
- [ 'Name' => 'CALM1' ],
- ['Synonyms'=> 'CAM1'],
- ['Synonyms'=> 'CALM'],
- ['Synonyms'=> 'CAM' ] ] ],
- ['genename'=> [
- [ 'Name'=> 'CALM2' ],
- [ 'Synonyms'=> 'CAM2'],
- [ 'Synonyms'=> 'CAMB'] ] ],
- [ 'genename'=> [
- [ 'Name'=> 'CALM3' ],
- [ 'Synonyms'=> 'CAM3' ],
- [ 'Synonyms'=> 'CAMC' ] ] ]
- ] ];
+ ['genename' => [
+ [ 'Name' => 'CALM1' ],
+ ['Synonyms'=> 'CAM1'],
+ ['Synonyms'=> 'CALM'],
+ ['Synonyms'=> 'CAM' ] ] ],
+ ['genename'=> [
+ [ 'Name'=> 'CALM2' ],
+ [ 'Synonyms'=> 'CAM2'],
+ [ 'Synonyms'=> 'CAMB'] ] ],
+ [ 'genename'=> [
+ [ 'Name'=> 'CALM3' ],
+ [ 'Synonyms'=> 'CAM3' ],
+ [ 'Synonyms'=> 'CAMC' ] ] ]
+ ] ];
my $ann_struct = Bio::Annotation::TagTree->new(-tagname => 'gn',
- -value => $struct);
+ -value => $struct);
isa_ok($ann_struct, 'Bio::AnnotationI');
my $val = $ann_struct->value;
like($val, qr/Name: CALM1/,'default itext');
# roundtrip
my $ann_struct2 = Bio::Annotation::TagTree->new(-tagname => 'gn',
- -value => $val);
+ -value => $val);
is($ann_struct2->value, $val,'roundtrip');
# formats
Oops, something went wrong.

0 comments on commit 00cfe1b

Please sign in to comment.