diff --git a/alignment/starfusion.sh b/alignment/starfusion.sh index 014d0206823040d95a34038b974a4d3820f54379..70885dcb803559b18c91f500511a8e6afe2ac9d7 100644 --- a/alignment/starfusion.sh +++ b/alignment/starfusion.sh @@ -41,7 +41,8 @@ baseDir="`dirname \"$0\"`" source /etc/profile.d/modules.sh module add python/2.7.x-anaconda star/2.5.2b bedtools/2.26.0 -if [[ $method == 'trinity' ]] + +if [[ -n $method ]] && [[ $method == 'trinity' ]] then module load trinity/1.6.0 tmphome="/tmp/$USER" @@ -58,7 +59,7 @@ then cut -f 5-8 ${pair_id}.starfusion.txt |perl -pe 's/\^|:/\t/g' | awk '{print "singularity exec /project/shared/bicf_workflow_ref/singularity_images/agfusion.simg agfusion annotate -db /project/shared/bicf_workflow_ref/singularity_images/pyensembl/GRCh38/ensembl92/agfusion.homo_sapiens.92.db -g5", $1,"-j5",$4,"-g3",$6,"-j3",$9,"-o",$1"_"$4"_"$6"_"$9}' |grep -v 'LeftGene' |sh else refgeno=${index_path}/CTAT_resource_lib - STAR-Fusion --genome_lib_dir ${refgeno} --min_sum_frags 3 --left_fq ${fq1} --right_fq ${fq2} --output_dir ${pair_id}_star_fusion &> star_fusion.err + STAR-Fusion --genome_lib_dir ${refgeno} --min_sum_frags 3 --left_fq ${fq1} --right_fq ${fq2} --output_dir ${pair_id}_star_fusion cp ${pair_id}_star_fusion/star-fusion.fusion_candidates.final.abridged ${pair_id}.starfusion.txt cut -f 5-8 ${pair_id}.starfusion.txt |perl -pe 's/\^|:/\t/g' | awk '{print "agfusion annotate -db agfusion.homo_sapiens.95.db -g5", $1,"-j5",$4,"-g3",$6,"-j3",$9,"-o",$1"_"$4"_"$6"_"$9}' |grep -v 'LeftGene' |sh fi