mapp2g 0.1.1 → 0.1.2
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/exe/mapp2g +31 -4
- data/lib/mapp2g/version.rb +1 -1
- data/scripts/mapp2g-exonerate_gff2_to_jbgff3.rb +28 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d3b7c217addd7e92a9b0dc4d2af710c216d7dbcf86c2416018ac80bee287e1c
|
4
|
+
data.tar.gz: 562dbf402617e18af3b2e32cb32fb1e5f157ec783aaa6b61f2f44a5cf3877acc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6df38d0b72858bd49d354d0b72eeca57a70cfc80a075444bcffd8ecfcd4b59945395a76a3d38e70caea74254bce0e62f82039f15db6ca23566204444bc9bb5b2
|
7
|
+
data.tar.gz: 01174fd8de53e2e5f7d6a3021ff8789b242a53af4d8968bc3eaf6c3e1c67795826af82b95e7f0c1290e6c9d888d560d4488de5f1de4774c78d3b793dd52f2dcf
|
data/exe/mapp2g
CHANGED
@@ -3,11 +3,38 @@
|
|
3
3
|
require "mapp2g"
|
4
4
|
require 'bio'
|
5
5
|
require 'tempfile'
|
6
|
+
require 'optparse'
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
|
9
|
+
opt = OptionParser.new
|
10
|
+
OPTS = {}
|
11
|
+
|
12
|
+
begin
|
13
|
+
#opt.banner = "Usage: #{opt.program_name} [options] QUERY GENOME "
|
14
|
+
opt.on_tail("-v", "--version", "show version number") do
|
15
|
+
puts Mapp2g::VERSION
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
opt.on("-q QUERY", "--query", "query amino acid sequences in FASTA format"){|v| OPTS[:q] = v}
|
19
|
+
opt.on("-g BLASTDB", "--genome", "genome reference as blastdb"){|v| OPTS[:g] = v}
|
20
|
+
opt.on("-o [OUTDIR]", "--outdir", "output directory. DEFAULT: mapp2g_out_{process_id}"){|v| OPTS[:o] = v}
|
21
|
+
opt.on_tail('-h', '--help', 'show this help message and exit') do
|
22
|
+
puts opt
|
23
|
+
exit
|
24
|
+
end
|
25
|
+
opt.parse!(ARGV)
|
26
|
+
rescue => e
|
27
|
+
puts "ERROR: #{e}\nSee #{opt}"
|
28
|
+
exit
|
29
|
+
end
|
30
|
+
|
31
|
+
# p OPTS
|
32
|
+
|
33
|
+
query = OPTS[:q]
|
34
|
+
genome = OPTS[:g]
|
35
|
+
outdir = (OPTS[:o] || "mapp2g_out_#{$$}")
|
36
|
+
|
37
|
+
#p [query, genome, outdir]
|
11
38
|
|
12
39
|
Dir.mkdir(outdir)
|
13
40
|
|
data/lib/mapp2g/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
name = nil
|
2
|
+
target = nil
|
3
|
+
ARGF.each do |l|
|
4
|
+
|
5
|
+
if m = /\s+Query:\s/.match(l)
|
6
|
+
name = m.post_match.chomp.split[0]
|
7
|
+
elsif m = /\s+Target:\s/.match(l)
|
8
|
+
target = m.post_match.split[0]
|
9
|
+
elsif /^#{target}/.match(l) &&
|
10
|
+
(/\texonerate:est2genome\t/.match(l) || /\texonerate:protein2genome:local\t/.match(l)) &&
|
11
|
+
(/\tcds\t/.match(l) || /\texon\t/.match(l) || /\tgene\t/.match(l))
|
12
|
+
# puts l
|
13
|
+
a = l.chomp.split(/\t/)
|
14
|
+
b = Array.new(9)
|
15
|
+
a.each_with_index{|x, i| b[i] = x}
|
16
|
+
if b[2] == "gene"
|
17
|
+
b[-1] = "ID=#{name}"
|
18
|
+
b[2] = "match"
|
19
|
+
elsif (b[2] == "cds" || b[2] == "exon")
|
20
|
+
b[-1] = "Parent=#{name}"
|
21
|
+
b[2] = "match_part"
|
22
|
+
else
|
23
|
+
raise
|
24
|
+
end
|
25
|
+
puts b.join("\t")
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapp2g
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shuji Shigenobu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: mapp2g is a bioinformatics software, which map and align protein sequences
|
14
14
|
(amino acid sequences) to genome references in a splicing-aware way. mapp2g alignment
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- lib/mapp2g/mapper.rb
|
31
31
|
- lib/mapp2g/version.rb
|
32
32
|
- mapp2g.gemspec
|
33
|
+
- scripts/mapp2g-exonerate_gff2_to_jbgff3.rb
|
33
34
|
- sig/mapp2g.rbs
|
34
35
|
homepage: https://github.com/shujishigenobu/mapp2g
|
35
36
|
licenses:
|