Commit 5472487f authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

enable skipping of conversion

parent 5094c6c4
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -655,7 +655,7 @@ case $read in
        rename "s/_R1.*\./_R1_001\./" $read
        #update file variable
        read=`echo $read | sed -e  "s/_R1.*\./_R1_001\./g"`
        read1[$i]=$read
        read2[$i]=$read
        echo "   renaming $read";;
esac
#check if file in directory and link if not
@@ -825,9 +825,14 @@ for fq in "${read2[@]}"; do
    fi
done

if [[ $verbose == "true" ]]
    then
    echo "convert: $convert"
    echo "${crR1s[@]}"
    echo "${crR2s[@]}"
fi

if [[ $convert == true ]]
if [[ $convert == "true" ]]
    then
    if [[ "$technology" == "10x" ]]; then
        echo "    10x files accepted without conversion"
@@ -837,13 +842,13 @@ if [[ $convert == true ]]
            echo "        handling $fq"
            if [[ "$technology" == "nadia" ]]; then
                echo "        converting barcodes"
                sed -i '2~4s/^/AAAA/' ${crIN}/$fq #Add AAAA to every read
                echo sed -i '2~4s/^/AAAA/' ${crIN}/$fq #Add AAAA to every read
                echo "        converting quality scores"
                sed -i '4~4s/^/IIII/'  ${crIN}/$fq #Add quality scores for added bases
                echo sed -i '4~4s/^/IIII/'  ${crIN}/$fq #Add quality scores for added bases
                echo "        converting UMI"
                sed -i '2~4s/[NATCG][NATCG][NATCG][NATCG][NATCG][NATCG]$/AA/'  ${crIN}/$fq #Replace last 6 bases with AA
                echo sed -i '2~4s/[NATCG][NATCG][NATCG][NATCG][NATCG][NATCG]$/AA/'  ${crIN}/$fq #Replace last 6 bases with AA
                echo "        converting quality scores"
                sed -i '4~4s/......$/II/'  ${crIN}/$fq #Replace quality scores for added bases
                echo sed -i '4~4s/......$/II/'  ${crIN}/$fq #Replace quality scores for added bases
            elif [[ "$technology" == "icell8" ]]; then
                echo "converting barcodes"
                sed -i '2~4s/^/AAAAA/'  ${crIN}/$fq #Add AAAAA to every read