Advertisement
ProzacR

compare Cx clustal

Jun 5th, 2017
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.52 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #compare Cx clustal
  3. #
  4. # VR
  5. #
  6. #
  7.  
  8.  
  9. open (SEKOS, "sulygintos.clustal") or die ("Could not open $ARGV[0].\n");
  10. foreach $line (<SEKOS>)  {
  11.         chop($line);
  12.         push @Cx26_seka, split(/      /, $line) if ($line =~ "P29033");
  13.         push @Cx30_2_seka, split(/      /, $line) if ($line =~ "Q8NFK1");
  14.         push @Cx36_seka, split(/      /, $line) if ($line =~ "Q9UKL4");
  15.         push @Cx40_seka, split(/      /, $line) if ($line =~ "P36382");
  16.         push @Cx43_seka, split(/      /, $line) if ($line =~ "P17302");
  17.         push @Cx45_seka, split(/      /, $line) if ($line =~ "P36383");
  18.         push @Cx46_seka, split(/      /, $line) if ($line =~ "Q9Y6H8");
  19.         push @Cx47_seka, split(/      /, $line) if ($line =~ "Q5T442");
  20.         push @Cx50_seka, split(/      /, $line) if ($line =~ "P48165");
  21. }
  22. close(SEKOS);
  23.  
  24.  
  25. @Cx26_seka = grep !/sp/, @Cx26_seka;
  26. @Cx30_2_seka = grep !/sp/, @Cx30_2_seka;
  27. @Cx36_seka = grep !/sp/, @Cx36_seka;
  28. @Cx40_seka = grep !/sp/, @Cx40_seka;
  29. @Cx43_seka = grep !/sp/, @Cx43_seka;
  30. @Cx45_seka = grep !/sp/, @Cx45_seka;
  31. @Cx46_seka = grep !/sp/, @Cx46_seka;
  32. @Cx47_seka = grep !/sp/, @Cx47_seka;
  33. @Cx50_seka = grep !/sp/, @Cx50_seka;
  34.  
  35.  
  36. $Cx26 = join("", @Cx26_seka);
  37. $Cx30_2 = join("", @Cx30_2_seka);
  38. $Cx36 = join("", @Cx36_seka);
  39. $Cx40 = join("", @Cx40_seka);
  40. $Cx43 = join("", @Cx43_seka);
  41. $Cx45 = join("", @Cx45_seka);
  42. $Cx46 = join("", @Cx46_seka);
  43. $Cx47 = join("", @Cx47_seka);
  44. $Cx50 = join("", @Cx50_seka);
  45.  
  46.  
  47. @ar_Cx26 = split(//, $Cx26);
  48. @ar_Cx30_2 = split(//, $Cx30_2);
  49. @ar_Cx36 = split(//, $Cx36);
  50. @ar_Cx40 = split(//, $Cx40);
  51. @ar_Cx43 = split(//, $Cx43);
  52. @ar_Cx45 = split(//, $Cx45);
  53. @ar_Cx46 = split(//, $Cx46);
  54. @ar_Cx47 = split(//, $Cx47);
  55. @ar_Cx50 = split(//, $Cx50);
  56.  
  57. #print join("\n", @ar_Cx50);
  58.  
  59. $count = 0;
  60. while ($ar_Cx26[$count]) {
  61.                 if (
  62.                 $ar_Cx26[$count] eq $ar_Cx40[$count] &&
  63.                 $ar_Cx26[$count] eq $ar_Cx46[$count] &&
  64.                 $ar_Cx26[$count] eq $ar_Cx47[$count] &&
  65.                 $ar_Cx26[$count] eq $ar_Cx50[$count] &&
  66.                 $ar_Cx26[$count] ne $ar_Cx30_2[$count] &&
  67.                 $ar_Cx26[$count] ne $ar_Cx36[$count] &&
  68.                 #$ar_Cx26[$count] ne $ar_Cx43[$count] &&
  69.                 $ar_Cx26[$count] ne $ar_Cx45[$count]
  70.                 )       {
  71.                                 print $count+1, " : ";
  72.                                 print $ar_Cx26[$count];
  73.                                 print "\n";
  74.                         }
  75.                 $count++;
  76.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement