annotate pmlst.pl @ 0:6dcb66689a7d draft default tip

Uploaded
author dcouvin
date Wed, 25 Aug 2021 21:12:34 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
1 #!/usr/bin/perl -w
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
2 use strict;
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
3 use warnings;
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
4
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
5 my $STpmlst = "";
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
6
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
7 my $path = $ARGV[0];
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
8 my $seq = $ARGV[1];
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
9 my $scheme = $ARGV[2];
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
10
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
11
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
12 open PMLST, "python3 $path/pmlst/pmlst.py -i $seq -s $scheme -p $path/pmlst/pmlst_db/ |";
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
13 while (<PMLST>) {
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
14 chomp ($_);
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
15 if ($_ =~ "sequence_type") {
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
16 #print "ST:$_ \n";
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
17 my @table = split (/:/,$_);
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
18 $STpmlst = $table [1];
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
19 #chomp ($STpmlst); $STpmlst = chop($STpmlst);
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
20 $STpmlst =~ s/\s+//;
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
21 $STpmlst = substr($STpmlst,1);
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
22 my @table2 = split (/'/,$STpmlst);
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
23 $STpmlst = $table2[0];
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
24 #print "$STpmlst\n" ;
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
25 }
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
26 }
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
27
6dcb66689a7d Uploaded
dcouvin
parents:
diff changeset
28 print "Sequence Type (pMLST)\t$STpmlst\n" ;