Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks!
I have a file with millions of lines that look like this (DNA sequences):
My question is, how can I read it vertically, i.e. extract e.g. the 10th column? All lines are of the same length, but are not tab or space-separated where I could use the cut command. My approach would be to split each line and then keep only the 10th letter everywhere, but this takes enormous amount of time and I was hoping that it might be easier/faster to do somehow.
Any ideas?
I have a file with millions of lines that look like this (DNA sequences):
ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA ACATCACCTCCCACAACGAGGACTACACCATCGTGGAACA
My question is, how can I read it vertically, i.e. extract e.g. the 10th column? All lines are of the same length, but are not tab or space-separated where I could use the cut command. My approach would be to split each line and then keep only the 10th letter everywhere, but this takes enormous amount of time and I was hoping that it might be easier/faster to do somehow.
Any ideas?
Back to
Seekers of Perl Wisdom