forked from The-Sequence-Ontology/GAL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding merge_data -uniq along with some test files
Former-commit-id: 42b4295e640332ce925d706df3f8d8007d08ac75
- Loading branch information
1 parent
2c6ffb3
commit 7ad7b74
Showing
12 changed files
with
170 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
use FindBin; | ||
use lib "$FindBin::RealBin/../../lib"; | ||
use lib "$FindBin::RealBin/../../lib/cpan"; | ||
use GAL::Run; | ||
|
||
chdir $FindBin::Bin; | ||
my $path = "$FindBin::Bin/.."; | ||
|
||
my $tool = GAL::Run->new(path => $path, | ||
command => 'merge_data'); | ||
|
||
################################################################################ | ||
# Testing that merge_data compiles and returns usage statement | ||
################################################################################ | ||
|
||
ok(! $tool->run(cl_args => ['--help']), 'merge_data complies'); | ||
like($tool->get_stdout, qr/Synopsis/, 'merge_data prints usage statement'); | ||
|
||
################################################################################ | ||
# Testing that merge_data does something else | ||
################################################################################ | ||
|
||
my $file1 = "$FindBin::Bin/data/file1.txt"; | ||
my $file2 = "$FindBin::Bin/data/file2.txt"; | ||
|
||
my @cl_args = ('--pcol1 0', | ||
'--pcol2 1', | ||
'--uniq', | ||
$file1, | ||
$file2, | ||
); | ||
|
||
ok(! $tool->run(cl_args => \@cl_args), 'merge_data does something'); | ||
my @lines = split /\n/, $tool->get_stdout; | ||
my $lc = scalar @lines; | ||
ok($lc == 8, | ||
'merge_data has the correct line count'); | ||
|
||
$tool->clean_up; | ||
done_testing(); | ||
|
||
################################################################################ | ||
################################# Ways to Test ################################# | ||
################################################################################ | ||
|
||
__END__ | ||
# Various other ways to say "ok" | ||
ok($this eq $that, $test_name); | ||
is ($this, $that, $test_name); | ||
isnt($this, $that, $test_name); | ||
# Rather than print STDERR "# here's what went wrong\n" | ||
diag("here's what went wrong"); | ||
like ($this, qr/that/, $test_name); | ||
unlike($this, qr/that/, $test_name); | ||
cmp_ok($this, '==', $that, $test_name); | ||
is_deeply($complex_structure1, $complex_structure2, $test_name); | ||
can_ok($module, @methods); | ||
isa_ok($object, $class); | ||
pass($test_name); | ||
fail($test_name); | ||
BAIL_OUT($why); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
1 A | ||
2 B | ||
3 C | ||
4 D | ||
5 E | ||
6 F | ||
7 G | ||
8 H | ||
3 S | ||
4 T | ||
5 U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
1 Q | ||
2 R | ||
3 S | ||
4 T | ||
5 U | ||
6 V | ||
7 W | ||
8 X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
chr22 . SNV 14432513 14432513 . + . ID=1;Variant_seq=C,G;Variant_effect=gene_variant; | ||
chr22 . SNV 14433409 14433409 . + . ID=2;Variant_seq=C,T;Variant_effect=transcript_variant; | ||
chr22 . SNV 14433624 14433624 . + . ID=3;Variant_seq=A,G;Variant_effect=exon_variant; | ||
chr22 . SNV 14433863 14433863 . + . ID=4;Variant_seq=A,G; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
chr22 . SNV 14432513 14432513 . + . ID=1;Variant_seq=C,G;Variant_effect=exon_variant; | ||
chr22 . SNV 14433409 14433409 . + . ID=2;Variant_seq=C,T;Variant_effect=exon_variant,transcript_variant; | ||
chr22 . SNV 14433624 14433624 . + . ID=3;Variant_seq=A,G; | ||
chr22 . SNV 14433863 14433863 . + . ID=4;Variant_seq=A,G;Variant_effect=gene_variant; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
chr22 . SNV 14433863 14433863 . + . ID=4;Variant_seq=A,G;Variant_effect=missense_variant;test_attribute=5; |