full_lengther_next 0.6.2 → 0.9.8
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/{README.rdoc → README.md} +0 -0
- data/Rakefile +6 -37
- data/bin/console +14 -0
- data/bin/download_fln_dbs.rb +2 -7
- data/bin/full_lengther_next +85 -6
- data/bin/make_user_db.rb +13 -5
- data/bin/setup +8 -0
- data/full_lengther_next.gemspec +42 -0
- data/lib/full_lengther_next.rb +2 -10
- data/lib/full_lengther_next/artifacts.rb +74 -0
- data/lib/full_lengther_next/{classes/blast_functions.rb → blast_functions.rb} +0 -0
- data/lib/full_lengther_next/{classes/cdhit.rb → cdhit.rb} +0 -0
- data/lib/full_lengther_next/{classes/chimeric_seqs.rb → chimeric_seqs.rb} +0 -0
- data/lib/full_lengther_next/{classes/common_functions.rb → common_functions.rb} +0 -0
- data/lib/full_lengther_next/{classes/exonerate_result.rb → exonerate_result.rb} +0 -0
- data/lib/full_lengther_next/{classes/fl_analysis.rb → fl_analysis.rb} +0 -0
- data/lib/full_lengther_next/{classes/fl_string_utils.rb → fl_string_utils.rb} +0 -0
- data/lib/full_lengther_next/fln_stats.rb +613 -0
- data/lib/full_lengther_next/go_methods.rb +42 -0
- data/lib/full_lengther_next/{classes/handle_db.rb → handle_db.rb} +0 -0
- data/lib/full_lengther_next/mapping.rb +296 -0
- data/lib/full_lengther_next/{classes/my_worker.rb → my_worker.rb} +71 -9
- data/lib/full_lengther_next/{classes/my_worker_EST.rb → my_worker_EST.rb} +0 -0
- data/lib/full_lengther_next/{classes/my_worker_manager_EST.rb → my_worker_manager_EST.rb} +0 -0
- data/lib/full_lengther_next/{classes/my_worker_manager_fln.rb → my_worker_manager_fln.rb} +181 -16
- data/lib/full_lengther_next/{classes/nc_rna.rb → nc_rna.rb} +0 -0
- data/lib/full_lengther_next/{classes/orf.rb → orf.rb} +0 -0
- data/lib/full_lengther_next/{classes/reptrans.rb → reptrans.rb} +9 -5
- data/lib/full_lengther_next/{classes/sequence.rb → sequence.rb} +26 -1
- data/lib/full_lengther_next/{classes/test_code.rb → test_code.rb} +1 -1
- data/lib/full_lengther_next/{classes/types.rb → types.rb} +3 -2
- data/lib/full_lengther_next/{classes/une_los_hit.rb → une_los_hit.rb} +0 -0
- data/lib/full_lengther_next/version.rb +3 -0
- data/lib/full_lengther_next/{classes/warnings.rb → warnings.rb} +0 -0
- data/report_templates/general_summary.erb +140 -0
- data/report_templates/mapping_summary.erb +98 -0
- data/report_templates/reptrans_summary.erb +32 -0
- metadata +112 -134
- data/.gemtest +0 -0
- data/History.txt +0 -32
- data/Manifest.txt +0 -44
- data/PostInstall.txt +0 -6
- data/bin/plot_fln.rb +0 -270
- data/bin/plot_taxonomy.rb +0 -70
- data/lib/expresscanvas.zip +0 -0
- data/lib/full_lengther_next/classes/artifacts.rb +0 -66
- data/lib/full_lengther_next/classes/fln_stats.rb +0 -641
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/test/test_full_lengther_next.rb +0 -11
- data/test/test_helper.rb +0 -3
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 66126c7a055d70f0e4c09649c600d4f6079c8f94
|
4
|
+
data.tar.gz: 00013e537413b9f3e9500698108974707c683803
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 779038539317419bc72a04805b251ef09987f50f5e66bcdf5ae230b2dee0d4baf832a5769d6b0112d0618c8f7fc3318dc9af66fa0896a33b1834d3434306bb79
|
7
|
+
data.tar.gz: 7d8f6769012d728b79f0065664a7b869e037cfb41521bfcc221646b78fc5833d7cc5797e00ee77c7f090115d054fb3f5b77dd750f23eac283f01338c9af4b1e2
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at seoanezonjic@hotmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 seoanezonjic
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/{README.rdoc → README.md}
RENAMED
File without changes
|
data/Rakefile
CHANGED
@@ -1,37 +1,6 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Hoe.plugin :newgem
|
8
|
-
# Hoe.plugin :website
|
9
|
-
# Hoe.plugin :cucumberfeatures
|
10
|
-
|
11
|
-
# Generate all the Rake tasks
|
12
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
13
|
-
$hoe = Hoe.spec 'full_lengther_next' do
|
14
|
-
self.developer 'Pedro Seoane & Noe Fernandez & Dario Guerrero ', 'seoanezonjic@hotmail.com & noeisneo@gmail.com & dariogf@gmail.com'
|
15
|
-
self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
16
|
-
self.rubyforge_name = self.name # TODO this is default value
|
17
|
-
# self.extra_deps = [['activesupport','>= 2.0.2']]
|
18
|
-
self.extra_deps = []
|
19
|
-
# self.extra_deps << ['narray','>=0']
|
20
|
-
# self.extra_deps << ['gnuplot','>=0']
|
21
|
-
# self.extra_deps << ['term-ansicolor','>=1.0.5']
|
22
|
-
self.extra_deps << ['xml-simple','>=1.0.12']
|
23
|
-
self.extra_deps << ['scbi_blast','>=0.0.32']
|
24
|
-
self.extra_deps << ['scbi_mapreduce','>=0.0.29']
|
25
|
-
self.extra_deps << ['scbi_zcat']
|
26
|
-
self.extra_deps << ['bio-cd-hit-report', '>= 0.1.0 ']
|
27
|
-
self.extra_deps << ['bio', '>= 1.4.3']
|
28
|
-
self.extra_deps << ['scbi_plot','>=0.0.6']
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
require 'newgem/tasks'
|
33
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
34
|
-
|
35
|
-
# TODO - want other tests/tasks run by default? Add them to the list
|
36
|
-
# remove_task :default
|
37
|
-
# task :default => [:spec, :features]
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
#require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
#RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
#task :default => :spec
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "full_lengther_next"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/download_fln_dbs.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# 15-2-2011 Noe Fernandez-Pozo
|
4
|
-
# Script to download Full-LengtherNext databases.
|
5
|
-
# Once in UniProtKB/Swiss-Prot, a protein entry is removed from UniProtKB/TrEMBL.
|
6
|
-
|
7
3
|
ROOT_PATH=File.dirname(__FILE__)
|
8
|
-
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next
|
4
|
+
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next"))
|
9
5
|
|
10
6
|
require 'bio'
|
11
7
|
require 'net/ftp'
|
@@ -28,7 +24,7 @@ def download_ncrna(formatted_db_path, no_download)
|
|
28
24
|
puts "Downloading ncRNA database"
|
29
25
|
open(ncrna_zip, 'wb') do |my_file|
|
30
26
|
my_file.print open('ftp://ftp.ebi.ac.uk/pub/databases/RNAcentral/current_release/sequences/rnacentral_active.fasta.gz').read
|
31
|
-
|
27
|
+
####my_file.print open('http://www.ncrna.org/frnadb/files/ncrna.zip').read
|
32
28
|
end
|
33
29
|
puts "\nncRNA database downloaded"
|
34
30
|
end
|
@@ -381,7 +377,6 @@ download_ncrna(formatted_db_path, options[:no_download]) if !options[:no_ncrna]
|
|
381
377
|
if !options[:no_download]
|
382
378
|
if !options[:no_uniprot]
|
383
379
|
conecta_uniprot(options[:uniprot_div], formatted_db_path)
|
384
|
-
#system('gunzip '+formatted_db_path+'*.gz')
|
385
380
|
end
|
386
381
|
end
|
387
382
|
|
data/bin/full_lengther_next
CHANGED
@@ -3,10 +3,53 @@
|
|
3
3
|
# 12-2-2011 Noe Fernandez Pozo.
|
4
4
|
# Full-LengtherNEXT predicts if your sequences are complete, showing you the nucleotide sequences and the translated protein
|
5
5
|
ROOT_PATH=File.dirname(__FILE__)
|
6
|
-
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next
|
6
|
+
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next"))
|
7
7
|
|
8
8
|
require 'optparse'
|
9
|
+
require 'fileutils'
|
9
10
|
require 'socket'
|
11
|
+
require 'report_html'
|
12
|
+
require 'scbi_fasta'
|
13
|
+
|
14
|
+
###############################################################################################
|
15
|
+
## METHODS
|
16
|
+
###############################################################################################
|
17
|
+
def read_fasta(input_fasta)
|
18
|
+
fasta = []
|
19
|
+
fasta_file = FastaQualFile.new(input_fasta,'').each do |name, seq, qual|
|
20
|
+
if seq.downcase.count('n') == seq.length
|
21
|
+
STDERR.puts "Sequence #{name} is full of Ns. Skipped"
|
22
|
+
else
|
23
|
+
fasta << [name, seq]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
return fasta
|
27
|
+
end
|
28
|
+
|
29
|
+
def split_fasta(input_fasta, output_folder, n_files, chunk_size)
|
30
|
+
fasta = read_fasta(input_fasta)
|
31
|
+
n_seqs = fasta.length
|
32
|
+
fasta.sort!{|s1, s2| s1.last.length <=> s2.last.length }
|
33
|
+
file_names = []
|
34
|
+
files = []
|
35
|
+
n_files.times do |i|
|
36
|
+
file_name = "ref#{i}.fasta"
|
37
|
+
file_names << file_name
|
38
|
+
(chunk_size -1 ).times do
|
39
|
+
file_names << :data_void # This fills file_names with void elements to sync a file name for worker when it does the chunk size loop
|
40
|
+
end
|
41
|
+
files << File.open(File.join(output_folder, file_name), 'w')
|
42
|
+
end
|
43
|
+
count = 0
|
44
|
+
while !fasta.empty?
|
45
|
+
files[count].puts '>' + fasta.shift.join("\n")
|
46
|
+
files[count].puts '>' + fasta.pop.join("\n") if !fasta.empty?
|
47
|
+
count += 1
|
48
|
+
count = 0 if count == n_files
|
49
|
+
end
|
50
|
+
files.map{|file| file.close }
|
51
|
+
return file_names, n_seqs
|
52
|
+
end
|
10
53
|
|
11
54
|
###############################################################################################
|
12
55
|
# PARSE OPTIONS
|
@@ -122,7 +165,7 @@ optparse = OptionParser.new do |opts|
|
|
122
165
|
options[:user_db] = nil
|
123
166
|
opts.on( '-u', '--user_db UserDB', 'User blast+ database' ) do |db|
|
124
167
|
options[:user_db] = db
|
125
|
-
if !File.exists?(File.expand_path(
|
168
|
+
if !File.exists?(File.expand_path(db+'.psq'))
|
126
169
|
puts "user database: #{options[:user_db]} was not found"
|
127
170
|
exit
|
128
171
|
end
|
@@ -158,6 +201,16 @@ optparse = OptionParser.new do |opts|
|
|
158
201
|
options[:hdd] = TRUE
|
159
202
|
end
|
160
203
|
|
204
|
+
|
205
|
+
options[:files2map] = []
|
206
|
+
opts.on('-M', '--files2map STRING', 'Fastq files to map against analysed transcriptome This must be a comma separated string with the full paths to the files' ) do |files2map|
|
207
|
+
options[:files2map] = files2map.split(';').map{|map_files| map_files.split(',')}
|
208
|
+
end
|
209
|
+
|
210
|
+
options[:remove_unmapped] = TRUE
|
211
|
+
opts.on('-R', '--remove_unmapped', 'When fastq files are provided, all sequences without at least a read pair are removed. When this option is enabled this filtering is disabled' ) do
|
212
|
+
options[:remove_unmapped] = FALSE
|
213
|
+
end
|
161
214
|
|
162
215
|
# Set a banner, displayed at the top of the help screen.
|
163
216
|
opts.banner = "\nUsage: full_lengther_next -f input.fasta -g [fungi|human|invertebrates|mammals|plants|rodents|vertebrates] [options]\n\n"
|
@@ -188,8 +241,14 @@ else
|
|
188
241
|
FULL_LENGTHER_NEXT_INIT=File.join(ROOT_PATH,'init_env')
|
189
242
|
end
|
190
243
|
|
191
|
-
if
|
192
|
-
|
244
|
+
if ENV['FLN_TEMP']
|
245
|
+
options[:temp] = File.join(ENV['FLN_TEMP'], 'temp')
|
246
|
+
else
|
247
|
+
options[:temp] = File.join(Dir.pwd, 'temp')
|
248
|
+
end
|
249
|
+
|
250
|
+
if !File.exists?(options[:temp])
|
251
|
+
Dir.mkdir(options[:temp])
|
193
252
|
end
|
194
253
|
|
195
254
|
if ENV['BLASTDB'] && File.exists?(ENV['BLASTDB'])
|
@@ -226,11 +285,28 @@ require 'scbi_mapreduce'
|
|
226
285
|
require 'my_worker_manager_fln' #First server
|
227
286
|
require 'reptrans'
|
228
287
|
|
288
|
+
require 'go_methods'
|
289
|
+
require "benchmark"
|
290
|
+
|
291
|
+
#Benchmark.bm do |x|
|
292
|
+
# x.report('main'){
|
293
|
+
options[:ref_files] = []
|
294
|
+
if !options[:files2map].empty? # Mapping
|
295
|
+
#$VERBOSE = true
|
296
|
+
temp = File.join(options[:temp], 'map')
|
297
|
+
options[:temp_map_folder] = temp
|
298
|
+
FileUtils.mkdir(temp) if !Dir.exists?(temp)
|
299
|
+
map_workers = options[:workers]
|
300
|
+
map_workers = options[:workers].length if options[:workers].class == Array
|
301
|
+
options[:ref_files], options[:n_refs] = split_fasta(options[:fasta], temp, map_workers-1, options[:chunk_size])
|
302
|
+
|
303
|
+
end
|
304
|
+
|
229
305
|
$LOG = Logger.new(STDOUT)
|
230
306
|
$LOG.datetime_format = "%Y-%m-%d %H:%M:%S"
|
231
307
|
|
232
308
|
main_path = File.dirname(ROOT_PATH)
|
233
|
-
custom_worker_file = File.join(main_path, 'lib','full_lengther_next','
|
309
|
+
custom_worker_file = File.join(main_path, 'lib','full_lengther_next','my_worker.rb')
|
234
310
|
|
235
311
|
$LOG.info 'Starting server'
|
236
312
|
# initialize work manager (open files, etc)
|
@@ -243,11 +319,14 @@ $LOG.info 'Starting server'
|
|
243
319
|
# launch server
|
244
320
|
server.start_server
|
245
321
|
$LOG.info 'Closing server'
|
322
|
+
seqs_annotation_prot, seqs_some_coding,seqs_unknown = MyWorkerManagerFln.get_annotations()
|
323
|
+
|
246
324
|
|
247
325
|
if !options[:reptrans].nil?
|
248
|
-
seqs_annotation_prot, seqs_some_coding ,seqs_unknown= MyWorkerManagerFln.get_annotations()
|
249
326
|
reptrans(seqs_annotation_prot, seqs_some_coding ,seqs_unknown, options)
|
250
327
|
end
|
251
328
|
puts "\nGracias por utilizar Full-LengtherNEXT"
|
252
329
|
|
253
330
|
|
331
|
+
#} #Bench
|
332
|
+
#end #Bench
|
data/bin/make_user_db.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Script to create your own Full-LengtherNext User database.
|
5
5
|
|
6
6
|
ROOT_PATH=File.dirname(__FILE__)
|
7
|
-
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next
|
7
|
+
$: << File.expand_path(File.join(ROOT_PATH, "../lib/full_lengther_next"))
|
8
8
|
|
9
9
|
require 'cdhit'
|
10
10
|
require 'handle_db'
|
@@ -48,7 +48,7 @@ optparse = OptionParser.new do |opts|
|
|
48
48
|
opts.on( '-u', '--file String', 'Uniprot DBs to taxon search. Posible options: human, fungi, invertebrates, mammals, plants, rodents, vertebrates.') do |uniprot_div|
|
49
49
|
if !divs.include?(uniprot_div)
|
50
50
|
puts 'This uniprot division not exists:', uniprot_div
|
51
|
-
|
51
|
+
Process.exit
|
52
52
|
end
|
53
53
|
options[:uniprot_div] = uniprot_div
|
54
54
|
end
|
@@ -58,6 +58,11 @@ optparse = OptionParser.new do |opts|
|
|
58
58
|
options[:taxon] = taxon
|
59
59
|
end
|
60
60
|
|
61
|
+
options[:name] = nil
|
62
|
+
opts.on( '-n', '--name STRING', 'Database name in case the creation of a local DB') do |name|
|
63
|
+
options[:name] = name
|
64
|
+
end
|
65
|
+
|
61
66
|
options[:local] = FALSE
|
62
67
|
opts.on( '-l', '--local', 'Only parse downloaded files without download them again') do
|
63
68
|
options[:local] = TRUE
|
@@ -95,7 +100,7 @@ if options[:user_fasta].nil?
|
|
95
100
|
puts 'Taxon or uniprot division was not specified'
|
96
101
|
Process.exit(-1)
|
97
102
|
end
|
98
|
-
elsif !File.exists?(options[:user_fasta])
|
103
|
+
elsif !File.exists?(options[:user_fasta]) && options[:taxon].nil?
|
99
104
|
puts 'User fasta file not exists or taxon was not specified'
|
100
105
|
Process.exit(-1)
|
101
106
|
end
|
@@ -106,15 +111,18 @@ else # otherwise use ROOTPATH + DB
|
|
106
111
|
formatted_db_path = File.expand_path(File.join(ROOT_PATH, "blast_dbs"))
|
107
112
|
end
|
108
113
|
|
114
|
+
name_db = nil
|
109
115
|
if !options[:local]
|
110
116
|
user_db_folder = File.join(formatted_db_path, options[:taxon])
|
117
|
+
name_db = options[:taxon]
|
111
118
|
else
|
112
|
-
user_db_folder = File.join(Dir.pwd, options[:
|
119
|
+
user_db_folder = File.join(Dir.pwd, options[:name])
|
120
|
+
name_db = options[:name]
|
113
121
|
end
|
114
122
|
|
115
123
|
user_db_folder.gsub!(' ', '_')
|
116
124
|
Dir.mkdir(user_db_folder) if !File.exists?(user_db_folder)
|
117
|
-
output_file_path = File.join(user_db_folder,
|
125
|
+
output_file_path = File.join(user_db_folder, name_db)
|
118
126
|
output_file_path.gsub!(' ', '_')
|
119
127
|
|
120
128
|
seqs = ''
|
data/bin/setup
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'full_lengther_next/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "full_lengther_next"
|
8
|
+
spec.version = FullLengtherNext::VERSION
|
9
|
+
spec.authors = ['Pedro Seoane', 'Noe Fernandez', 'Dario Guerrero']
|
10
|
+
spec.email = ['seoanezonjic@hotmail.com', 'noeisneo@gmail.com', 'dariogf@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = %q{Tool to annotate transcriptomes and it is able to stablish the integrity of each transcript. Also, FLN can detect novel genes on a target organism. }
|
13
|
+
spec.description = %q{FULL-LENGTHERNEXT is a tool adapted to NGS technologies, able to work in parallel and in a distributed way to minimise computing time. It is able to classify unigenes to full-length, 5’-end, 3’-end and internal, suggesting which unknown genes are coding or not. It will be also shown that FULL-LENGTHERNEXT fixes frame shifts, one of the main mistake found in wrong entries of full-length sequences databases, and it is a fast tool to compare different transcriptome assemblies.}
|
14
|
+
spec.homepage = "https://github.com/seoanezonjic"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "bin"
|
27
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_runtime_dependency 'xml-simple'
|
31
|
+
spec.add_runtime_dependency 'scbi_fasta'
|
32
|
+
spec.add_runtime_dependency 'scbi_blast'
|
33
|
+
spec.add_runtime_dependency 'scbi_mapreduce'
|
34
|
+
spec.add_runtime_dependency 'scbi_zcat'
|
35
|
+
spec.add_runtime_dependency 'bio-cd-hit-report'
|
36
|
+
spec.add_runtime_dependency 'report_html'
|
37
|
+
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
end
|