/usr/share/ampliconnoise/Scripts/ParseBoth.pl is in ampliconnoise 1.29-5build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/usr/bin/perl
my $tag = shift(@ARGV);
my $revTag = shift(@ARGV);
$revTag =~ tr/[A,C,G,T]/[T,G,C,A]/;
$revTag = &translateIUPAC($revPrimer);
$tag =~ /G*(.*)/;
$tag2 = &translateIUPAC($1);
while($line = <STDIN>){
chomp($line);
if($line =~ />(.*)/){
print "$line\n";
}
else{
$line =~ /$tag2(.*)$revTag.*/;
$parse = $1;
print "$parse\n";
}
}
sub translateIUPAC()
{
my ($seq) = @_;
$seq=~s/W/\[AT\]/g;
$seq=~s/B/\[CGT\]/g;
$seq=~s/S/\[GC\]/g;
$seq=~s/N/\[ACTG\]/g;
$seq=~s/Y/\[CT\]/g;
$seq=~s/R/\[AG\]/g;
$seq=~s/D/\[AGT\]/g;
$seq=~s/H/\[ACT\]/g;
$seq=~s/M/\[AC\]/g;
$seq=~s/K/\[GT\]/g;
$seq=~s/V/\[ACG\]/g;
return $seq;
}
|