diff --git a/modules/local/eggnog/mapper.nf b/modules/local/eggnog/mapper.nf index e7fc4d7a..b6f1b68e 100644 --- a/modules/local/eggnog/mapper.nf +++ b/modules/local/eggnog/mapper.nf @@ -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}": diff --git a/modules/local/hmmrank.nf b/modules/local/hmmrank.nf index aa6ef3a1..62756158 100644 --- a/modules/local/hmmrank.nf +++ b/modules/local/hmmrank.nf @@ -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) %>%