Skip to content

bahlolab/Bio-STR-exSTRa

Repository files navigation

Build Status

Bio::STR::exSTRa

Perl module and script for summarising repeat motifs from BAM files, ready for statistical analysis. For details of the purpose of this software please see https://github.com/bahlolab/exSTRa

Install requirements

Perl 5.14.1

The CPAN module Bio::DB::HTS requires htslib, that may be easier to install separately, or to install Bio::DB::HTS from Github with one of the options in the scripts/build_options.sh script.

Required CPAN modules can be obtained by instructions from the perl Build.PL command.

Setup

Docker container

A Docker container is available for the most common use of this package. This can make the installation process easier.

Instructions for the Docker container are at https://hub.docker.com/r/bahlolab/bio-str-exstra

Perl library install

Install as a module:

# Assumes htslib is already installed. See Install Requirements section above, or below for some installation tips.

# Install Bio::Perl if not installed already (assumes CPAN Minus is available)
cpanm 'Bio::Perl'

perl Build.PL
./Build installdeps # This is as suggested by the previous command - the command for you to run may vary.
./Build
./Build test
./Build install

If you do not have write access to the Perl module directory, you may need to use the local::lib module. In some circumstances these commands may still not work, and you may need to seek help on Perl's Module::Build.

If Bio::DB::HTS has trouble installing, first check that htslib is properly installed including lib paths. For local installs, we have had success installing it (after installing Bio::Perl) with the following command:

bash <(curl https://raw.githubusercontent.com/Ensembl/Bio-DB-HTS/master/scripts/build_options.sh) "git clone --branch master --depth=1 https://github.com/Ensembl/Bio-DB-HTS.git" "BUILD_LOCAL_INSTALLED_HTSLIB"

Preparation of BAM files

An outline of our analysis pipeline can be viewed at prepare_BAMs.md. We have not yet extensively tested against different aligner settings, but we speculate that the alignments should be performed in local mode.

Script to process BAM/CRAM files

The repeat expansion loci are specified in a tab delimited file. This is available in the R exSTRa package under inst/extdata/repeat_expansion_disorders_hg19.txt or inst/extdata/repeat_expansion_disorders_grch37.txt, with hg38 and GRCh38 files coming soon. Either use the file where the R package is installed, or download directly: repeat_expansion_disorders_hg19.txt or repeat_expansion_disorders_grch37.txt.

See examples/run_strexpansion_score.sh for an example of running the script bin/exSTRa_score.pl that can be modified to your data. The Docker container has exSTRa_score.pl as an executable command.