Last active
November 13, 2015 17:37
-
-
Save sestaton/9709477 to your computer and use it in GitHub Desktop.
biostars95834.pl - parse blasttable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
while (<DATA>) { | |
chomp; | |
my ($query, $subject, $percent_identity, $alignment_length, $mistmatches, | |
$gap_openings, $q_start, $q_end, $s_start, $s_end, $e_value, $bit_score) = split /\t/; | |
say join "\t", "Query=$query", "Hit=$subject", "PID=$percent_identity"; | |
} | |
__DATA__ | |
A B 44.00 150 76 4 1852 1994 673 821 1e-25 116 | |
A B 44.34 557 235 21 1082 1600 46 565 7e-126 427 | |
A C 56.77 155 58 3 1451 1600 1719 1869 5e-48 191 | |
A C 65.85 82 25 2 1913 1991 2126 2207 8e-26 118 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment