Skip to content

Calculate LAI

Emily Delorean edited this page Aug 25, 2023 · 1 revision

Install LTR Assembly Index and it's dependencies

In your desired software directory (in this example, ours is /project/pepper/software/LAI/)

Load miniconda

module load miniconda

create a conda environment called LAI and activate it

conda create --prefix /project/pepper/software/LAI/
source activate /project/pepper/software/LAI/

Install the perl dependencies and then genometools

conda install -y -c conda-forge perl perl-text-soundex
conda install -c bioconda genometools-genometools

Clone the LTR_retriver git repository into this same conda environment with

cd /project/pepper/software/LAI/
git clone https://github.com/oushujun/LTR_retriever.git
git clone https://github.com/oushujun/LTR_FINDER_parallel

LAI script

#!/bin/sh
#SBATCH --job-name="LAI"
#SBATCH -t 2-00:00:00
#SBATCH --ntasks-per-node=20
#SBATCH --output="%x_%j.o" # job standard output file (%j replaced by job id)
#SBATCH --error="%x_%j.e" # job standard error file (%j replaced by job id)

source /software/7/apps/miniconda/4.7.12/etc/profile.d/conda.sh

module load miniconda
module load repeatmasker
module load repeatmodeler
conda activate LTR_retriever

file='genome_assembly.fasta'
gt='/project/pepper/software/LAI/bin/gt'
LTR_FINDER_parallel='/project/pepper/software/LAI/LTR_FINDER_parallel/LTR_FINDER_parallel'
LTR_ret='/project/pepper_me_capture/software/LAI/LTR_retriever/LTR_retriever'
LAI='/project/pepper_me_capture/software/LAI/LTR_retriever/LAI'

# Step 1 : LTRharvest
#  To obtain raw input files with LTRharvest and LTR_FINDER_parallel:

${gt} suffixerator -db ${file} -indexname ${file} -tis -suf -lcp -des -ssp -sds -dna

${gt} ltrharvest -index ${file}  -minlenltr 100 -maxlenltr 7000 -mintsd 4 -maxtsd 6 -motif TGCA -motifmis 1 -similar 85 -vic 10 -seed 20 -seqids yes > ${file}.harvest.scn

${LTR_FINDER_parallel} -seq ${file} -threads 10 -harvest_out -size 1000000 -time 300

cat ${file}.harvest.scn ${file}.finder.combine.scn > ${file}.rawLTR.scn

# Step 2 To run LTR_retriever:
${LTR_ret} -genome ${file} -inharvest ${file}.rawLTR.scn -threads 20


# Step 3 To run LAI:
${LAI} -genome ${file} -intact ${file}.pass.list -all ${file}.out

LAI values are found in the first line of the ${file}.fasta.out.LAI file