<commit_before>#!  /usr/bin/env perl

use warnings;
use strict;
use Bio::Tools::BPlite;
use Unison;

$ENV{DEBUG}=1;
die( "USAGE: blastfeature.pl <pseq_id> <blast output>\n" ) if $#ARGV != 1;
my $u = new Unison( 'username' => 'admin', 'dbname' => 'csb-dev','password' => $ENV{'<PASSWORD>'} );
my $q_pseq_id = $ARGV[0];
my $file = $ARGV[1];

my $report = new Bio::Tools::BPlite(-file=>$file);
while(my $sbjct = $report->nextSbjct) {
	$sbjct->name =~ m/^(.*?) /;
	my $t_pseq_id = $u->get_pseq_id_from_alias( $1 );
	if ( !defined $t_pseq_id ) {
		warn("no pseq_id defined for target sequence: $1\n" );
		next;
	}
	while(my $hsp = $sbjct->nextHSP) {
		$u->insert_hsp( $q_pseq_id, $t_pseq_id, $hsp );<commit_msg>minor change<commit_after>#!  /usr/bin/env perl

use warnings;
use strict;
use Bio::Tools::BPlite;
use Unison;

$ENV{DEBUG}=1;
die( "USAGE: blastfeature.pl <pseq_id> <blast output>\n" ) if $#ARGV != 1;
my $u = new Unison( 'username' => 'admin', 'dbname' => 'csb-dev','password' => $ENV{'<PASSWORD>'} );
my $q_pseq_id = $ARGV[0];
my $file = $ARGV[1];

my $report = new Bio::Tools::BPlite(-file=>$file);
while(my $sbjct = $report->nextSbjct) {
	$sbjct->name =~ m/^(.*?) /;
	my $t_pseq_id = $u->get_pseq_id_from_alias( $1 );
	if ( !defined $t_pseq_id ) {
		warn("no pseq_id defined for target sequence: $1 - skipping\n" );
		next;
	}
	while(my $hsp = $sbjct->nextHSP) {
		$u->insert_hsp( $q_pseq_id, $t_pseq_id, $hsp );
{'fraction_non_alphanumeric': 0.22292545710267228, 'fraction_numerical': 0.008438818565400843, 'mean_word_length': 4.761133603238866, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '948421', 'n_tokens_mistral': 668, 'n_tokens_neox': 651, 'n_words': 136}