Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/transrate/snap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class SnapError < TransrateError
class Snap

require 'bio'
require 'fileutils'

attr_reader :index_name, :bam, :read_count

Expand Down Expand Up @@ -138,10 +139,10 @@ def build_index file, threads
runner.run
if !runner.status.success?
err = runner.stderr
if err =~ /Ran out of overflow table namespace/ || err =~ /Trying to use too many overflow entries/
if err =~ /Ran out of overflow table namespace/ || err =~ /Trying to use too many overflow entries/ || err =~ /Genome is too big for 4 byte genome locations/
logger.warn "Snap index build failed with n = #{n} , increasing +1"
n += 1
Dir.delete(@index_name) if Dir.exist?(@index_name)
FileUtils.rm_rf(@index_name) if Dir.exist?(@index_name)
else
msg = "Failed to build Snap index\n#{runner.stderr}"
raise SnapError.new(msg)
Expand Down