Commit 212017cb authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

add aliases for SCRB-Seq

parent 4b724227
Loading
Loading
Loading
Loading
+33 −15
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ Mandatory arguments to long options are mandatory for short options too.
                                  Quartz-Seq2 (15bp barcode, 8bp UMI): quartzseq2-1536
                                  Sci-Seq (8bp UMI, 10bp barcode): sciseq
                                  Smart-seq2-UMI, Smart-seq3 (11bp barcode, 8bp UMI): smartseq                                    
                                  SCRUB-Seq (6bp barcode, 10bp UMI): scrubseq
                                  SCRB-Seq (6bp barcode, 10bp UMI): scrbseq, mcscrbseq 
                                  SureCell (18bp barcode, 8bp UMI): surecell, ddseq, biorad
                                Custom inputs are also supported by giving the name "custom" and length of barcode and UMI separated by "_"
                                  e.g. Custom (16bp barcode, 10bp UMI): custom_16_10
@@ -496,9 +496,9 @@ if [[ "$technology" == "sciseq" ]] || [[ "$technology" == "sci-seq" ]]; then
    echo "Running with Sci-Seq parameters (single-cell combinatorial indexing RNA sequencing)"
    technology="sciseq"
fi
if [[ "$technology" == "scrubseq" ]] || [[ "$technology" == "scrub-seq" ]]; then
    echo "Running with SCRUB-Seq parameters"
    technology="scrubseq"
if [[ "$technology" == "scrbseq" ]] || [[ "$technology" == "scrb-seq" ]] || [[ "$technology" == "mcscrbseq" ]] || [[ "$technology" == "mcscrb-seq" ]]; then
    echo "Running with SCRB-Seq / mcSCRB-seq parameters"
    technology="scrbseq"
fi
if [[ "$technology" == "smartseq" ]] || [[ "$technology" == "smart-seq" ]] || [[ "$technology" == "smartseq2" ]] || [[ "$technology" == "smart-seq2" ]] ||  [[ "$technology" == "smartseq2-umi" ]] || [[ "$technology" == "smart-seq2-umi" ]] ||  [[ "$technology" == "smartseq3" ]] || [[ "$technology" == "smart-seq3" ]]; then
    echo "Running with Smart-Seq3 parameters (version 3 with UMIs)"
@@ -531,7 +531,7 @@ if [[ "$technology" != "10x" ]] \
&& [[ "$technology" != "indrop"* ]] \
&& [[ "$technology" != "quartz-seq2"* ]] \
&& [[ "$technology" != "sciseq" ]] \
&& [[ "$technology" != "scrubseq" ]] \
&& [[ "$technology" != "scrbseq" ]] \
&& [[ "$technology" != "smart-seq"* ]]\
&& [[ "$technology" != "surecell" ]]; then
    if [[ "$technology" != "custom"* ]]; then
@@ -793,7 +793,7 @@ else
        echo "***WARNING: barcodes not available for Smart-Seq 2 or 3, using iCELL8 whitelist (version 3)***"
        echo "...valid barcodes may be an overestimate"
        barcodefile=${SDIR}/iCell8_barcode.txt
    elif [[ "$technology" == "custom"* ]] || [[ "$technology" == "celseq"* ]] ||  [[ "$technology" == "scrubseq" ]] || [[ "$technology" == "sciseq" ]] || [[ "$technology" == "surecell" ]]; then
    elif [[ "$technology" == "custom"* ]] || [[ "$technology" == "celseq"* ]] ||  [[ "$technology" == "scrbseq" ]] || [[ "$technology" == "sciseq" ]] || [[ "$technology" == "surecell" ]]; then
        if [[ "$technology" == "celseq" ]]; then
            customname="celseq"
            minlength=8
@@ -803,8 +803,8 @@ else
        elif [[ "$technology" == "sciseq" ]]; then
            customname="sciseq"
            minlength=10
        elif [[ "$technology" == "scrubseq" ]]; then
            customname="scrubseq"
        elif [[ "$technology" == "scrbseq" ]]; then
            customname="scrbseq"
            minlength=6
        elif [[ "$technology" == "surecell" ]]; then
            customname="surecell"
@@ -962,7 +962,7 @@ elif [[ "$technology" == "quartz-seq2-1536" ]]; then
elif [[ "$technology" == "sciseq" ]]; then
    barcodelength=10
    umilength=8
elif [[ "$technology" == "scrubseq" ]]; then
elif [[ "$technology" == "scrbseq" ]]; then
    barcodelength=6 
    umilength=10
elif [[ "$technology" == "smartseq" ]]; then
@@ -1288,16 +1288,34 @@ else
        done
    fi

    #remove adapter from SureCell (and correct phase blocks)
    if [[ "$technology" == "surecell" ]];
    #remove adapter from Sci-Seq and swap barcode and UMI
    if [[ "$technology" == "sciseq" ]]; then
        for convFile in "${convFiles[@]}"; do
            #remove adapter if detected
            sed -E '
                /^ACGACGCTCTTCCGATCT/ {
                s/^(.{18})//g
                n
                n
                s/^(.{18})//g
                }'  $convFile > ${crIN}/.temp
            mv ${crIN}/.temp $convFile
            #swap UMI and barcode
            sed -E '2~2s/(.{8})(.{10})/\2\1/' $convFile > ${crIN}/.temp
            mv ${crIN}/.temp $convFile
        done
    fi

    #remove adapter from SCRB-Seq
    if [[ "$technology" == "scrbseq" ]];
        for convFile in "${convFiles[@]}"; do
            #remove phase blocks and linkers
            #remove adapters
            sed -E '
                /.*(.{6})TAGCCATCGCATTGC(.{6})TACCTCTGAGCTGAA(.{6})ACG(.{8})GAC/ {
                s/.*(.{6})TAGCCATCGCATTGC(.{6})TACCTCTGAGCTGAA(.{6})ACG(.{8})GAC.*/\1\2\3\4/g
                /TCTTCCGATCT(.{6})(.{10})/ {
                s/TCTTCCGATCT(.{6})(.{10})/\1\2/g
                n
                n
                s/.*(.{6}).{15}(.{6}).{15}(.{6}).{3}(.{8}).{3}/\1\2\3\4/g
                s/.{11}(.{6})(.{10})/\1\2/g
                }' $convFile > ${crIN}/.temp
            mv ${crIN}/.temp $convFile
        done