coldy has asked for the wisdom of the Perl Monks concerning the following question:
$chrom='chr1'; $start=9839; $stop=9841;
I would like to creatre an array, @values, consisting of the values in the second column of <DATA> according to my 3 strings ,$chr,$start and $stop.
So for my example 3 strings ($chrom='chr1';$start=9839;$stop=9841;), would result in the array @values=(0.007,0.004,0.002)
I hope this makes sense? I was hoping somebody may have some ideas to help me out
Cheers, Chris
_DATA_ variableStep chrom=chr1 9837 0.010 9838 0.008 9839 0.007 9840 0.004 9841 0.002 9842 0.001 variableStep chrom=chr2 9837 0.090 9838 0.038 9839 0.017 9840 0.044 9841 0.052 9842 0.091
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extract relevent lines according to array
by Corion (Patriarch) on Apr 19, 2010 at 07:19 UTC | |
by coldy (Scribe) on Apr 19, 2010 at 10:53 UTC | |
by jethro (Monsignor) on Apr 19, 2010 at 14:31 UTC | |
by Marshall (Canon) on Apr 19, 2010 at 19:38 UTC | |
by coldy (Scribe) on Apr 20, 2010 at 02:50 UTC | |
by Marshall (Canon) on Apr 20, 2010 at 06:16 UTC | |
|
Re: extract relevent lines according to array
by nvivek (Vicar) on Apr 19, 2010 at 09:08 UTC | |
|
Re: extract relevent lines according to array
by Skeeve (Parson) on Apr 19, 2010 at 14:47 UTC |