Commit ec191583 authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

Merge branch 'dev' of /home/kai.b/tools/universc

parents 51315873 b3fa0f8b
Loading
Loading
Loading
Loading
+209 −210
Original line number Diff line number Diff line
@@ -980,8 +980,8 @@ if [[ $verbose ]]; then
   echo "barcode length: $barcodelength"
   echo "barcode default: $barcode_default"
fi
barcodeadjust=`echo $(($barcodelength-$barcode_default))`
umiadjust=`echo $(($umilength-$umi_default))`
barcodeadjust=`echo $((${barcodelength} - ${barcode_default}))`
umiadjust=`echo $((${umilength}-${umi_default}))`
if [[ $verbose ]]; then
   echo "barcode adjust: $barcodeadjust "
fi
@@ -1573,7 +1573,6 @@ if [[ "$technology" == "quartz-seq" ]] || [[ "$technology" == "ramda-seq" ]] ||
            R1_file=${read1[$(( $ii - 1 ))]}
            R2_file=$(echo $R1_file | perl -pne 's/(.*)_R1/$1_R2/' )
            I1_file=$(echo $R1_file | perl -pne 's/(.*)_R1/$1_I1/' )

            if [[ $verbose ]]; then
                echo $R1_file
                echo $R2_file
@@ -1581,7 +1580,7 @@ if [[ "$technology" == "quartz-seq" ]] || [[ "$technology" == "ramda-seq" ]] ||
            fi
            #copies index 1 to next line (1st to 2nd) and deletes 3rd line (only if index 1 doesn't contain '+' character)
            cat $R1_file | sed -E "/x/! s/ (.):(.):(.):(.*)$/ \1:\2:\3:\4$\n\4/g" > $I1_file
             linediff=$(grep -n "^+" $I1_file | head -n 2 | cut -d: -f1 |  awk 'NR==1{p=$1;next} END{print $1-p}')
            linediff=$(grep -n "^+" $I1_file | head -n 2 | cut -d":" -f 1 | awk 'NR==1{p=$1;next} END{print $1-p}')
            if [[ $linediff -eq 5 ]];then
                #remove lines if matched only
                sed "3~5d" > $I1_file