<commit_before>#
# bio/appl/targetp/report.rb - TargetP report class
# 
#   Copyright (C) 2003 <NAME> <<EMAIL>>
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this library; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
#  $Id: report.rb,v 1.2 2003/02/25 15:44:18 k Exp $
#

module Bio

  class TargetP

    class Report

      DELIMITER = "\n \n"

      def initialize(str)
	@version                  = nil
	@query_sequences          = nil
	@cleavage_site_prediction = nil
	@networks                 = nil
	@prediction               = {}
	@cutoff                   = {}
	parse_entry(str)
      end

      attr_reader :version, :query_sequences, 
	:cleavage_site_prediction, :networks,
	:query_len, :prediction, 
	:cutoff,
	:loc, :rc

      alias :pred   :prediction

      def name
	@prediction['Name']
      end
      alias :entry_id :name 

      def query_len
	if @prediction['Len']
	  @prediction['Len']
	else
	  @prediction['Length']
	end
      end
      alias :length :query_len

      def loc
	if @prediction['Loc'] <commit_msg>* fixed to suppress warnings<commit_after>#
# bio/appl/targetp/report.rb - TargetP report class
# 
#   Copyright (C) 2003 <NAME> <<EMAIL>>
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this library; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
#  $Id: report.rb,v 1.3 2003/02/26 01:54:03 k Exp $
#

module Bio

  class TargetP

    class Report

      DELIMITER = "\n \n"

      def initialize(str)
	@version                  = nil
	@query_sequences          = nil
	@cleavage_site_prediction = nil
	@networks                 = nil
	@prediction               = {}
	@cutoff                   = {}
	parse_entry(str)
      end

      attr_reader :version, :query_sequences, 
	:cleavage_site_prediction, :networks,
	:prediction, :cutoff

      alias :pred   :prediction

      def name
	@prediction['Name']
      end
      alias :entry_id :name 

      def query_len
	if @prediction['Len']
	  @prediction['Len']
	else
	  @prediction['Length']
	end
      end
      alias :length :query_len

      def loc
	if @prediction['Loc'] 
{'fraction_non_alphanumeric': 0.08295625942684766, 'fraction_numerical': 0.021116138763197588, 'mean_word_length': 2.7216610549943883, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3926586', 'n_tokens_mistral': 1080, 'n_tokens_neox': 990, 'n_words': 385}