Thanks for the replies. I obviously didn't describe what I'm trying to accomplish sufficiently well, so let me try again.

These are actually huge 1000 Genomes files, which I want to do population genetics analysis on using bioperl Bio::PopGen modules. But rather than passing an entire chromosome to get the statistics from (which I have already done: it works but the results are not genetically relevant), I want to process 100 kilobase windows sequentially and get separate statistics for each window.

So I am trying to split my data up accordingly. The particular file that I gave a sample of starts at coordinate (i.e. DNA base) number 16,287,215. Only variant bases are listed in the files; this is why there are large gaps between coordinates. I want to start my windows from '1' (as in general, coordinates will vary for different chromosomes), so in this case windows 0 to 161 will be empty, but this doesn't matter as I simply won't pass empty windows to bioperl for analysis. I was imagining that my data would look something like this:

$data{HG00553}[ [], [], [], ...., [0 0,0 0,0 0,0 0,0 0,0 0,0 0,....], +[], [], etc.] $data{HG00554}[ [], [], [], ...., [0 0,0 0,0 0,0 0,0 0,0 0,0 0,....], +[], [], etc.]

..where the pairs of zeros here would be in array number 162 (still comma-delimited), and the following arrays would also be populated (with data not given in the tiny sample I show), but the earlier arrays would be empty in this specific case. It seems to me that a hash of arrays of arrays would be the best way to go about this, but please correct me if this is wrong.

Then subsequently I can pass a particular window number for all individuals to the popgen module to get my stats for that genomic region, then do this for all windows and for each chromosome.

I hope this clarifies what I'm trying to do, and further help would be great! Thanks again.


In reply to Re: Population of HoAoA based on file contents by iangibson
in thread Population of HoAoA based on file contents by iangibson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.