miga-base 1.2.11.0 → 1.2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/download/gtdb.rb +1 -2
- data/lib/miga/dataset/result.rb +4 -1
- data/lib/miga/taxonomy.rb +2 -0
- data/lib/miga/version.rb +2 -2
- data/scripts/stats.bash +26 -1
- data/utils/requirements.txt +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44cd40923e839969a12a0111a071a405d8cab376a0fa6e7102a21cafd33774a9
|
4
|
+
data.tar.gz: 5d1d0af6324b8c125a178b316a54e90eff2472aa7731407fc4d315a8b3fe9a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f70cb028127bd30f5293005afaf73cf10c02a003cef1e027d85b3c6a2f61377e95be5962c03f6dd199f63da252160b21b7142c135a305aacb7f46b6551c90cf
|
7
|
+
data.tar.gz: 50a8676d741894e58a1b4c9b5f53ee665ff938e2814bf4570e204f26d38de7952aab1ee36c01a458021af3bba166432572d79f84f1b5fb430684bf9034506e97
|
@@ -28,7 +28,6 @@ module MiGA::Cli::Action::Download::Gtdb
|
|
28
28
|
|
29
29
|
def remote_list
|
30
30
|
cli.say 'Downloading genome list'
|
31
|
-
ds = {}
|
32
31
|
extra = ['sp_reps_only=' + cli[:reference].to_s]
|
33
32
|
json = MiGA::RemoteDataset.download(
|
34
33
|
:gtdb, :taxon, cli[:taxon], :genomes, nil, extra
|
@@ -49,7 +48,7 @@ module MiGA::Cli::Action::Download::Gtdb
|
|
49
48
|
end
|
50
49
|
|
51
50
|
def remote_row_name(asm)
|
52
|
-
acc =
|
51
|
+
acc = asm.to_s
|
53
52
|
acc.gsub!(/\.\d+\Z/, '') unless cli[:add_version]
|
54
53
|
acc.miga_name
|
55
54
|
end
|
data/lib/miga/dataset/result.rb
CHANGED
@@ -384,7 +384,10 @@ module MiGA::Dataset::Result
|
|
384
384
|
##
|
385
385
|
# Add result type +:stats+ at +base+ (no +_opts+ supported)
|
386
386
|
def add_result_stats(base, _opts)
|
387
|
-
|
387
|
+
add_files_to_ds_result(
|
388
|
+
MiGA::Result.new("#{base}.json"), name,
|
389
|
+
trna_list: '.trna.txt'
|
390
|
+
)
|
388
391
|
end
|
389
392
|
|
390
393
|
##
|
data/lib/miga/taxonomy.rb
CHANGED
data/lib/miga/version.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA
|
|
12
12
|
# - String indicating release status:
|
13
13
|
# - rc* release candidate, not released as gem
|
14
14
|
# - [0-9]+ stable release, released as gem
|
15
|
-
VERSION = [1.2,
|
15
|
+
VERSION = [1.2, 12, 0].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|
@@ -20,7 +20,7 @@ module MiGA
|
|
20
20
|
|
21
21
|
##
|
22
22
|
# Date of the current gem relese.
|
23
|
-
VERSION_DATE = Date.new(2022, 12,
|
23
|
+
VERSION_DATE = Date.new(2022, 12, 30)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
data/scripts/stats.bash
CHANGED
@@ -9,7 +9,32 @@ DIR="$PROJECT/data/90.stats"
|
|
9
9
|
cd "$DIR"
|
10
10
|
|
11
11
|
# Initialize
|
12
|
-
miga date > "$DATASET.start"
|
12
|
+
miga date > "${DATASET}.start"
|
13
|
+
|
14
|
+
# tRNAscan-SE
|
15
|
+
fa="../05.assembly/${DATASET}.LargeContigs.fna"
|
16
|
+
if [[ -s "$fa" ]] ; then
|
17
|
+
d="$(miga ls -P "$PROJECT" -D "$DATASET" -m tax:d | awk '{print $2}')"
|
18
|
+
if [[ "$d" == "Bacteria" || "$d" == "Archaea" || "$d" == "Eukaryota" ]] ; then
|
19
|
+
dom_opt="-$(echo "$d" | perl -pe 's/(\S).*/$1/')"
|
20
|
+
out="${DATASET}.trna.txt"
|
21
|
+
# `echo O` is to avoid a hang from a pre-existing output file.
|
22
|
+
# This is better than pre-checking (and removing), because it avoids
|
23
|
+
# the (unlikely) scenario of a file racing (e.g., a file created right
|
24
|
+
# before tRNAscan-SE starts, or a `rm` failure).
|
25
|
+
#
|
26
|
+
# The trailing `|| true` is to treat failure as non-fatal
|
27
|
+
echo O | tRNAscan-SE $dom_opt -o "$out" -q "$fa" || true
|
28
|
+
if [[ -s "$out" ]] ; then
|
29
|
+
cnt=$(tail -n +4 "$out" | wc -l | awk '{print $1}')
|
30
|
+
aa="$(tail -n +4 "$out" | grep -v 'pseudo$' | awk '{print $5}' \
|
31
|
+
| grep -v 'Undet' | perl -pe 's/^f?([A-Za-z]+)[0-9]?/$1/' \
|
32
|
+
| sort | uniq | wc -l | awk '{print $1}')"
|
33
|
+
miga edit -P "$PROJECT" -D "$DATASET" \
|
34
|
+
-m "trna_count=Int($cnt),trna_aa=Int($aa)"
|
35
|
+
fi
|
36
|
+
fi
|
37
|
+
fi
|
13
38
|
|
14
39
|
# Calculate statistics
|
15
40
|
for i in raw_reads trimmed_fasta assembly cds essential_genes ssu distances taxonomy ; do
|
data/utils/requirements.txt
CHANGED
@@ -20,3 +20,4 @@ Fastp (reads) fastp https://github.com/OpenGene/fastp
|
|
20
20
|
Temurin (rdp) java https://adoptium.net/ Any Java VM would work
|
21
21
|
MyTaxa (mytaxa) MyTaxa http://enve-omics.ce.gatech.edu/mytaxa
|
22
22
|
Krona (mytaxa) ktImportText https://github.com/marbl/Krona/wiki
|
23
|
+
tRNAscan-SE tRNAscan-SE http://trna.ucsc.edu/tRNAscan-SE/ Required version: 2+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|