Mercurial > repos > eschen42 > mqppep_preproc
changeset 18:196b84357e7e draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/mqppep commit 0577d987a208026d9fc94449595a6a1af18ce317"
author | eschen42 |
---|---|
date | Wed, 06 Apr 2022 16:14:08 +0000 |
parents | ba5f14c2a4af |
children | d7f27d0fca7e |
files | PhosphoPeptide_Upstream_Kinase_Mapping.pl macros.xml |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/PhosphoPeptide_Upstream_Kinase_Mapping.pl Wed Apr 06 05:47:34 2022 +0000 +++ b/PhosphoPeptide_Upstream_Kinase_Mapping.pl Wed Apr 06 16:14:08 2022 +0000 @@ -182,12 +182,14 @@ $s =~ s :^...::s; # s/[|]/\t/g; $s =~ s :[|]:\t:sg; - if ( !($s =~ m/ OS=/s) - && !($s =~ m/ OX=/s) + if ( !($s =~ m/ OX=/s) && !($s =~ m/ GN=/s) && !($s =~ m/ PE=/s) && !($s =~ m/ SV=/s) ) { + # OS= is used elsewhere, but it's not helpful without OX and GN + $s =~ s/OS=/OS /g; + # supply sensible default values $s .= "\tN/A\t-1\tN/A\tN/A\tN/A"; } else { # s/ OS=/\t/; @@ -529,7 +531,6 @@ my $wrd; while ( scalar @parsed_fasta > 0 ) { $database = $databases[$#parsed_fasta]; - #### print "parsed_fasta[-1]: " . $parsed_fasta[$#parsed_fasta] . "\n"; # row_string gets "UniProt_ID\tDescription\tOS\tOX\tGN\tPE\tSV\t" # 1 2 3 4 5 6 7 sequence database $row_string = pop(@parsed_fasta); @@ -537,6 +538,10 @@ if ((not exists($row[4])) || ($row[4] eq "")) { die("invalid fasta line\n$row_string\n"); }; + if ($row[4] eq "N/A") { + print "Organism_ID is 'N/A' for row $row_count:\n'$row_string'\n"; + $row[4] = -1; + }; for $i (1..3,5..8) { #BIND print "bind_param $i, $row[$i]\n"; $stmth->bind_param($i, $row[$i]);