Commit 4bb57dfe authored by Steffen Möller's avatar Steffen Möller
Browse files

New upstream version 2.0.3

parent b12160d8
Loading
Loading
Loading
Loading
+24 −16
Original line number Diff line number Diff line
@@ -402,7 +402,14 @@ sub euk_anticodon_filter
	my ($ac_count, $tRNA) = @_;
	my $tag = "";
	
	if (!defined $euk_aa_list{$tRNA->anticodon()} and !$tRNA->is_pseudo())
	if (!$tRNA->is_pseudo())
	{
		if ($tRNA->isotype() eq "Sup")
		{
			$tag = "unexpected anticodon";
			$tRNA_counts{ac_filter}++;
		}		
		elsif (!defined $euk_aa_list{$tRNA->anticodon()})
		{
			my $alt_anticodon = $tRNA->anticodon();
			if (substr($tRNA->anticodon(), 0, 1) eq "A")
@@ -423,6 +430,7 @@ sub euk_anticodon_filter
				$tRNA_counts{ac_filter}++;
			}
		}
	}
	
	return $tag;
}
@@ -762,7 +770,7 @@ sub write_out_file
				elsif (!$tRNA->is_pseudo())
				{
					$include = 1;
					if ($columns[$header{note}] =~ /IPD/)
					if ($columns[$header{note}] =~ /IPD/ and $columns[$header{isotype}] ne "Sup")
					{
						$tRNA_counts{iso_filter}++;
						$tag = "isotype mismatch";
+2 −12
Original line number Diff line number Diff line
@@ -341,17 +341,7 @@ sub sort_by_tRNAscanid

sub sort_by_gtrnadb_id
{
	my $a_code = 0;
	my $b_code = 0;
	if ($a->gtrnadb_id() !~ /^tRNA/)
	{
		$a_code = 1;
	}
	if ($b->gtrnadb_id() !~ /^tRNA/)
	{
		$b_code = 1;
	}	
    return ($a_code <=> $b_code || $a->gtrnadb_id() cmp $b->gtrnadb_id()); 
    return ($a->gtrnadb_id() cmp $b->gtrnadb_id()); 
}

sub sort_by_extdb_id
+28 −3
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ sub initialize
    $self->{cmsearch_bin} = "cmsearch";
    $self->{cmscan_bin} = "cmscan";

    $self->{infernal_thread} = 0;
    $self->{infernal_thread} = -1;
    
    $self->{tab_results} = +[];
}
@@ -1242,6 +1242,14 @@ sub fix_fMet
                {
                    $trna->end($trna->end() + 1);
                }
                my @ar_ac_pos = $trna->ar_ac_pos();
                if (scalar(@ar_ac_pos) > 0)
                {
					$ar_ac_pos[0]->{rel_start} += 1;
                    $ar_ac_pos[0]->{rel_end} += 1;
                    $trna->ar_ac_pos(@ar_ac_pos);
				}
				
                $rescore = 1;
            }
            elsif (substr($trna->ss(), 0, 4) eq ".>.>" and substr($trna->seq(), 0, 2) eq "CG")
@@ -1267,6 +1275,13 @@ sub fix_fMet
                    {
                        $trna->end($trna->end() - 1);
                    }
                    my @ar_ac_pos = $trna->ar_ac_pos();
                    if (scalar(@ar_ac_pos) > 0)
                    {
                        $ar_ac_pos[0]->{rel_start} -= 1;
                        $ar_ac_pos[0]->{rel_end} -= 1;
                        $trna->ar_ac_pos(@ar_ac_pos);
                    }
                    $rescore = 1;
				}				
            }
@@ -1310,6 +1325,16 @@ sub fix_His
			$trna->ss(substr($trna->ss(), 1, 3).">".substr($trna->ss(), 5, length($trna->ss())-11)."<".substr($trna->ss(), length($trna->ss())-5, 3).".");
            $trna->start($trna->start() + 1);
            $trna->end($trna->end() - 1);
            my @ar_ac_pos = $trna->ar_ac_pos();
            if (scalar(@ar_ac_pos) > 0)
            {
                for (my $i = 0; $i < scalar(@ar_ac_pos); $i++)
                {
                    $ar_ac_pos[$i]->{rel_start} -= 1;
                    $ar_ac_pos[$i]->{rel_end} -= 1;
                }
                $trna->ar_ac_pos(@ar_ac_pos);
            }
            $self->rescore_tRNA($global_vars, $trna, $trna);
		}
	}
@@ -2281,7 +2306,7 @@ sub exec_cmscan
    {
        $cm_options = "-g --nohmm --notrunc";
    }
    if ($self->{infernal_thread} != 0)
    if ($self->{infernal_thread} != -1)
    {
		$cm_options .= " --cpu ".$self->{infernal_thread};
	}
@@ -2341,7 +2366,7 @@ sub exec_cmsearch
			$cm_options .= " -T ".$score_cutoff;
		}
	}
    if ($self->{infernal_thread} != 0)
    if ($self->{infernal_thread} != -1)
    {
		$cm_options .= " --cpu ".$self->{infernal_thread};
	}
+27 −0
Original line number Diff line number Diff line
@@ -312,6 +312,19 @@ sub output_tRNA
			{
				$tRNA->isotype($model);
			}
			elsif ($tRNA->isotype() eq "Met" and $type eq "cyto" and $model ne "Met" and $model ne "iMet" and $model ne "fMet")
			{
				$tRNA->sort_multi_models("model");
				my ($met_iso_model, $met_iso_score, $met_iso_ss) = $tRNA->get_model_hit("cyto", $tRNA->isotype());
				my ($ile2_iso_model, $ile2_iso_score, $ile2_iso_ss) = $tRNA->get_model_hit("cyto", "Ile2");
				if ($ile2_iso_score > 0 and $met_iso_score > 0)
				{
					if (($score - $ile2_iso_score) <= 5 and ($ile2_iso_score - $met_iso_score) >= 5 and $tRNA->score() > 50)
					{
						$tRNA->isotype("Ile2");
					}
				}
			}
			
			if (!$opts->results_to_stdout())
			{
@@ -1001,6 +1014,20 @@ sub write_bed
						$tRNA->isotype($model);
						$tRNA->tRNAscan_id($tRNA->seqname().".tRNA".$tRNA->id()."-".$tRNA->isotype().$tRNA->anticodon());
					}
					elsif ($tRNA->isotype() eq "Met" and $type eq "cyto" and $model ne "Met" and $model ne "iMet" and $model ne "fMet")
					{
						$tRNA->sort_multi_models("model");
						my ($met_iso_model, $met_iso_score, $met_iso_ss) = $tRNA->get_model_hit("cyto", $tRNA->isotype());
						my ($ile2_iso_model, $ile2_iso_score, $ile2_iso_ss) = $tRNA->get_model_hit("cyto", "Ile2");
						if ($ile2_iso_score > 0 and $met_iso_score > 0)
						{
							if (($score - $ile2_iso_score) <= 5 and ($ile2_iso_score - $met_iso_score) >= 5 and $tRNA->score() > 50)
							{
								$tRNA->isotype("Ile2");
								$tRNA->tRNAscan_id($tRNA->seqname().".tRNA".$tRNA->id()."-".$tRNA->isotype().$tRNA->anticodon());
							}
						}
					}
				}				
			}			
		
+9 −9
Original line number Diff line number Diff line
#! /usr/bin/perl
#! @PERL@
#
# --------------------------------------------------------------------
# tRNAscan-SE: a program for improved detection of transfer RNA
#              genes in genomic sequence
#
# Version 2.0
# Version 2.0.3
#
# Copyright (C) 2017 Patricia Chan and Todd Lowe 
# Copyright (C) 2019 Patricia Chan and Todd Lowe 
#
# School of Engineering, University of California, Santa Cruz
# lowe@soe.ucsc.edu
@@ -39,8 +39,8 @@ use tRNAscanSE::IntResultFile;
use tRNAscanSE::MultiResultFile;
use tRNAscanSE::SS;

our $version = "2.0"; 
our $release_date = "December 2017";
our $version = "2.0.3"; 
our $release_date = "April 2019";
our $program_id = "tRNAscan-SE-".$version;

# modified by 'make'
@@ -126,7 +126,7 @@ if (($stats->numscanned() == 0) && ($opts->eufind_mode() || $opts->tscan_mode()
    }
    else
    {
        die "\nFATAL: No sequences in FASTA format found in file ".$opts->fastafile()."\n\n";
        die "\nFATAL: No sequences in FASTA format found in file ".$opts->fasta_file()."\n\n";
    }
}

@@ -621,7 +621,7 @@ sub error_handler

sub display_credits
{
    print STDERR "Copyright (C) 2017 Patricia Chan and Todd Lowe\n",
    print STDERR "Copyright (C) 2019 Patricia Chan and Todd Lowe\n",
                 "                   University of California Santa Cruz\n",
                 "Freely distributed under the GNU General Public License (GPLv3)\n\n";
}
@@ -1881,9 +1881,9 @@ sub set_options
    
    if ($opt_thread != 999)
    {
		if ($opt_thread < 1)
		if ($opt_thread < 0)
        {
            die "FATAL: Number of threads for running Infernal must be at least 1.\n";
            die "FATAL: Number of threads for running Infernal must be at least 0.\n";
		}
        if ($opt_eufind || $opt_tscan || $opt_cove || $opt_legacy)
        {