Skip to content

Commit

Permalink
tRNAscan conditional on dataset type (genomes)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Jun 28, 2024
1 parent 74c5cb7 commit 27b8be4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 16, 0].freeze
VERSION = [1.3, 17, 0].freeze

##
# Nickname for the current major.minor version.
VERSION_NAME = 'mezzotint'

##
# Date of the current gem relese.
VERSION_DATE = Date.new(2024, 6, 23)
VERSION_DATE = Date.new(2024, 6, 28)

##
# References of MiGA
Expand Down
3 changes: 2 additions & 1 deletion manual/part5/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ Supported file keys:
* `gff` (*gz*): GFF v3 file containing the location of detected SSU genes
* `all_ssu_genes` (*gz*): FastA file containing all the detected SSU genes
* `classification`: Taxonomic classification with RDP taxonomy
* `trna_list` (*gz*): Raw-text table with tRNA predictions
* `trna_list` (*gz*): Raw-text table with tRNA predictions, generated for all
genome types (non-multi)

Deprecated file keys (for backwards-compatibility):

Expand Down
21 changes: 11 additions & 10 deletions scripts/ssu.bash
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ if [[ -s $fa ]] ; then
>> "${DATASET}.rdp.tsv"
fi

# tRNAscan-SE
dom_opt="-$(echo "$d" | perl -pe 's/(\S).*/$1/')"
out="${DATASET}.trna.txt"
# `echo O` is to avoid a hang from a pre-existing output file.
# This is better than pre-checking (and removing), because it avoids
# the (unlikely) scenario of a file racing (e.g., a file created right
# before tRNAscan-SE starts, or a `rm` failure).
#
# The trailing `|| true` is to treat failure as non-fatal
echo O | tRNAscan-SE $dom_opt -o "${DATASET}.trna.txt" -q "$fa" || true
# tRNAscan-SE (only if non-multi)
if miga ls -P "$PROJECT" -D "$DATASET" --no-multi --silent ; then
dom_opt="-$(echo "$d" | perl -pe 's/(\S).*/$1/')"
# `echo O` is to avoid a hang from a pre-existing output file.
# This is better than pre-checking (and removing), because it avoids
# the (unlikely) scenario of a file racing (e.g., a file created right
# before tRNAscan-SE starts, or a `rm` failure).
#
# The trailing `|| true` is to treat failure as non-fatal
echo O | tRNAscan-SE $dom_opt -o "${DATASET}.trna.txt" -q "$fa" || true
fi

# Gzip
for x in gff ssu.all.fa rdp.tsv trna.txt ; do
Expand Down

0 comments on commit 27b8be4

Please sign in to comment.