Skip Menu |

This queue is for tickets about the Bio-Trace-ABIF CPAN distribution.

Report information
The Basics
Id: 54994
Status: open
Priority: 0/
Queue: Bio-Trace-ABIF

People
Owner: vita [...] cpan.org
Requestors: kernel [...] pkts.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Feature request: create a new ABI file
Date: Thu, 25 Feb 2010 10:12:24 -0800
To: bug-Bio-Trace-ABIF [...] rt.cpan.org
From: PF <kernel [...] pkts.ca>
Hi.. My current project involves creating new ABI files. At the moment, it looks like I'll have to take a sample file and update all the tags. I'd like to be able to create a new ABI file from scratch; it seems like Bio::Trace::ABIF can almost do that with the write_tag() function, but it's unable to write to a nonexistent tag. If write_tag() could be modified to create a tag directory if there isn't one, and then create a tag in the directory if there isn't one, we'd be in good shape. If we could also delete a tag from the tag directory with a delete_tag() function, I think we'd have the full create, retrieve, update, delete (CRUD) set of functions. Thanks! -- PF <kernel@pkts.ca>
I've queued your request. I will consider it for a future release, but don't expect that to happen soon. Adding tags is not as simple as deleting/updating, because the data must be shifted to make room for an expanded directory, etc...
Subject: Re: [rt.cpan.org #54994] Feature request: create a new ABI file
Date: Fri, 26 Feb 2010 08:59:10 -0800
To: bug-Bio-Trace-ABIF [...] rt.cpan.org
From: PF <kernel [...] pkts.ca>
On Fri, 2010-02-26 at 05:23 -0500, Nicola Vitacolonna via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=54994 > > > I've queued your request. I will consider it for a future release, but don't expect that to happen > soon. Adding tags is not as simple as deleting/updating, because the data must be shifted to > make room for an expanded directory, etc...
Are you not already shifting data when the newly-written tag is shorter or longer than the tag it is replacing? -- PF <kernel@pkts.ca>
On Fri Feb 26 12:00:49 2010, kernel@pkts.ca wrote: Show quoted text
> On Fri, 2010-02-26 at 05:23 -0500, Nicola Vitacolonna via RT wrote:
> > Adding tags is not as simple as deleting/updating, because the > > data must be shifted to > > make room for an expanded directory, etc...
> > Are you not already shifting data when the newly-written tag is > shorter > or longer than the tag it is replacing?
No. If the new data is shorter than the old data then it simply overwrites it; if it is longer, it is appended at the end of the file. In the latter case, the original data is not deleted from the file, only it is not accessible any longer. And updating does not change the first directory (i.e., the index of all tags). Adding a new tag would require extending the index, whose position in the file is fixed by the format, so the above “trick” cannot be applied. Nicola