Mercurial > repos > abims-sbr > orthogroups_tool
annotate 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 |
| rev | line source |
|---|---|
|
0
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
1 #/bin/bash |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
2 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
3 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
4 #This script contains regex to re-write the outputs of transdecoder to the original AdaptSearch format |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
5 #Example : |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
6 #OG0007971: m.35 g.35 ORF g.35 m.35 type_internal len_307 _+_ Th132_1/1_1.000_923_1-924_+_ |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
7 #Becomes : |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
8 #Th132_1/1_1.000_923 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
9 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
10 # removes 'OGxxxxxxx ' |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
11 sed -i -E 's/OG[0-9]{7}:\s//' $1 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
12 # replace _+_ by (+) because '_' causes bugs |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
13 sed -i 's/_+_/(+)/g' $1 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
14 # Replaces everything by '>' |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
15 sed -i -E 's/m\.[0-9]{1,}[^()]+\(\+\)\s*/>/g' $1 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
16 # Removes terminal '(+)' |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
17 sed -i 's/(+)//g' $1 |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
18 # Removes last suite of unwanted numbers, underscore and dash |
|
f3600c96e961
planemo upload for repository https://github.com/abims-sbr/adaptsearch commit f30d34a6decb05f6b7803f6d677dad4c50f9cebe
abims-sbr
parents:
diff
changeset
|
19 sed -i -E 's/\_[0-9]{1,}-[0-9]{1,}//g' $1 |
