Skip to content

Commit

Permalink
Merge pull request #241 from erikrikarddaniel/fix-eggnog-case-hmmrank…
Browse files Browse the repository at this point in the history
…-profiles

Fix eggnog case hmmrank profiles
  • Loading branch information
erikrikarddaniel authored Jan 16, 2024
2 parents 7a8dd43 + 4cd25a6 commit a082f96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/local/eggnog/mapper.nf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ process EGGNOG_MAPPER {
-i $input
gzip ${prefix}.emapper.*
zgrep -v '^##' ${prefix}.emapper.annotations |sed 's/^#//' | sed 's/query/orf/' | gzip -c > ${prefix}.emapper.tsv.gz
zgrep -v '^##' ${prefix}.emapper.annotations |sed 's/^#//' | sed '/^query/s/.*/\\L&/' | sed 's/query/orf/' | gzip -c > ${prefix}.emapper.tsv.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
2 changes: 1 addition & 1 deletion modules/local/hmmrank.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ process HMMRANK {
c('accno', 't0', 'profile_desc', 't1', 'evalue', 'score', 'bias', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'rest'),
'\\\\s+', extra='merge', convert = FALSE
) %>%
transmute(profile = basename(fname), accno, profile_desc, evalue = as.double(evalue), score = as.double(score)) %>%
transmute(profile = basename(fname) %>% str_remove('${prefix}\\\\.') %>% str_remove('.tbl.gz'), accno, profile_desc, evalue = as.double(evalue), score = as.double(score)) %>%
# Group and calculate a rank based on score and evalue; let ties be resolved by profile in alphabetical order
group_by(accno) %>%
arrange(desc(score), evalue, profile) %>%
Expand Down

0 comments on commit a082f96

Please sign in to comment.