Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-io
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl-io
Commits
5ab8cede
Commit
5ab8cede
authored
6 years ago
by
Tiago Grego
Browse files
Options
Downloads
Patches
Plain Diff
tidy up
parent
729aa720
No related branches found
Branches containing commit
No related tags found
2 merge requests
!79
ensembl Utils::IO into ensembl-io
,
!79
ensembl Utils::IO into ensembl-io
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/t/utils_io/harmony.t
+46
-60
46 additions, 60 deletions
modules/t/utils_io/harmony.t
with
46 additions
and
60 deletions
modules/t/utils_io/harmony.t
+
46
−
60
View file @
5ab8cede
...
...
@@ -61,43 +61,6 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
# ensembl-io FASTA writer is currently non-functional
# # FASTA
# {
# my ($utils_output, $ensio_output);
# open my $utils_fh, '>', \$utils_output;
# my $utils_fasta_writer = Bio::EnsEMBL::Utils::IO::FASTASerializer->new($utils_fh); # No need to fiddle with chunk sizes at this point
# # foreach my $feature (@$features) {
# $utils_fasta_writer->print_Seq($gene->feature_Slice);
# # }
# close $utils_fh;
# ## $utils_output
# open my $ensio_fh, '>', \$ensio_output;
# my $ensio_fasta_writer = Bio::EnsEMBL::IO::Writer->new('Fasta', $ensio_fh);
# my $translator = Bio::EnsEMBL::IO::Translator::Gene->new();
# # foreach my $feature (@$features) {
# $ensio_fasta_writer->write($translator);
# # }
# ### $utils_output
# close $ensio_output;
# is($utils_output, $ensio_output, "FASTA harmonization test pass");
# }
# GFF
{
my
(
$utils_output
,
$ensio_output
);
...
...
@@ -107,7 +70,7 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
# $utils_gff_writer->print_main_header([$gene->feature_Slice()]);
$utils_gff_writer
->
print_main_header
;
foreach
my
$gene
(
@$genes
)
{
foreach
my
$gene
(
@
{
$genes
}
)
{
$utils_gff_writer
->
print_feature
(
$gene
);
}
close
$utils_fh
;
...
...
@@ -125,7 +88,7 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
$serializer
->
write
(
Bio::EnsEMBL::IO::Object::
GXFMetadata
->
directive
('
gff-version
',
3
));
# $serializer->write(Bio::EnsEMBL::IO::Object::GXFMetadata->ens_directive('genome-build', 'ensembl', 'GRCh38'));
foreach
my
$gene
(
@$genes
)
{
foreach
my
$gene
(
@
{
$genes
}
)
{
$serializer
->
write
(
$gene
);
}
...
...
@@ -148,7 +111,7 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
# $utils_gtf_writer->print_main_header([$gene->feature_Slice()]);
# $utils_gtf_writer->print_main_header($db);
foreach
my
$gene
(
@$genes
)
{
foreach
my
$gene
(
@
{
$genes
}
)
{
$utils_gtf_writer
->
print_Gene
(
$gene
);
}
...
...
@@ -193,7 +156,7 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
# $serializer->write(Bio::EnsEMBL::IO::Object::GXFMetadata->directive('gff-version', 3));
# $serializer->write(Bio::EnsEMBL::IO::Object::GXFMetadata->ens_directive('genome-build', 'ensembl', 'GRCh38'));
foreach
my
$gene
(
@$genes
)
{
foreach
my
$gene
(
@
{
$genes
}
)
{
$serializer
->
write
(
$gene
);
}
...
...
@@ -223,47 +186,70 @@ is(ref @{$genes}[0], 'Bio::EnsEMBL::Gene', "Gene objects loaded successfully");
# ensembl-io and utils-io BED writers seem to produce different BED formats. Investigation needed.
# # ensembl-io and utils-io BED writers seem to produce different BED formats. Investigation needed.
# # BED
# {
# my ($utils_output, $ensio_output);
# open my $utils_fh, '>', \$utils_output;
# my $utils_bed_writer = Bio::EnsEMBL::Utils::IO::BEDSerializer->new($utils_fh); # No need to fiddle with chunk sizes at this point
#
#
$utils_
gtf
_writer
->print_main_header([$gene->feature_Slice()]
);
# # $utils_bed_writer->print_main_header($db);
#
#
foreach my $
transcript
(
@{$gene
->get_all_Transcript
s}
) {
#
my
$utils_
bed
_writer
= Bio::EnsEMBL::Utils::IO::BEDSerializer->new($utils_fh
);
# foreach my $
gene
(@{$genes}) {
# $utils_bed_writer->print_feature($gene);
# # }
# ### $utils_output
# }
# close $utils_fh;
# open my $ensio_fh, '>', \$ensio_output;
# my $translator = Bio::EnsEMBL::IO::Translator::Gene->new();
# my $serializer = Bio::EnsEMBL::IO::Writer::BED->new($translator);
# # my $serializer = Bio::EnsEMBL::IO::Writer->new('Bed', $translator);
# # $translator->add_callbacks( { type => sub { return 'fake_type' } } );
# # $translator->add_callbacks( { type => sub { return 'region' } } );
# $serializer->open($ensio_fh);
# # Write headers
# # $serializer->write(Bio::EnsEMBL::IO::Object::GXFMetadata->directive('gff-version', 3));
# # $serializer->write(Bio::EnsEMBL::IO::Object::GXFMetadata->ens_directive('genome-build', 'ensembl', 'GRCh38'));
# # foreach my $transcript ( @{$gene->get_all_Transcripts} ) {
# foreach my $gene (@{$genes}) {
# $serializer->write($gene);
#
#
}
# }
# close $ensio_fh;
# ### $ensio_output
# is($utils_output, $ensio_output, "BED harmonization test pass");
# }
# # ensembl-io FASTA writer is currently missing. Implementation required?
# # FASTA
# {
# my ($utils_output, $ensio_output);
# open my $utils_fh, '>', \$utils_output;
# my $utils_fasta_writer = Bio::EnsEMBL::Utils::IO::FASTASerializer->new($utils_fh); # No need to fiddle with chunk sizes at this point
# # foreach my $gene (@{$genes}) {
# $utils_fasta_writer->print_Seq($gene->feature_Slice);
# # }
# close $utils_fh;
# open my $ensio_fh, '>', \$ensio_output;
# my $ensio_fasta_writer = Bio::EnsEMBL::IO::Writer->new('Fasta', $ensio_fh);
# my $translator = Bio::EnsEMBL::IO::Translator::Gene->new();
# # my $serializer = Bio::EnsEMBL::IO::Writer::FASTA->new($translator);
# # foreach my $gene (@{$genes}) {
# $ensio_fasta_writer->write($translator);
# # $serializer->write($gene);
# # }
# close $ensio_fh;
# is($utils_output, $ensio_output, "FASTA harmonization test pass");
# }
done_testing
();
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment