Skip to content

Rework on how Bio::DB::HTS is used in HTSAdaptor

Marek Szuba requested to merge github/fork/Zhicheng-Liu/bugfix/ENSEMBL-5035 into master

Created by: Zhicheng-Liu

The Bio::DB::HTS object and other relatedHTS objects will be created only once within a single HTSAdaptor. They will have only one copy and be stored in $self->{_cache}->{_htsobj_handle}. Every use of HTS objects should through this copy.

Also remove "close" calls to the HTS objects as these objects will handle their resources properly when exiting. The DESTROY methods to these objects has been added in https://github.com/Ensembl/Bio-DB-HTS/pull/50 which will release the resources where needed.

This will provide a uniform interface to HTS objects, making it more consistent. It prevents from creating multiple objects for the same file and hence more resouces efficient too.

Also rename some variables to make them consistent throughout.

Related to ENSEMBL-5035.

Merge request reports