Replace the column into designed format
<p>I have a column like that </p>

<pre><code>Hei-3_ctg7180000009945  pan gene    1   13249   .   .   .   ID=Hei-3_ctg7180000009945;Name=Hei-3_ctg7180000009945
Hei-3_ctg7180000009946  pan gene    1   587 .   .   .   ID=Hei-3_ctg7180000009946;Name=Hei-3_ctg7180000009946
</code></pre>

<p>And I want to make it like:</p>

<pre><code>Hei-3_ctg7180000009945  pan gene    1   13249   .   .   .   ID=Hei-3_ctg7180000009945;Name=Hei-3_ctg7180000009945
Hei-3_ctg7180000009945  pan mRNA    1   13249   .   .   .   ID=mHei-3_ctg7180000009945;parent=Hei-3_ctg7180000009945
Hei-3_ctg7180000009945  pan exon    1   13249   .   .   .   ID=eHei-3_ctg7180000009945;parent=mHei-3_ctg7180000009945
</code></pre>

<p>Any suggestion I can do it easily?So basically I will print each row for three times. The first row is the same as the input. And the second row with the change of gene into mRNA as well as the change in the last column. And so on for the third column.</p>

<p>This is what I tried in python. But I tried to read each element, but I am not sure how can I modified some of the element? </p>

<pre><code>with open('10_pan.gff3') as f:
 for line in f:
      lines1 = line.rstrip('\n').split(' ')
      ll = line.split('\t')
      #print (ll)
      print(lines1)
</code></pre>

<p>Very vague question, but to print with a fixed length (5 in this case) you can use</p>

<pre><code>print("{:5}".format(123))
print("{:5}".format(12345))
</code></pre>

<p>yields</p>

<pre><code>  123
12345
</code></pre>

python shell unix