# this works as a bash include
#
#COMM SeqLab::SeqComp::seqstr_overlap
#
function seqolap {
perl -e '
    use lib shift();  # give include precedence to code directory, perl -I would not work!
    use SeqLab::SeqComp;
    my $fin = shift();
    my @seq;
    open(INSEQ,$fin) or die "ERROR: unable to open file $fin\n";
    while (<INSEQ>){ chomp; push @seq,$_ }
    close(INSEQ);
    my $pOlap=&seqstr_overlap(@seq);
    print  map{ qq($_\n) } @seq;
    printf "%s\n", join(q( ),@$pOlap);
  ' -- "$dircode" -  \
  2>&1
}
# short 1st
seqolap <<ENDSEQ
attattattcgcgtn
tcgcgtnattattatt
ENDSEQ
# short 2nd
seqolap <<ENDSEQ
attattattcgcgtn
cgcgtnattattat
ENDSEQ
# two word matches
seqolap <<ENDSEQ
attattattcgcgtn
cgcgtnattattgatattattat
ENDSEQ
# antisense
seqolap <<ENDSEQ
attattattcgcgtn
ataataatnacgcg
ENDSEQ
