Query= M01757:19:000000000-A3WAT:1:1101:15902:2061 1:N:0:1 Length=53 Score E Sequences producing significant alignments: (Bits) Value dbj|AP012555.1| Mycobacterium avium subsp. hominissuis TH135 chr... 75.0 3e-11 gb|CP005928.1| Mycobacterium avium subsp. paratuberculosis MAP4,... 75.0 3e-11 gb|CP000479.1| Mycobacterium avium 104, complete genome 75.0 3e-11 gb|AE016958.1| Mycobacterium avium subsp. paratuberculosis str. ... 75.0 3e-11 >dbj|AP012555.1| Mycobacterium avium subsp. hominissuis TH135 chromosomal DNA, complete genome Length=4951217 Score = 75.0 bits (40), Expect = 3e-11 Identities = 42/43 (98%), Gaps = 0/43 (0%) Strand=Plus/Plus Query 7 CGGTGGGCAAGAAGGAACTCGAGAAGGACCCGCTGATGGGCAC 49 |||||||||||||||||||||||||||||||| |||||||||| Sbjct 1543504 CGGTGGGCAAGAAGGAACTCGAGAAGGACCCGGTGATGGGCAC 1543546 Lambda K H 1.33 0.621 1.12 Gapped Lambda K H 1.28 0.460 0.850 Effective search space used: 1252612366488 Query= M01757:19:000000000-A3WAT:1:1101:16099:2064 1:N:0:1 Length=102 ***** No hits found ***** Lambda K H 1.33 0.621 1.12 Gapped Lambda K H 1.28 0.460 0.850 Effective search space used: 3701553444831 #### >M01757:19:000000000-A3WAT:1:1101:15902:2061 1:N:0:1 >M01757:19:000000000-A3WAT:1:1101:19601:5029 1:N:0:1 >M01757:19:000000000-A3WAT:1:1101:17448:5029 1:N:0:1 #### # List of headers # BLAST file # Output file (BLAST format) use strict; # Specify I/O my $headerfile = $ARGV[0]; my $blastfile = $ARGV[1]; my $outfile = $ARGV[2]; # open header file open (HEADERFILE, $headerfile) or die "Cannot open header file\n"; # open blast file open (BLASTFILE, $blastfile) or die "Cannot open BLAST file\n"; # open output file open(OUTPUT, ">$outfile"); my $ender = "Query="; while (my $headerline = ) { chomp $headerline; my $headercut = substr $headerline, 1; while (my $blastline = ) { if ($blastline =~ $headercut) { print $blastline; print OUTPUT $blastline; print until ( ($_ = ) =~ /$ender/i); print OUTPUT until ( ($_ = ) =~ /$ender/i); } } seek (BLASTFILE,0,0); } exit; #### # List of headers # BLAST file # Output file (BLAST format) use strict; # Specify I/O my $blastfile = $ARGV[0]; my $headerfile = $ARGV[1]; my $outfile = $ARGV[2]; # open blast file open (BLASTFILE, $blastfile) or die "Cannot open BLAST file\n"; # open header file open (HEADERFILE, $headerfile) or die "Cannot open header file\n"; # open output file open(OUTPUT, ">$outfile"); my @headerline = ; my $headerline = join ( '', @headerline); while (my $blastline = ) { my $blastcut = substr $blastline, 7; if ($headerline =~ /\Q$blastcut\E/) { print $blastcut; } } exit; #### # open blast file open (BLASTFILE, $blastfile) or die "Cannot open BLAST file\n"; # open header file open (HEADERFILE, $headerfile) or die "Cannot open header file\n"; # open output file open(OUTPUT, ">$outfile"); my $ender = "Query="; my @headerline = ; my $headerline = join ( '', @headerline); while (my $blastline = ) { my $blastcut = substr $blastline, 7; if ($headerline =~ /\Q$blastcut\E/) { print $blastcut; print until ( ($_ = ) =~ /$ender/i); } } exit;