NAME

Prospect::Thread - Representation of a Prospect thread.

$Id: Thread.pm,v 1.26 2003/11/04 01:01:32 cavs Exp $

SYNOPSIS

my $in = new IO::File $ARGV[0] or die( "can't open $ARGV[0] for reading" );
my $out = new IO::File ">$ARGV[1]" or die( "can't open $ARGV[1] for writing" );
my $xml = '';
while(<$in>) { $xml .= $_; }
close($in);
my $t = new Prospect::Thread( $xml );
print "tseq: " . $t->tseq() . "\n";
print "qseq: " . $t->qseq() . "\n";
print "raw: " . $t->raw_score() . "\n";
print "svm: " . $t->svm_score() . "\n";
print "align: " . $t->alignment() . "\n";
$t->write_xml( $out );
exit(0);

DESCRIPTION

Prospect::Thread -- Representation of a full Prospect thread this is really just a set of methods associated with the hash structure returned by XML::Simple.

METHODS

new()

Name: new()
Purpose: return Thread object
Arguments: Prospect XML string
Returns: Prospect::Thread

qname()

Name: qname()
Purpose: return the name of the query sequence
Arguments: none
Returns: string

qseq()

Name: qseq()
Purpose: return the query sequence
Arguments: none
Returns: string

qseq_align()

Name: qseq_align()
Purpose: return the aligned query sequence
Arguments: none
Returns: string

qss()

Name: qss()
Purpose: return the secondary structure of the aligned query sequence
Arguments: none
Returns: string

qlen()

Name: qlen()
Purpose: return the length of the query sequence
Arguments: none
Returns: integer

qstart()

Name: qstart()
Purpose: return the start of the alignment on the query sequence
Arguments: none
Returns: integer

qend()

Name: qend()
Purpose: return the end of the alignment on the query sequence
Arguments: none
Returns: integer

target_start()

Name: target_start()
Purpose: return the start position of the query sequence
Arguments: none
Returns: integer

target_end()

Name: target_end()
Purpose: return the end position of the query sequence
Arguments: none
Returns: integer

tname()

Name: tname()
Purpose: return the name of the template sequence
Arguments: none
Returns: string

pdbcode()

Name: pdbcode()
Purpose: return the PDB id
Arguments: none
Returns: string

tseq()

Name: tseq()
Purpose: return the template sequence
Arguments: none
Returns: string

tseq_align()

Name: tseq_align()
Purpose: return the aligned template sequence
Arguments: none
Returns: string

tss()

Name: tss()
Purpose: return the secondary structure of the aligned template sequence
Arguments: none
Returns: string

tlen()

Name: tlen()
Purpose: return the length of the template sequence
Arguments: none
Returns: integer

tstart()

Name: tstart()
Purpose: return the start of the alignment on the template sequence.
CURRENTLY, tstart and template_start are the same. Because the
template residue numbering is not necessarily sequential (due
to missing residues in the structure), I would need
to parse the template xml files to correctly handle the
tstart value.
Arguments: none
Returns: integer

tend()

Name: tend()
Purpose: return the end of the alignment on the template sequence.
CURRENTLY, tend and template_start are the same. Because the
template residue numbering is not necessarily sequential (due
to missing residues in the structure), I would need
to parse the template xml files to correctly handle the
tend value.
Arguments: none
Returns: integer

template_start()

Name: template_start()
Purpose: return the start position of the template sequence
Arguments: none
Returns: integer

target_end()

Name: target_end()
Purpose: return the end position of the template sequence
Arguments: none
Returns: integer

isGlobal()

Name: isGlobal()
Purpose: return whether the alignment is global (1) or local (0)
Arguments: none
Returns: integer

raw_align()

Name: align()
Purpose: return the raw alignment from the prospect output
Arguments: none
Returns: string

align_len()

Name: align_len()
Purpose: return the alignment length
Arguments: none
Returns: float

identities()

Name: identities()
Purpose: return the number of identities
Arguments: none
Returns: float

svm_score()

Name: svm_score()
Purpose: get/set the svm score
Arguments: none
Returns: float

raw_score()

Name: raw_score()
Purpose: return the raw score
Arguments: none
Returns: float

gap_score()

Name: gap_score()
Purpose: return the gap score
Arguments: none
Returns: float

mutation_score()

Name: mutation_score()
Purpose: return the mutation score
Arguments: none
Returns: float

ssfit_score()

Name: ssfit_score()
Purpose: return the ssfit score
Arguments: none
Returns: float

pair_score()

Name: pair_score()
Purpose: return the pairwise score
Arguments: none
Returns: float

singleton_score()

Name: singleton_score()
Purpose: return the singletonwise score
Arguments: none
Returns: float

rgyr()

Name: rgyr()
Purpose: return the radius of gyration
Arguments: none
Returns: float

alignment()

Name: alignment()
Purpose: return the threading alignment as a set of line-wrapped rows.
Arguments: query tag (optional), template tag (optional), width (optional)
Returns: string

write_xml()

Name: write_xml()
Purpose: output the xml to a file
Arguments: IO::File object
Returns: none

output_rasmol_script()

Name: output_rasmol_script
Purpose: return a rasmol script for displaying a threaded structure
Arguments: Bio::Structure::IO::Entry object
Returns: rasmol script

thread_structure()

Name: thread_structure
Purpose: modify a Bio::Structure::IO::Entry object to reflect a prospect
threading alignment
Arguments: Prospect::Thread object, Bio::Structure::IO::Entry object
Returns: nada

get_mismatches()

Name: get_mismatches
Purpose: return array of mismatches
Argument: nada
Returns: array of residue ids

get_similarities()

Name: get_similarities
Purpose: return array of similarities
Argument: nada
Returns: array of residue ids

get_deletions()

Name: get_deletions
Purpose: return array of deletions
Argument: nada
Returns: array of residue ids

get_inserts()

Name: get_inserts
Purpose: return array of inserts
Argument: nada
Returns: array of residue ids

get_inserts()

Name: get_inserted_residues
Purpose: return identities of inserted residues
Argument: position of insert
Returns: array of residue ids

get_identities()

Name: get_identities
Purpose: return array of identities
Argument: nada
Returns: array of residue ids

_add_similarity()

Name: _add_similarity
Purpose: add residue id to list of similarities
Arguments: residue id
Returns: nada

_add_mismatch()

Name: _add_mismatch
Purpose: add residue id to list of mismatches
Arguments: residue id
Returns: nada

_add_deletion()

Name: _add_deletion
Purpose: add residue id to list of deletions
Arguments: residue id
Returns: nada

_add_insert($$;@)

Name: _add_insert
Purpose: add residue id to list of inserts
Arguments: template residue id at which insert occurs
optional: inserted query residues
Returns: nada

_add_identity()

Name: _add_identity
Purpose: add residue id to list of identities
Arguments: residue id
Returns: nada

_a_to_aaa_code()

Name: _a_to_aaa_code
Purpose: convert a single amino acid code (e.g. W) to its three letter
amino acid code (e.g. TRP)
Arguments: single amino acid code
Returns: triple amino acid code

_format_select()

Name: _format_select
Purpose: handle the rasmol buffer limit
Arguments: array of ids to select
Returns: rasmol select statement

_parse_xml_file()

Name: _parse_xml_file()
Purpose: parse the input XML file.
Arguments: [self]
Returns: self