Skip to content

Commit

Permalink
pass the test V0.3.1,add example file
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimol committed Mar 4, 2022
1 parent c05c1ec commit f04435c
Show file tree
Hide file tree
Showing 64 changed files with 805,006 additions and 47 deletions.
24 changes: 14 additions & 10 deletions LTRfind
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/bash
source config.ini

#用于获取脚本所在的路径,保存为变量path1,调用其他脚本都依赖这个路径。
path1="$(cd "$(dirname ${BASH_SOURCE[0]})";pwd)"
source ${path1}/config.ini

function activate(){
condapath=`conda info | grep 'base environment'|cut -d : -f2|cut -d " " -f2`
source ${condapath}/etc/profile.d/conda.sh
Expand Down Expand Up @@ -83,16 +87,16 @@ function Diploid(){
fi

if [ -e ${species}.harvest.scn ]; then
echo "已存在输出文件 ${species}.harvest.scn,自动删除旧版本"
rm -rf ${species}.harvest.scn
echo "已存在输出文件 ${species}.harvest.scn,自动重命名旧版本为${species}.harvest.old.scn"
mv ${species}.harvest.scn ${species}.harvest.old.scn
fi
if [ -e ${species}.finder.scn ]; then
echo "已存在输出文件 ${species}.finder.scn ,自动删除旧版本"
rm -rf ${species}.finder.scn
echo "已存在输出文件 ${species}.finder.scn ,自动重命名旧版本为${species}.finder.old.scn"
mv ${species}.finder.scn ${species}.finder.old.scn
fi

# LTR_FINDER
${perl} ${LTR_FINDER_parallel} -seq ${genome} -threads ${threads} -harvest_out
${perl} ${LTR_FINDER_parallel} -seq ${genome} -threads ${threads} -harvest_out -finder ${path1}/LTR_FINDER_parallel-1.1/bin/LTR_FINDER.x86_64-1.0.7
if [ ! $? -eq 0 ];then
echo "Error:in LTR_FINDER_parllel"
exit 1
Expand Down Expand Up @@ -120,8 +124,8 @@ function Diploid(){

#初步可视化
cat ${genome}.pass.list|rev|awk '{print $1,$2,$3}'|rev|tr " " "\t" >${species}.LTR_time.xls
${Rscript} visualization/visual_LAI.R ${genome}.out.LAI ${species}
${Rscript} visualization/visual_LTR.R ${species}.LTR_time.xls ${species}
Rscript ${path1}/visualization/visual_LAI.R ${genome}.out.LAI ${species} ${PWD}
Rscript ${path1}/visualization/visual_LTR.R ${species}.LTR_time.xls ${species} ${PWD}
}

##针对多倍体的算法优化
Expand Down Expand Up @@ -248,7 +252,7 @@ function Polyploid(){
do
echo "start analysis ${i}.ploidy.list.txt in `date`"
LAI -genome ${chr_genome} -intact ${chr_genome}.pass.list -all ${chr_genome}.out -mono ${i}.ploidy.list.txt
${Rscript} visualization/visual_LAI.R ${i}.*.out.LAI ${i}
Rscript ${path1}/visualization/visual_LAI.R ${i}.ploidy.list.txt.LAI ${i} ${PWD}
done

}
Expand Down Expand Up @@ -307,7 +311,7 @@ Note:\n
;;
-V|--version)
echo -e "
Version: V0.3.0 \n
Version: V0.3.1 \n
Author: Mol Chai \n
Email: [email protected] "
;;
Expand Down
19 changes: 12 additions & 7 deletions config.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#Define paths for dependent software
gt="gt-1.6.2/bin/gt"
LTR_FINDER_parallel="LTR_FINDER_parallel-1.1/LTR_FINDER_parallel"
seqkit="seqkit"
Rscript="Rscript" #only for visual ,require ggplot2

threads=36 #cpu numbers
miu="7e-9" #different rate
##This part does not need to be modified, if modified, please use the absolute path
gt="${path1}/gt-1.6.2/bin/gt"
LTR_FINDER_parallel="${path1}/LTR_FINDER_parallel-1.1/LTR_FINDER_parallel"
seqkit="${path1}/seqkit"

perl="~/soft/perl/bin/perl" #modify this path to your perl path
#conda environment name
envname="LTR_retriever" #If the conda environment you created is not this name, please modify the name here first

#The perl path must be changed to the absolute path of your own perl
perl="/share/home/chaimao1/soft/perl/bin/perl" #modify this path to your perl path

threads="36" #cpu numbers
miu="7e-9" #different rate

Binary file added example/LAI/Ath.LAI.pdf
Binary file not shown.
Binary file added example/LAI/Ath.LAI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f04435c

Please sign in to comment.