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
652b6a26
Commit
652b6a26
authored
5 years ago
by
Tiago Grego
Browse files
Options
Downloads
Patches
Plain Diff
cleanup parser code
parent
14146900
No related branches found
No related tags found
1 merge request
!97
[ENSCORESW-3106] BCF parser
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/IO/Parser/BCF.pm
+7
-11
7 additions, 11 deletions
modules/Bio/EnsEMBL/IO/Parser/BCF.pm
with
7 additions
and
11 deletions
modules/Bio/EnsEMBL/IO/Parser/BCF.pm
+
7
−
11
View file @
652b6a26
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
=head1 LICENSE
=head1 LICENSE
Copyright [2020] EMBL-European Bioinformatics Institute
Copyright [2020] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
...
@@ -16,15 +16,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -16,15 +16,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
=cut
=head1 NAME
=head1 NAME
Bio::EnsEMBL::IO::Parser::BCF - A line-based parser devoted to BCF
Bio::EnsEMBL::IO::Parser::BCF - A line-based parser devoted to BCF
=cut
=head1 DESCRIPTION
=head1 DESCRIPTION
BCF is a binary format of VCF
BCF is a binary format of VCF
...
@@ -49,10 +44,8 @@ sub open {
...
@@ -49,10 +44,8 @@ sub open {
# initialize generic parser
# initialize generic parser
my
$self
=
$class
->
SUPER::
new
(
@other_args
);
my
$self
=
$class
->
SUPER::
new
(
@other_args
);
$self
->
{
record
}
=
undef
;
$self
->
{
record
}
=
undef
;
$self
->
{
bcf_file
}
=
Bio::DB::HTS::
VCF
->
new
(
filename
=>
$filename
);
$self
->
{
bcf_file
}
=
Bio::DB::HTS::
VCF
->
new
(
filename
=>
$filename
);
$self
->
{
iterator
}
=
undef
;
$self
->
{
iterator
}
=
undef
;
return
$self
;
return
$self
;
...
@@ -83,6 +76,7 @@ sub seek {
...
@@ -83,6 +76,7 @@ sub seek {
sub
next_block
{
sub
next_block
{
my
$self
=
shift
;
my
$self
=
shift
;
if
(
!
defined
$self
->
{
iterator
})
{
if
(
!
defined
$self
->
{
iterator
})
{
exit
1
;
exit
1
;
}
}
...
@@ -91,14 +85,17 @@ sub next_block {
...
@@ -91,14 +85,17 @@ sub next_block {
}
}
sub
read_block
{
sub
read_block
{
my
$self
=
shift
;
my
$self
=
shift
;
$self
->
{
waiting_block
}
=
$self
->
{
iterator
}
->
next
;
$self
->
{
waiting_block
}
=
$self
->
{
iterator
}
->
next
;
}
}
sub
close
{
sub
close
{
my
$self
=
shift
;
my
$self
=
shift
;
$self
->
{
iterator
}
->
close
if
$self
->
{
iterator
};
$self
->
{
iterator
}
->
close
if
$self
->
{
iterator
};
my
$report
=
$self
->
{
bcf_file
}
->
DESTROY
;
my
$report
=
$self
->
{
bcf_file
}
->
DESTROY
;
return
(
defined
$report
)
?
0
:
1
;
return
(
defined
$report
)
?
0
:
1
;
}
}
...
@@ -138,5 +135,4 @@ sub read_record {
...
@@ -138,5 +135,4 @@ sub read_record {
return
$self
->
{
record
};
return
$self
->
{
record
};
}
}
1
;
1
;
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