我有一个文件
NC_009066 5239 5308 trnA(tgc) 2.10899859667e-09 -
NC_009066 5309 5382 trnN(gtt) 7.03000463545e-10 -
NC_009066 5422 5487 trnC(gca) 7.09999799728e-08 -
NC_009066 5487 5557 trnY(gta) 3.72200156562e-11 -
NC_009066 5549 7097 cox1 291081744.81 +
NC_009066 7109 7180 trnS2(tga) 1.83000043035e-09 -
NC_009066 7183 7256 trnD(gtc) 2.5720000267e-09 +
和另一个快文件 < 坚固 > File2 坚固>
> NC_009066,1,0-17045,
GCTATCGTAGCTTAATTAAAGCATAACACTGAAGATGTTAAGATGAACCCTAGAAA
我将文件 1 放在数列行中, 逐行排列, 然后我就可以在 < code>/ s+/ code > 上分割每行, 从而访问每列 。
for $line(@array){
@column= split(/s+/,$line);
# print $column[5]."
";
$gene=substr($seq,$column[1],$column[2]);#$seq extracted from File2....}
but I want to do is to take the second column from the 1st line with the 3rd column from the 2nd line (substr($seq,5239,5382))
and then 2nd column from 2nd line and 3rd column from 3rd line (substr($seq,5309,5487))
.....
what is the best way to do it ??