[Bioperl-l] Linefeed mix-up (bug #903)

Brad Langohrst brad@langhorst.com
Wed, 21 Feb 2001 20:46:27 -0500


I've been a lurker for a really long while....

It should be possible to do the parse without passing any extra parameters.
If you know the file you are reading is a relatively small text file this
method should be safe to use...

1 - read in the file to an array with EOL set to \r\n
2 - check to see if you got only one line (you would if this is not a PC
 file) 3 - resplit the file on on \n alone
4 - check again toe see if you have more than one line
5 - finally split on \r
6 - if you still have only one line there is only one line or you are not
going to be able to parse this format.

this could probably be done faster if you just get a small portion of the
file (how much to be sure you get a least 2 lines??)

its pretty slow but it works for me.

brad

On Wednesday 21 February 2001 03:11 pm, you wrote:
> I've been a lurker for only a few days, but I concur wholeheartedly with
> Chad. -James
>
> >At 10:44 AM 2/21/01 -0800, Hilmar Lapp wrote:
> >>What do you think? Is this situation of mixed file-source/native OS
> >>sufficiently relevant to day-to-day reality?
> >
> >I've been a lurker for quite a while, but on this, I'll speak out.
> >
> >I would say that in my environment, the answer is resoundingly yes.
> >I have to deal with stuff from all 3 primary environments (U/Linux,
> >Win, Mac) on a regular basis.
> >
> >Chad
> >
> >
> >
> >Chad Price
> >Pediatric Informatics
> >Children's Hospital
> >Cincinnati OH 45229-3039
> >(513) 636-2935
> >
> >_______________________________________________
> >Bioperl-l mailing list
> >Bioperl-l@bioperl.org
> >http://bioperl.org/mailman/listinfo/bioperl-l
>
> -------------------------------------------------------------------
> James VanEe                              Phone: (607) 254-4862
> BioResource Center
> Computing Facilty
> 170/171 Biotech Bldg                       Fax: (607) 254-4847
> Cornell University
> Ithaca, NY 14853                 www: http://brcweb.bio.cornell.edu
> -------------------------------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l