-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02.run_lima.sh
34 lines (33 loc) · 1014 Bytes
/
02.run_lima.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
if [ ! -n "$3" ]
then
#Usage
echo " Part 2: remove 5/3 primer "
echo " Usage: bash `basename $0` [*.ccs.bam] [primer.fa] [threads]"
echo " Example: bash `basename $0` JJ27_Tes.ccs.bam primer.fasta 2"
echo " Output: full-length reads [*.ccs.fl.NEB_5p--NEB_Clontech_3p.bam or Clontech_5p]"
else
data=$1
primer=$2
threads=$3
echo "`basename $0`"
echo ">>Starting the pipeline to remove 3p and 5p primers using lima"
echo " Input data: "$data
prefix=`ls $data|sed 's/.bam//'`
st=`date`
lima $data $primer ${prefix}.fl.bam --isoseq --peek-guess -j $threads
ed=`date`
if [[ -s ${prefix}.fl.lima.summary ]]
then
out=`ls *3p.bam`
echo " Output data: "$out
echo " **Summary:"
cat ${prefix}.fl.lima.summary|head -3
echo "Started time: "$st
echo "Ended time: "$ed
echo "Done running `basename $0`"
echo "**********************************************************************************"
else
echo "No summary file found, please check your input data and output files"
fi
fi