will be stacked and offset for ease of visualization (much like a deck
of cards).
+=head1 FUTURE CHANGES
+
+Add the option to read in an extra column of gene symbols, if the
+user wishes to provide their own. Otherwise, continue to use the label
+prefix and auto-numbering suffix settings.
+
+Add a comment containing the NCBI species id of the new homolog (for
+the purpose of multi-species pathway comparison or host-pathogen
+interaction diagrams).
+
=head1 USAGE
pathway_gene_swapper.pl -i INPUT_FILE -g GENE_FILE -c CONFIG_FILE -o OUTPUT_FILE -L -v -G -d
# indexed by the id of the gene located in the <Xref> element for each
# node, and sub-indexed by the GraphId of each corresponding node
my %data_nodes_by_gene_id;
+
+ if ($verbose) {
+ print "[Original genes]\n";
+ }
# create a hash of all 5-digit hex ids in the gpml doc (this is the black list)
# one list of DataNode.GraphId, Group.GroupId, and Group.GraphId
for (@$data_nodes)
{
# print $_ . "\n"; # TEST
+
if ($_->getAttributeNode("GraphId"))
{
$existing_hex_ids{$_->getAttributeNode("GraphId")->getValue}
my $curr_xref_id = ($_->getElementsByTagName("Xref"))[0]
->getAttributeNode("ID")->getValue;
my $curr_graph_id = $_->getAttributeNode("GraphId")->getValue;
-
+
$curr_xref_id =~ s/\s+$//; # rtrim whitespace
$curr_xref_id =~ s/^\s+//; # ltrim whitespace
- #$curr_xref_id =~ s/^("|')("|')$//; # strip quotes - may not be necessary
+
+ if ($verbose) {
+ my $curr_text_label = $_->getAttributeNode('TextLabel')->getValue;
+ $curr_text_label =~ s/^\s+|\s+$//; # trim whitespace
+ print "$curr_text_label\t$curr_xref_id\n";
+ }
if (length($curr_xref_id) > 0)
{