But I would like to extract 100bp upstream and downstream of blast output. For example in the following example for first case I need to get the subject sequence "gi|34729142|" from 290+100 to 271-100 that is 171-390. While in the second case I need 371-100 to 391+100 that is 271-491.
query subject %identity aln_lnt MM g.opn qstart qend sstart s_end evalue bit_score
ath-miR156a-5p gi|34729142| 95.00 20 1 0 1 20 **290 271** 0.010 32.2
ath-miR159a gi|34729002| 100.00 21 0 0 1 21 **371 391** 1e-005 42.1
ath-miR170-3p gi|34723330| 95.24 21 1 0 1 21 **163 183** 0.003 34.2
In short I need such a program/script that look into the blast output result (sstart and s_end ). If sstart is smaller then s_end then substract 100 from sstart and add 100 in s_end as in second entry in the above example otherwise do other way round substract 100 from s_end and add 100 to s_start as in the first case in above example.