Skip to content

Commit

Permalink
allow issues with soure data, process descriptions properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrego committed Oct 6, 2023
1 parent de8ac68 commit addbac0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions core/jms-implementation/support-mini-x86-32/bin/pirsr/0.1/PIRSR.pm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ sub process_templates {


} else {
die "Failed to parse fasta block: \"$block\"\n";
warn ("Failed to parse fasta block: \"$block\"\n");
}
}

Expand Down Expand Up @@ -263,7 +263,9 @@ sub _parse_rules {
$group->{'label'} = $1;
$group->{'start'} = $2;
$group->{'end'} = $3;
$group->{'desc'} = $5;
my $desc = $5 // '';
$desc =~ s/^\s+|\s+$//g;
$group->{'desc'} = $desc;

} elsif ($line =~ /\AFT\s+Group\:\s+(\d+)\;\s+Condition\:\s+(.*)\z/) {

Expand All @@ -274,7 +276,9 @@ sub _parse_rules {

} elsif ($line =~ /\AFT\s+(.*)\z/) {

$group->{'desc'} .= " $1";
my $desc = $1 // '';
$desc =~ s/^\s+|\s+$//g;
$group->{'desc'} .= " $desc";

} else {
die "Failed to parse Group line: \"$line\"\n";
Expand Down Expand Up @@ -307,6 +311,12 @@ sub align_template {

my $prot_id = $rule->{'Feature'}->{'from'};

if (!$prot_id) {
warn ("No from template available for rule $rule->{AC}.") if ($self->verbose);
$rule->{'ignore'} = 1;
return $rule;
}

my $fasta_file = "$self->{data_folder}/sr_tp/${prot_id}.fa";

open (my $in, '<', "$fasta_file") or die "Failed top open $fasta_file file: $!\n";
Expand Down

0 comments on commit addbac0

Please sign in to comment.