PoonLab / Poplars

Open-source implementations of popular tools from Los Alamos National Laboratory HIV Database
GNU Affero General Public License v3.0
0 stars 0 forks source link

sequence_locator: Each region object should store local and global coordinates #23

Closed kwade4 closed 5 years ago

kwade4 commented 5 years ago

With the current implementation, each GenomeRegion object has an attribute coords, which stores the start and end coordinates of the region. coords is set to the global coordinate (relative to the start of the genome) as defined in the reference coordinates file.

Since align and retrieve rely on local and global coordinates to find overlapping regions and generate output, I think it would be best to store each GenomeRegion's global_coords and local_coords.

This change would further simplify the logic in align and retrieve and would resolve issue #20.

kwade4 commented 5 years ago

I think simply converting global coordinates to local coordinates as needed would be a simpler and cleaner fix.