Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-io
Commits
0f29b09b
Commit
0f29b09b
authored
Sep 27, 2018
by
Tiago Grego
Browse files
fixes to serializer sample scripts
parent
4548c1cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
scripts/gff3_serializer.pl
scripts/gff3_serializer.pl
+6
-6
scripts/gtf_serializer.pl
scripts/gtf_serializer.pl
+4
-4
scripts/vcf4_serializer.pl
scripts/vcf4_serializer.pl
+2
-2
scripts/vcf4_sv_serializer.pl
scripts/vcf4_sv_serializer.pl
+2
-2
No files found.
scripts/gff3_serializer.pl
View file @
0f29b09b
...
...
@@ -8,18 +8,18 @@
# Dumper chromosome 1 only for size/speed, takes about 20 minutes
#
$|
++
;
use
strict
;
use
warnings
;
use
Data::
Dumper
;
use
Getopt::
Long
;
use
Bio::EnsEMBL::
Registry
;
use
Bio::EnsEMBL::IO::Translator::
Ens
Feature
;
use
Bio::EnsEMBL::IO::Translator::
Feature
;
use
Bio::EnsEMBL::IO::Writer::
GFF3
;
use
Bio::EnsEMBL::IO::Object::
GXFMetadata
;
$|
++
;
my
$dbhost
=
'
ensembldb.ensembl.org
';
my
$dbuser
=
'
anonymous
';
my
$dbpass
;
...
...
@@ -50,7 +50,7 @@ my $adaptor = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "Slice" );
my
$ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
"
human
",
"
core
",
"
Gene
"
);
my
$dba
=
$adaptor
->
db
();
my
$translator
=
Bio::EnsEMBL::IO::Translator::
Ens
Feature
->
new
();
my
$translator
=
Bio::EnsEMBL::IO::Translator::
Feature
->
new
();
my
$serializer
=
Bio::EnsEMBL::IO::Writer::
GFF3
->
new
(
$translator
);
$serializer
->
open
(
$outfile
);
...
...
@@ -116,7 +116,7 @@ while(my $chromosome = shift @{$features}) {
$serializer
->
write
(
$chromosome
);
# Write out the end of section separator for the GFF3 (ie. ###)
$serializer
->
fwd_ref_delimeter
();
#
$serializer->fwd_ref_delimeter();
# Cycle through and print chromosomes, depends on DB ordering, not likely
# good for production
...
...
@@ -143,7 +143,7 @@ while(my $chromosome = shift @{$features}) {
}
# Write out the end of section separator for the GFF3 (ie. ###)
$serializer
->
fwd_ref_delimeter
();
#
$serializer->fwd_ref_delimeter();
}
}
scripts/gtf_serializer.pl
View file @
0f29b09b
...
...
@@ -8,19 +8,19 @@
# Dumper chromosome 1 only for size/speed, takes about 20 minutes
#
$|
++
;
use
strict
;
use
warnings
;
use
Data::
Dumper
;
use
Getopt::
Long
;
use
Bio::EnsEMBL::
Registry
;
use
Bio::EnsEMBL::IO::Translator::
Ens
Feature
;
use
Bio::EnsEMBL::IO::Translator::
Feature
;
use
Bio::EnsEMBL::IO::Writer::
GTF
;
use
Bio::EnsEMBL::IO::Object::
GXFMetadata
;
use
Bio::EnsEMBL::IO::Object::
GTF
;
$|
++
;
my
$dbhost
=
'
ensembldb.ensembl.org
';
my
$dbuser
=
'
anonymous
';
my
$dbpass
;
...
...
@@ -51,7 +51,7 @@ my $adaptor = Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "Slice" );
my
$ga
=
Bio::EnsEMBL::
Registry
->
get_adaptor
(
"
human
",
"
core
",
"
Gene
"
);
my
$dba
=
$adaptor
->
db
();
my
$translator
=
Bio::EnsEMBL::IO::Translator::
Ens
Feature
->
new
();
my
$translator
=
Bio::EnsEMBL::IO::Translator::
Feature
->
new
();
my
$serializer
=
Bio::EnsEMBL::IO::Writer::
GTF
->
new
(
$translator
);
# Two ways to override the callback table
...
...
scripts/vcf4_serializer.pl
View file @
0f29b09b
...
...
@@ -3,8 +3,6 @@
# Sample VCF4 serializer using the new ensembl-io methodology.
#
$|
++
;
use
strict
;
use
warnings
;
#use Data::Dumper;
...
...
@@ -14,6 +12,8 @@ use Bio::EnsEMBL::IO::Translator::SampleGenotypeFeature;
use
Bio::EnsEMBL::IO::Writer::
VCF4
;
use
Bio::EnsEMBL::IO::Object::
VCF4Metadata
;
$|
++
;
my
$db_version
=
Bio::EnsEMBL::
ApiVersion
->
software_version
;
# Connect to the Ensembl Registry to access the databases
...
...
scripts/vcf4_sv_serializer.pl
View file @
0f29b09b
...
...
@@ -3,8 +3,6 @@
# Sample VCF4 serializer using the new ensembl-io methodology.
#
$|
++
;
use
strict
;
use
warnings
;
#use Data::Dumper;
...
...
@@ -14,6 +12,8 @@ use Bio::EnsEMBL::IO::Translator::StructuralVariationFeature;
use
Bio::EnsEMBL::IO::Writer::
VCF4
;
use
Bio::EnsEMBL::IO::Object::
VCF4Metadata
;
$|
++
;
my
$db_version
=
Bio::EnsEMBL::
ApiVersion
->
software_version
;
# Connect to the Ensembl Registry to access the databases
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment