[med-svn] [Git][med-team/trnascan-se][upstream] New upstream version 2.0.6+ds
Nilesh Patra
gitlab at salsa.debian.org
Thu Sep 24 20:19:02 BST 2020
Nilesh Patra pushed to branch upstream at Debian Med / trnascan-se
Commits:
6c42e5bd by Nilesh Patra at 2020-09-25T00:16:19+05:30
New upstream version 2.0.6+ds
- - - - -
12 changed files:
- README
- lib/models/TRNAinf-arch-iso
- lib/models/TRNAinf-arch-iso.i1f
- lib/models/TRNAinf-arch-iso.i1i
- lib/models/TRNAinf-arch-iso.i1m
- lib/models/TRNAinf-arch-iso.i1p
- lib/tRNAscanSE/CM.pm
- + lib/tRNAscanSE/Constants.pm
- lib/tRNAscanSE/ResultFileReader.pm
- lib/tRNAscanSE/Sequence.pm
- lib/tRNAscanSE/tRNA.pm
- tRNAscan-SE.src
Changes:
=====================================
README
=====================================
@@ -5,7 +5,7 @@ Patricia Chan, Brian Lin, and Todd Lowe
School of Engineering, University of California, Santa Cruz, CA
--------------------------------------------------------------
-Current release: 2.0.4 (September 2019)
+Current release: 2.0.6 (May 2020)
tRNAscan-SE was written in the PERL (version 5) script language.
Input consists of DNA or RNA sequences in FASTA format. tRNA
=====================================
lib/models/TRNAinf-arch-iso
=====================================
The diff for this file was not included because it is too large.
=====================================
lib/models/TRNAinf-arch-iso.i1f
=====================================
Binary files a/lib/models/TRNAinf-arch-iso.i1f and b/lib/models/TRNAinf-arch-iso.i1f differ
=====================================
lib/models/TRNAinf-arch-iso.i1i
=====================================
Binary files a/lib/models/TRNAinf-arch-iso.i1i and b/lib/models/TRNAinf-arch-iso.i1i differ
=====================================
lib/models/TRNAinf-arch-iso.i1m
=====================================
Binary files a/lib/models/TRNAinf-arch-iso.i1m and b/lib/models/TRNAinf-arch-iso.i1m differ
=====================================
lib/models/TRNAinf-arch-iso.i1p
=====================================
Binary files a/lib/models/TRNAinf-arch-iso.i1p and b/lib/models/TRNAinf-arch-iso.i1p differ
=====================================
lib/tRNAscanSE/CM.pm
=====================================
@@ -3,7 +3,7 @@
#
# --------------------------------------------------------------
# This module is part of the tRNAscan-SE program.
-# Copyright (C) 2017 Patricia Chan and Todd Lowe
+# Copyright (C) 2020 Patricia Chan and Todd Lowe
# --------------------------------------------------------------
#
@@ -992,7 +992,7 @@ sub decode_nci_tRNA_properties
for (my $i = 0; $i < scalar(@introns); $i++)
{
- if ($acodon_index > $introns[$i]->{rel_start})
+ if ($acodon_index >= $introns[$i]->{rel_start})
{
$acodon_index += ($introns[$i]->{rel_end} - $introns[$i]->{rel_start} + 1);
}
=====================================
lib/tRNAscanSE/Constants.pm
=====================================
@@ -0,0 +1,105 @@
+# tRNAscanSE/Constants.pm
+# This class defines global constants used in tRNAscan-SE.
+#
+# --------------------------------------------------------------
+# This module is part of the tRNAscan-SE program.
+# Copyright (C) 2017 Patricia Chan and Todd Lowe
+# --------------------------------------------------------------
+#
+
+package tRNAscanSE::Constants;
+
+use strict;
+use tRNAscanSE::Utils;
+
+sub new {
+ my $class = shift;
+ my $self = {};
+
+ initialize($self);
+
+ bless ($self, $class);
+ return $self;
+}
+
+sub DESTROY
+{
+ my $self = shift;
+}
+
+sub initialize
+{
+ my $self = shift;
+
+ $self->{REALLY_BIG_NUMBER} = 1000000000; # largest sequence length imaginable
+
+ # Source of first-pass hits table
+ # C = Cove, T = tRNAscan, E = EufindtRNA, B = both
+
+ my @source_tab = ('Cv', 'Ts', 'Eu', 'Bo');
+ $self->{source_tab} = \@source_tab;
+
+ $self->{upstream_len} = 60;
+ $self->{downstream_len} = 60;
+}
+
+sub REALLY_BIG_NUMBER
+{
+ my $self = shift;
+ return $self->{REALLY_BIG_NUMBER};
+}
+
+sub source_tab
+{
+ my $self = shift;
+ return $self->{source_tab};
+}
+
+sub upstream_len
+{
+ my $self = shift;
+ return $self->{upstream_len};
+}
+
+sub downstream_len
+{
+ my $self = shift;
+ return $self->{downstream_len};
+}
+
+sub set_temp_file_names
+{
+ my $self = shift;
+ my $temp_dir = shift;
+
+ $self->{tmp_raw} = &tempname($temp_dir, ".raw"); # for raw tscan output
+ $self->{tmp_fa} = &tempname($temp_dir, ".fa"); # for current fasta seq file
+ $self->{tmp_trnaseq_file} = &tempname($temp_dir, ".trna"); # for current tRNA seq
+ $self->{tmp_masked_fa} = &tempname($temp_dir, ".masked.fa"); # for current tRNA seq
+}
+
+sub tmp_raw
+{
+ my $self = shift;
+ return $self->{tmp_raw};
+}
+
+sub tmp_fa
+{
+ my $self = shift;
+ return $self->{tmp_fa};
+}
+
+sub tmp_trnaseq_file
+{
+ my $self = shift;
+ return $self->{tmp_trnaseq_file};
+}
+
+sub tmp_masked_fa
+{
+ my $self = shift;
+ return $self->{tmp_masked_fa};
+}
+
+1;
=====================================
lib/tRNAscanSE/ResultFileReader.pm
=====================================
@@ -16,7 +16,7 @@ use tRNAscanSE::LogFile;
require Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(read_out_file read_ss_file read_sprinzl_pos_map read_noncanomical);
+our @EXPORT = qw(read_out_file read_ss_file read_sprinzl_pos_map read_noncanomical read_name_map);
sub read_out_file
{
@@ -226,39 +226,63 @@ sub read_ss_file
my $tRNA = undef;
my $intron = {};
my $line = "";
- my ($startpos, $endpos);
+ my ($startpos, $endpos, $coords);
$log->status("Reading tRNAs from $file");
open(SSFILE, "$file") || die "Error: Fail to open $file\n";
while ($line = <SSFILE>)
{
- if ($line =~ /^(\S+)\s+\((\d+)\-(\d+)\)\s+Length:\s(\d+)\sbp/)
+ if ($line =~ /^(\S+)\s+\((\S+)\)\s+Length:\s(\d+)\sbp/)
{
if (defined $tRNA and $tRNA->tRNAscan_id() ne "")
{
$tRNA->set_mature_tRNA();
$tRNAs->put($tRNA);
}
+ my $id = $1;
+ $coords = $2;
$tRNA = tRNAscanSE::tRNA->new;
$tRNA->tRNAscan_id($1);
- $startpos = $2;
- $endpos = $3;
$tRNA->seqname(substr($tRNA->tRNAscan_id(), 0, rindex($tRNA->tRNAscan_id(), ".")));
- if ($startpos < $endpos)
+ if (index($coords, ",") == -1)
{
- $tRNA->start($startpos);
- $tRNA->end($endpos);
- $tRNA->strand("+");
+ ($startpos, $endpos) = split(/-/, $coords);
+ if ($startpos < $endpos)
+ {
+ $tRNA->start($startpos);
+ $tRNA->end($endpos);
+ $tRNA->strand("+");
+ }
+ else
+ {
+ $tRNA->end($startpos);
+ $tRNA->start($endpos);
+ $tRNA->strand("-");
+ }
}
else
{
- $tRNA->end($startpos);
- $tRNA->start($endpos);
- $tRNA->strand("-");
+ my @loci = split(/\,/, $coords);
+ for (my $exon_count = 0; $exon_count < scalar(@loci); $exon_count++)
+ {
+ ($startpos, $endpos) = split(/-/, $loci[$exon_count]);
+ if ($startpos < $endpos)
+ {
+ $tRNA->exon_start($exon_count+1, $startpos);
+ $tRNA->exon_end($exon_count+1, $endpos);
+ $tRNA->exon_strand($exon_count+1, "+");
+ }
+ else
+ {
+ $tRNA->exon_end($exon_count+1, $startpos);
+ $tRNA->exon_start($exon_count+1, $endpos);
+ $tRNA->exon_strand($exon_count+1, "-");
+ }
+ }
}
if ($tRNA->seqname() eq "chrM" or $tRNA->seqname() eq "M" or $tRNA->seqname() eq "chrMT" or $tRNA->seqname() eq "MT")
{
- $tRNA->category("mt");
+ $tRNA->category("mito");
}
else
{
@@ -280,30 +304,34 @@ sub read_ss_file
}
$tRNA->score($5);
$tRNA->set_domain_model("infernal", $tRNA->score());
+ my $frag = index($tRNA->isotype(), "-exon");
+ if ($frag > -1)
+ {
+ $tRNA->isotype(substr($tRNA->isotype(), 0, $frag));
+ }
$tRNA->tRNAscan_id($tRNA->tRNAscan_id()."-".$tRNA->isotype().$tRNA->anticodon());
+ $tRNA->gtrnadb_id($tRNA->tRNAscan_id());
if ($tRNA->isotype() eq "Undet")
{
- $tRNA->category("und");
+ $tRNA->category("undetermined_ac");
}
}
elsif ($line =~ /^HMM Sc=(\S+)\s+Sec struct Sc=(\S+)/)
{
- my $inf_score = $3;
$tRNA->hmm_score($1);
$tRNA->ss_score($2);
- $tRNA->update_domain_model("infernal", $inf_score, $inf_score, $tRNA->hmm_score(), $tRNA->ss_score());
+ $tRNA->update_domain_model("infernal", $tRNA->score(), $tRNA->score(), $tRNA->hmm_score(), $tRNA->ss_score());
}
- elsif ($line =~ /^Possible pseudogene:\s+HMM Sc=(\S+)\s+Sec struct Sc=(\S+)/)
+ elsif ($line =~ /pseudogene:\s+HMM Sc=(\S+)\s+Sec struct Sc=(\S+)/)
{
- my $inf_score = $3;
$tRNA->hmm_score($1);
$tRNA->ss_score($2);
- $tRNA->update_domain_model("infernal", $inf_score, $inf_score, $tRNA->hmm_score(), $tRNA->ss_score());
+ $tRNA->update_domain_model("infernal", $tRNA->score(), $tRNA->score(), $tRNA->hmm_score(), $tRNA->ss_score());
$tRNA->pseudo(1);
}
elsif ($line =~ /^Possible intron: (\d+)-(\d+) \((\d+)-(\d+)\)/)
{
- $tRNA->add_intron($1, $2, $3, $4, "");
+ $tRNA->add_intron($1, $2, $3, $4, "", "");
}
elsif ($line =~ /^Seq:\s(\S+)$/)
{
@@ -436,4 +464,36 @@ sub read_noncanomical
close(FILE_IN);
}
+sub read_name_map
+{
+ my ($global_vars, $file) = @_;
+ my $log = $global_vars->{log_file};
+ my $tRNAs = $global_vars->{tRNAs};
+ my $line = "";
+ my @columns = ();
+ my $index = -1;
+
+ $tRNAs->sort_array("tRNAscanid");
+
+ $log->status("Reading GtRNAdb name map from $file");
+ open(FILE_IN, "$file") or die "Fail to open $file\n";
+
+ $line = <FILE_IN>;
+ chomp($line);
+ my @header = split(/\t/, $line);
+
+ while ($line = <FILE_IN>)
+ {
+ chomp($line);
+ @columns = split(/\t/, $line, -1);
+ $index = $tRNAs->bsearch_id($columns[0], "tRNAscanid");
+ if ($index > -1)
+ {
+ $tRNAs->get($index)->gtrnadb_id($columns[1]);
+ }
+ }
+
+ close(FILE_IN);
+}
+
1;
=====================================
lib/tRNAscanSE/Sequence.pm
=====================================
@@ -3,12 +3,9 @@
#
# --------------------------------------------------------------
# This module is part of the tRNAscan-SE program.
-# Copyright (C) 2017 Patricia Chan and Todd Lowe
+# Copyright (C) 2020 Patricia Chan and Todd Lowe
# --------------------------------------------------------------
#
-# Perl code for reading FASTA-formatted sequence files
-# SRE, Sat Feb 19 19:10:43 1994
-
# These subroutines read a FASTA formatted file one sequence at a time.
# Open(filename, open_mode) opens a file for reading or wrting.
# Close() closes it when you're done.
@@ -21,7 +18,6 @@
# $seq_length = length of sequence
# $sequence = sequence, gaps and newlines removed
#
-# Modified by TMJL 11/95 for use in tRNAscan-SE
package tRNAscanSE::Sequence;
@@ -416,7 +412,14 @@ sub read_fasta_subseq
$seqlen += length($self->{saved_line});
}
- $self->{sequence} = substr($tempseq, 0, $subseq_len);
+ if ($seqlen < $subseq_len)
+ {
+ $self->{sequence} = substr($tempseq, 0, $seqlen);
+ }
+ else
+ {
+ $self->{sequence} = substr($tempseq, 0, $subseq_len);
+ }
$self->{sequence} = uc($self->{sequence});
$self->{sequence} =~ s/U/T/g;
@@ -497,7 +500,14 @@ sub read_fasta_subseq_slow
$seqlen += length($self->{saved_line});
}
- $self->{sequence} = substr($tempseq, 0, $subseq_len);
+ if ($seqlen < $subseq_len)
+ {
+ $self->{sequence} = substr($tempseq, 0, $seqlen);
+ }
+ else
+ {
+ $self->{sequence} = substr($tempseq, 0, $subseq_len);
+ }
$self->{sequence} = uc($self->{sequence});
$self->{sequence} =~ s/U/T/g;
=====================================
lib/tRNAscanSE/tRNA.pm
=====================================
@@ -571,7 +571,7 @@ sub get_intron
my $self = shift;
my $index = shift;
- if ($index >= 0 and $index < get_intron_count())
+ if ($index >= 0 and $index < $self->get_intron_count())
{
return $self->{data}->[_ar_introns]->[$index];
}
=====================================
tRNAscan-SE.src
=====================================
@@ -4,13 +4,13 @@
# tRNAscan-SE: a program for improved detection of transfer RNA
# genes in genomic sequence
#
-# Version 2.0.5
+# Version 2.0.6
#
-# Copyright (C) 2019 Patricia Chan and Todd Lowe
+# Copyright (C) 2020 Patricia Chan and Todd Lowe
#
# School of Engineering, University of California, Santa Cruz
-# lowe at soe.ucsc.edu
-# http://lowelab.ucsc.edu/
+# trna at soe.ucsc.edu
+# http://trna.ucsc.edu/
# --------------------------------------------------------------------
#
# Usage:
@@ -39,8 +39,8 @@ use tRNAscanSE::IntResultFile;
use tRNAscanSE::MultiResultFile;
use tRNAscanSE::SS;
-our $version = "2.0.5";
-our $release_date = "October 2019";
+our $version = "2.0.6";
+our $release_date = "May 2020";
our $program_id = "tRNAscan-SE-".$version;
# modified by 'make'
@@ -1531,10 +1531,10 @@ sub set_options
{
$opts->infernal_fp(0);
}
- elsif ($opt_mito)
- {
- $opt_mid = 0;
- }
+ elsif ($opt_mito)
+ {
+ $opt_mid = 0;
+ }
}
# set hmm filter flag for infernal
@@ -1879,8 +1879,8 @@ sub set_options
$cm->cm_cutoff($opt_score);
if ($opt_score < $cm->infernal_fp_cutoff())
{
- $cm->infernal_fp_cutoff($opt_score);
- }
+ $cm->infernal_fp_cutoff($opt_score);
+ }
}
if ($opt_thread != 999)
View it on GitLab: https://salsa.debian.org/med-team/trnascan-se/-/commit/6c42e5bd95f74f76af1498321a883cf9dd69abd7
--
View it on GitLab: https://salsa.debian.org/med-team/trnascan-se/-/commit/6c42e5bd95f74f76af1498321a883cf9dd69abd7
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200924/8afad5d9/attachment-0001.html>
More information about the debian-med-commit
mailing list