NAME

App::Fasops::Common - collection of common subroutines

SYNOPSIS

    use App::Fasops::Common;

    my $length = App::Fasops::Common::seq_length("AGCTTT---CCA");

METHODS

chr_to_align

    my $chr_pos = App::Fasops::Common::align_to_chr( $intspan, $pos, $chr_start, $chr_strand, );
    my $chr_pos = App::Fasops::Common::align_to_chr( $intspan, $pos, $chr_start, );

Give a chr position, return an align position starting from '1'.

align_to_chr

    my $pos = App::Fasops::Common::align_to_chr( $intspan, $chr_pos, $chr_start, $chr_strand, );
    my $pos = App::Fasops::Common::align_to_chr( $intspan, $chr_pos, $chr_start, );

Give a chr position, return an align position starting from '1'. If the position in target is located in a gap, then return the left base's position. 5' for positive strand and 3' for negative stran. (Just like GATK's indel left align.)

calc_ld

    my ( $r, $dprime ) = App::Fasops::Common::calc_ld("111000", "111000");

Returns the r and D' (Hill and Robertson, 1968) of two polymorphic sites.

https://cran.r-project.org/web/packages/genetics/genetics.pdf