[Bioperl-l] Patching lucy
Andrew Walsh
walsh at cenix-bioscience.com
Tue Aug 2 03:04:27 EDT 2005
Hi Phillip,
I ran the patch on version 1.19p (which I downloaded from the TIGR ftp
site yesterday). It seemed to work for me (all 7 patches worked).
> patch -b -i lucy.patch lucy.c
patching file lucy.c
Here are the contents of the patch file. Perhaps my mail client did
something funny in formatting this. I'll send you a separate file as an
attachment as well.
> cat lucy.patch
277a278,279
> /* AGW added next line */
> fprintf(stderr, "Short/ no insert: %s\n", seqs[i].name);
588c590,592
< if ((seqs[i].len=bases)<=0)
---
> if ((seqs[i].len=bases)<=0) {
> /* AGW added next line */
> fprintf(stderr, "Empty: %s\n", seqs[i].name);
589a594
> }
893c898,902
< if (left) seqs[i].left+=left;
---
> if (left) {
> seqs[i].left+=left;
> /* AGW added next line */
> fprintf(stderr, "%s has PolyA (left).\n", seqs[i].name);
> }
896c905,909
< if (right) seqs[i].right-=right;
---
> if (right) {
> seqs[i].right-=right;
> /* AGW added next line */
> fprintf(stderr, "%s has PolyA (right).\n", seqs[i].name);
> }
898a912,913
> /* AGW added next line */
> fprintf(stderr, "Dropped PolyA: %s\n", seqs[i].name);
949a965,966
> /* AGW added next line */
> fprintf(stderr, "Vector: %s\n", seqs[i].name);
Cheers,
Andrew
Phillip San Miguel wrote:
> Hi Andrew,
>
> Thanks for the effort you went to here. Still looks there is a (more
> minor) problem though.
> patch gives a few errors (see below) using your new diff. Looks like 2
> of the 7 patches failed to patch lucy.c from lucy version lucy-1.19p.
>
> But the resulting source code does compile and run on the lucy test
> data. But the PolyA patches did not get inserted.
>
> Do you know if all 7 of your patches were installed into the lucy.c file
> from lucy-1.19p?
>
> (By the way, I think we are on the same page. I do understand that your
> perl code parses lucy output. I've tried it on lucy 1.19p output and it
> succeeds--although it, of course, lacks some of the functionality that
> would be available from the patched version of lucy).
>
> Phillip
>
> Here is the output when I run patch:
>
> (lucy)% cd lucy-1.19p
> (lucy-1.19p)% patch -b -i AndrewsNewPatch.diff lucy.c
> Looks like a normal diff.
> Hunk #4 failed at line 893.
> Hunk #5 failed at line 896.
> 2 out of 7 hunks failed: saving rejects to lucy.c.rej
> I can't seem to find a patch in there anywhere.
>
> Here is the lucy.c.rej file contents:
>
> ***************
> *** 893,893 ****
> ! if (left) seqs[i].left+=left;
> --- 898,902 ----
> ! if (left) {
> ! seqs[i].left+=left;
> ! /* AGW added next line */
> ! fprintf(stderr, "%s has PolyA (left).\n", seqs[i].name);
> ! }
> ***************
> *** 896,896 ****
> ! if (right) seqs[i].right-=right;
> --- 905,909 ----
> ! if (right) {
> ! seqs[i].right-=right;
> ! /* AGW added next line */
> ! fprintf(stderr, "%s has PolyA (right).\n", seqs[i].name);
> ! }
>
>
> Andrew Walsh wrote:
>
>> Hi Phillip,
>>
>> The patch pasted at the bottom of this e-mail should do the trick.
>> When you say that lucy seg faults, I assume you mean that you get the
>> segfault when running lucy on its own. The module itself does not
>> call lucy. It is only parsing the output from the files that lucy
>> creates. lucy itself should be taking phred files as its input. The
>> patch is required if you want to use the stderr from the lucy to get
>> more information from the module about the sequences. If you apply
>> this patch, you can try running the test that comes with the lucy
>> tarball (see the README.FIRST file in the distribution). It works for
>> me (Suse 9.0 on a Pentium 3 box). Let me know if there are any
>> problems. I will update the Appendix for Bio::Tools::Lucy in CVS.
>>
>> Cheers,
>>
>> Andrew
>>
>>
>> 277a278,279
>> > /* AGW added next line */
>> > fprintf(stderr, "Short/ no insert: %s\n", seqs[i].name);
>> 588c590,592
>> < if ((seqs[i].len=bases)<=0)
>> ---
>> > if ((seqs[i].len=bases)<=0) {
>> > /* AGW added next line */
>> > fprintf(stderr, "Empty: %s\n", seqs[i].name);
>> 589a594
>> > }
>> 893c898,902
>> < if (left) seqs[i].left+=left;
>> ---
>> > if (left) {
>> > seqs[i].left+=left;
>> > /* AGW added next line */
>> > fprintf(stderr, "%s has PolyA (left).\n", seqs[i].name);
>> > }
>> 896c905,909
>> < if (right) seqs[i].right-=right;
>> ---
>> > if (right) {
>> > seqs[i].right-=right;
>> > /* AGW added next line */
>> > fprintf(stderr, "%s has PolyA (right).\n", seqs[i].name);
>> > }
>> 898a912,913
>> > /* AGW added next line */
>> > fprintf(stderr, "Dropped PolyA: %s\n", seqs[i].name);
>> 949a965,966
>> > /* AGW added next line */
>> > fprintf(stderr, "Vector: %s\n", seqs[i].name);
>>
>>
>>
>>
>> Phillip SanMiguel wrote:
>>
>>> The patch to lucy source code from (the appendix):
>>>
>>> http://doc.bioperl.org/releases/bioperl-1.4/Bio/Tools/Lucy.html
>>>
>>> seems not to work for lucy-1.19p or lucy-1.19s. Actually patch runs
>>> fine, but the resulting executable (after make) seg faults when run
>>> on the lucy test data.
>>>
>>> Any advice?
>>>
>>> I've sent email directly to the module creator, Andrew G. Walsh, as
>>> requested in the module. But I'm not sure if the module creator
>>> regularly monitors the hotmail account listed therein. So I thought
>>> I'd post here, in case someone had a patch that would work on lucy-1.19.
>>>
>>
>>
>
--
------------------------------------------------------------------
Andrew Walsh, M.Sc.
Bioinformatics Software Engineer
IT Unit
Cenix BioScience GmbH
Tatzberg 47
01307 Dresden
Germany
Tel. +49-351-4173 137
Fax +49-351-4173 109
public key: http://www.cenix-bioscience.com/public_keys/walsh.gpg
------------------------------------------------------------------
More information about the Bioperl-l
mailing list