[BioRuby] Perl for d.....

Michael Paulini mh6 at sanger.ac.uk
Wed Jan 22 16:07:24 UTC 2014


On 22/01/14 15:23, Pjotr Prins wrote:
> I just ran into this Perl script:
>
>   https://github.com/genome/somatic-sniper/commit/d373ac14a1634e91dd7ba106fe55b65a650f5667
>
> which converts removes columns from a tab dilimited file. This should
> be an effing one-liner!! Even with sed.
>
> Pj.
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
you can boil it down to
perl -ane 'print join("\t", at F[0,1,1]),"\n"' infile > outfile

It more is a case of additional bells and whistles for style and error
handling than bad perl ... for that hell you need more special characters.

M



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the BioRuby mailing list