Skip to content

Commit

Permalink
Now using PFAMs from eggnog if description is '-'
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Apr 30, 2024
1 parent eba68eb commit 18dc82c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.3.0 - [29-April-2024]
## 0.3.0 - [30-April-2024]

### `Added`

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

### `Fixed`

Expand Down
17 changes: 11 additions & 6 deletions subworkflows/local/gff_store.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ workflow GFF_STORE {
def cols = line.split('\t')
def id = cols[0]
def txt = cols[7]
def pfams = cols[20]

[ id, txt ]
[ id, txt, pfams ]
}
.collect { id, txt, pfams ->
if ( txt != '-' ) { return [ id, txt ] }
if ( pfams != '-' ) { return [ id, "PFAMs: $pfams" ] }

[ id, 'No eggnog description and PFAMs' ]
}
.findAll { id, txt ->
txt != '-'
}.collectEntries { id, txt ->
.collectEntries { id, txt ->
[ id, txt ]
}

Expand Down Expand Up @@ -57,7 +62,7 @@ workflow GFF_STORE {

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

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

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

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

0 comments on commit 18dc82c

Please sign in to comment.