Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Juke34 committed Jan 10, 2025
1 parent 737a28f commit c68d1a9
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 1 deletion.
18 changes: 17 additions & 1 deletion t/scripts_output.t
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,23 @@ unlink $outtmp;

# --------check agat_sp_flag_short_introns.pl-------------

# XXX
$script = $script_prefix."bin/agat_sp_flag_short_introns.pl";
$result = "$output_folder/agat_sp_flag_short_introns_1.gff";
system(" $script --gff $input_folder/agat_sp_flag_short_introns.gff -o $outtmp 2>&1 1>/dev/null");
#run test
ok( system("diff $result $outtmp") == 0, "output $script");
unlink $outtmp;
unlink $outprefix."_report.txt";

# --------check agat_sp_flag_short_introns_ebi.pl-------------

$script = $script_prefix."bin/agat_sp_flag_short_introns_ebi.pl";
$result = "$output_folder/agat_sp_flag_short_introns_ebi_1.gff";
system(" $script --gff $input_folder/agat_sp_flag_short_introns_ebi.gff -o $outtmp 2>&1 1>/dev/null");
#run test
ok( system("diff $result $outtmp") == 0, "output $script");
unlink $outtmp;
unlink $outprefix."_report.txt";

# --------check agat_sp_flag_premature_stop_codons.pl-------------
# I use result from another test because it shifted the annotation location, that allows to create pseudogenes because I use the original fasta not shifted
Expand Down
17 changes: 17 additions & 0 deletions t/scripts_output/in/agat_sp_flag_short_introns.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##gff-version 3
scaffold_4 AGAT gene 8631766 8635584 . + . ID=gene28773;description=Hypothetical protein | no eggnog hit
scaffold_4 Liftoff mRNA 8631766 8635584 . + . ID=gene28773.t1;Parent=gene28773;description=Hypothetical protein | no eggnog hit
scaffold_4 Liftoff exon 8631766 8634966 . + . ID=gene28773.t1.exon1;Parent=gene28773.t1
scaffold_4 Liftoff exon 8634968 8635584 . + . ID=gene28773.t1.exon2;Parent=gene28773.t1
scaffold_4 Liftoff CDS 8632667 8632951 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1
scaffold_4 AGAT five_prime_UTR 8631766 8632666 . + . ID=agat-five_prime_utr-1269;Parent=gene28773.t1
scaffold_4 Liftoff intron 8634967 8634967 . + . ID=intron_added-90678;Parent=gene28773.t1
scaffold_4 AGAT three_prime_UTR 8632952 8634966 . + . ID=agat-three_prime_utr-854;Parent=gene28773.t1
scaffold_4 AGAT three_prime_UTR 8634968 8635584 . + . ID=agat-three_prime_utr-855;Parent=gene28773.t1
scaffold_4 AUGUSTUS gene 8720203 8721055 . - . ID=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS mRNA 8720203 8721055 0.53 - . ID=gene28774.t1;Parent=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS exon 8720203 8720819 . - . ID=gene28774.t1.exon1;Parent=gene28774.t1
scaffold_4 AUGUSTUS exon 8720887 8721055 . - . ID=gene28774.t1.exon2;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720203 8720819 . - 2 ID=gene28774.t1.cds1;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720887 8721055 . - 0 ID=gene28774.t1.cds2;Parent=gene28774.t1
scaffold_4 AUGUSTUS intron 8720820 8720886 . - . ID=intron_added-90679;Parent=gene28774.t1
18 changes: 18 additions & 0 deletions t/scripts_output/in/agat_sp_flag_short_introns_ebi.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
##gff-version 3
scaffold_4 AGAT gene 8631766 8635584 . + . ID=gene28773;description=Hypothetical protein | no eggnog hit
scaffold_4 Liftoff mRNA 8631766 8635584 . + . ID=gene28773.t1;Parent=gene28773;description=Hypothetical protein | no eggnog hit
scaffold_4 Liftoff exon 8631766 8634966 . + . ID=gene28773.t1.exon1;Parent=gene28773.t1
scaffold_4 Liftoff exon 8634968 8635584 . + . ID=gene28773.t1.exon2;Parent=gene28773.t1
scaffold_4 Liftoff CDS 8632667 8632951 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1
scaffold_4 Liftoff CDS 8632955 8633056 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1
scaffold_4 AGAT five_prime_UTR 8631766 8632666 . + . ID=agat-five_prime_utr-1269;Parent=gene28773.t1
scaffold_4 Liftoff intron 8634967 8634967 . + . ID=intron_added-90678;Parent=gene28773.t1
scaffold_4 AGAT three_prime_UTR 8632952 8634966 . + . ID=agat-three_prime_utr-854;Parent=gene28773.t1
scaffold_4 AGAT three_prime_UTR 8634968 8635584 . + . ID=agat-three_prime_utr-855;Parent=gene28773.t1
scaffold_4 AUGUSTUS gene 8720203 8721055 . - . ID=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS mRNA 8720203 8721055 0.53 - . ID=gene28774.t1;Parent=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS exon 8720203 8720819 . - . ID=gene28774.t1.exon1;Parent=gene28774.t1
scaffold_4 AUGUSTUS exon 8720887 8721055 . - . ID=gene28774.t1.exon2;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720203 8720819 . - 2 ID=gene28774.t1.cds1;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720887 8721055 . - 0 ID=gene28774.t1.cds2;Parent=gene28774.t1
scaffold_4 AUGUSTUS intron 8720820 8720886 . - . ID=intron_added-90679;Parent=gene28774.t1
17 changes: 17 additions & 0 deletions t/scripts_output/out/agat_sp_flag_short_introns_1.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##gff-version 3
scaffold_4 AGAT gene 8631766 8635584 . + . ID=gene28773;description=Hypothetical protein | no eggnog hit;short_intron=2
scaffold_4 Liftoff mRNA 8631766 8635584 . + . ID=gene28773.t1;Parent=gene28773;description=Hypothetical protein | no eggnog hit;short_intron=2
scaffold_4 Liftoff exon 8631766 8634966 . + . ID=gene28773.t1.exon1;Parent=gene28773.t1;short_intron=2
scaffold_4 Liftoff exon 8634968 8635584 . + . ID=gene28773.t1.exon2;Parent=gene28773.t1;short_intron=2
scaffold_4 Liftoff CDS 8632667 8632951 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1;short_intron=2
scaffold_4 AGAT five_prime_UTR 8631766 8632666 . + . ID=agat-five_prime_utr-1269;Parent=gene28773.t1;short_intron=2
scaffold_4 Liftoff intron 8634967 8634967 . + . ID=intron_added-90678;Parent=gene28773.t1;short_intron=2
scaffold_4 AGAT three_prime_UTR 8632952 8634966 . + . ID=agat-three_prime_utr-854;Parent=gene28773.t1;short_intron=2
scaffold_4 AGAT three_prime_UTR 8634968 8635584 . + . ID=agat-three_prime_utr-855;Parent=gene28773.t1;short_intron=2
scaffold_4 AUGUSTUS gene 8720203 8721055 . - . ID=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS mRNA 8720203 8721055 0.53 - . ID=gene28774.t1;Parent=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS exon 8720203 8720819 . - . ID=gene28774.t1.exon1;Parent=gene28774.t1
scaffold_4 AUGUSTUS exon 8720887 8721055 . - . ID=gene28774.t1.exon2;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720203 8720819 . - 2 ID=gene28774.t1.cds1;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720887 8721055 . - 0 ID=gene28774.t1.cds2;Parent=gene28774.t1
scaffold_4 AUGUSTUS intron 8720820 8720886 . - . ID=intron_added-90679;Parent=gene28774.t1
18 changes: 18 additions & 0 deletions t/scripts_output/out/agat_sp_flag_short_introns_ebi_1.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
##gff-version 3
scaffold_4 AGAT gene 8631766 8635584 . + . ID=gene28773;description=Hypothetical protein | no eggnog hit;pseudo=4
scaffold_4 Liftoff mRNA 8631766 8635584 . + . ID=gene28773.t1;Parent=gene28773;description=Hypothetical protein | no eggnog hit;pseudo=4
scaffold_4 Liftoff exon 8631766 8634966 . + . ID=gene28773.t1.exon1;Parent=gene28773.t1;pseudo=4
scaffold_4 Liftoff exon 8634968 8635584 . + . ID=gene28773.t1.exon2;Parent=gene28773.t1;pseudo=4
scaffold_4 Liftoff CDS 8632667 8632951 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1;pseudo=4
scaffold_4 Liftoff CDS 8632955 8633056 . + 0 ID=gene28773.t1.cds1;Parent=gene28773.t1;pseudo=4
scaffold_4 AGAT five_prime_UTR 8631766 8632666 . + . ID=agat-five_prime_utr-1269;Parent=gene28773.t1;pseudo=4
scaffold_4 Liftoff intron 8634967 8634967 . + . ID=intron_added-90678;Parent=gene28773.t1;pseudo=4
scaffold_4 AGAT three_prime_UTR 8632952 8634966 . + . ID=agat-three_prime_utr-854;Parent=gene28773.t1;pseudo=4
scaffold_4 AGAT three_prime_UTR 8634968 8635584 . + . ID=agat-three_prime_utr-855;Parent=gene28773.t1;pseudo=4
scaffold_4 AUGUSTUS gene 8720203 8721055 . - . ID=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS mRNA 8720203 8721055 0.53 - . ID=gene28774.t1;Parent=gene28774;description=F-box kelch-repeat protein
scaffold_4 AUGUSTUS exon 8720203 8720819 . - . ID=gene28774.t1.exon1;Parent=gene28774.t1
scaffold_4 AUGUSTUS exon 8720887 8721055 . - . ID=gene28774.t1.exon2;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720203 8720819 . - 2 ID=gene28774.t1.cds1;Parent=gene28774.t1
scaffold_4 AUGUSTUS CDS 8720887 8721055 . - 0 ID=gene28774.t1.cds2;Parent=gene28774.t1
scaffold_4 AUGUSTUS intron 8720820 8720886 . - . ID=intron_added-90679;Parent=gene28774.t1

0 comments on commit c68d1a9

Please sign in to comment.