comparison scripts/format_transdecoder_headers.sh @ 0:f3600c96e961 draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
author abims-sbr
date Fri, 27 Oct 2017 10:38:52 -0400
parents
children 3f862f346967
comparison
equal deleted inserted replaced
-1:000000000000 0:f3600c96e961
1 #/bin/bash
2
3
4 #This script contains regex to re-write the outputs of transdecoder to the original AdaptSearch format
5 #Example :
6 #OG0007971: m.35 g.35 ORF g.35 m.35 type_internal len_307 _+_ Th132_1/1_1.000_923_1-924_+_
7 #Becomes :
8 #Th132_1/1_1.000_923
9
10 # removes 'OGxxxxxxx '
11 sed -i -E 's/OG[0-9]{7}:\s//' $1
12 # replace _+_ by (+) because '_' causes bugs
13 sed -i 's/_+_/(+)/g' $1
14 # Replaces everything by '>'
15 sed -i -E 's/m\.[0-9]{1,}[^()]+\(\+\)\s*/>/g' $1
16 # Removes terminal '(+)'
17 sed -i 's/(+)//g' $1
18 # Removes last suite of unwanted numbers, underscore and dash
19 sed -i -E 's/\_[0-9]{1,}-[0-9]{1,}//g' $1