Skip to content

Commit 18dc82c

Browse files
committed
Now using PFAMs from eggnog if description is '-'
1 parent eba68eb commit 18dc82c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## 0.3.0 - [29-April-2024]
6+
## 0.3.0 - [30-April-2024]
77

88
### `Added`
99

@@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4848
39. Now using local tests/stub files for GitHub CI
4949
40. Now removing iso-forms left by TSEBRA using `AGAT_SPFILTERFEATUREFROMKILLLIST`
5050
41. Added `pyproject.toml`
51+
42. Now using PFAMs from eggnog if description is '-'
5152

5253
### `Fixed`
5354

subworkflows/local/gff_store.nf

+11-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,17 @@ workflow GFF_STORE {
2020
def cols = line.split('\t')
2121
def id = cols[0]
2222
def txt = cols[7]
23+
def pfams = cols[20]
2324

24-
[ id, txt ]
25+
[ id, txt, pfams ]
26+
}
27+
.collect { id, txt, pfams ->
28+
if ( txt != '-' ) { return [ id, txt ] }
29+
if ( pfams != '-' ) { return [ id, "PFAMs: $pfams" ] }
30+
31+
[ id, 'No eggnog description and PFAMs' ]
2532
}
26-
.findAll { id, txt ->
27-
txt != '-'
28-
}.collectEntries { id, txt ->
33+
.collectEntries { id, txt ->
2934
[ id, txt ]
3035
}
3136

@@ -57,7 +62,7 @@ workflow GFF_STORE {
5762

5863
def anno = tx_annotations.containsKey(tx_id)
5964
? URLEncoder.encode(tx_annotations[tx_id], "UTF-8").replace('+', '%20')
60-
: URLEncoder.encode('hypothetical protein | no eggnog hit', "UTF-8").replace('+', '%20')
65+
: URLEncoder.encode('Hypothetical protein | no eggnog hit', "UTF-8").replace('+', '%20')
6166

6267
gene_tx_annotations[gene_id] += [ ( tx_id ): anno ]
6368
}
@@ -67,7 +72,7 @@ workflow GFF_STORE {
6772
def default_anno = tx_annos.values().first()
6873

6974
if ( tx_annos.values().findAll { it != default_anno }.size() > 0 ) {
70-
return [ gene_id, ( tx_annos + [ 'default': 'differing%20isoform%20descriptions' ] ) ]
75+
return [ gene_id, ( tx_annos + [ 'default': 'Differing%20isoform%20descriptions' ] ) ]
7176
}
7277

7378
[ gene_id, ( tx_annos + [ 'default': default_anno ] ) ]

0 commit comments

Comments
 (0)