Mercurial > repos > dcouvin > pmlst2
comparison pmlst.pl @ 0:140d4f9e1f20 draft default tip
Uploaded
author | dcouvin |
---|---|
date | Mon, 06 Sep 2021 16:00:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:140d4f9e1f20 |
---|---|
1 #!/usr/bin/perl -w | |
2 use strict; | |
3 use warnings; | |
4 | |
5 my $STpmlst = ""; | |
6 | |
7 my $path = $ARGV[0]; | |
8 my $seq = $ARGV[1]; | |
9 my $scheme = $ARGV[2]; | |
10 | |
11 | |
12 open PMLST, "python3 $path/pmlst/pmlst.py -i $seq -s $scheme -p $path/pmlst/pmlst_db/ |"; | |
13 while (<PMLST>) { | |
14 chomp ($_); | |
15 if ($_ =~ "sequence_type") { | |
16 #print "ST:$_ \n"; | |
17 my @table = split (/:/,$_); | |
18 $STpmlst = $table [1]; | |
19 #chomp ($STpmlst); $STpmlst = chop($STpmlst); | |
20 $STpmlst =~ s/\s+//; | |
21 $STpmlst = substr($STpmlst,1); | |
22 my @table2 = split (/'/,$STpmlst); | |
23 $STpmlst = $table2[0]; | |
24 #print "$STpmlst\n" ; | |
25 } | |
26 } | |
27 | |
28 #print "Sequence\tSequence Type (pMLST)\n" ; | |
29 print "pMLST for $seq:\t$STpmlst\n" ; |