Commit f9f77378 authored by TomKellyGenetics's avatar TomKellyGenetics
Browse files

correct restoring cloupe

parent be5ec5f5
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
@@ -1558,17 +1558,26 @@ if [[ $lock -eq 0 ]]; then
            echo "restore cloupe" 
        fi
        ## list cloupe output as (not null)
        if [[ $verbose  ]]; then
            echo "sed -i '/output_for_cloupe/s/null/CLOUPE_PREPROCESS\.output_for_cloupe/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro"
        fi
        sed -i '/output_for_cloupe/s/null/CLOUPE_PREPROCESS\.output_for_cloupe/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        ## add cloupe to outputs
        sed -i '/out cloupe cloupe/ {s/^#*#//g}' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        if [[ $verbose  ]]; then
            echo "sed -i '/out cloupe *cloupe/ {s/^#*#//g}' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro"
        fi
        sed -i '/out cloupe *cloupe/ {s/^#*#//g}' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        #restore 11 lines for cloupe preprocess call (all following steps are needed to be called together or the call will break)
        ## restore defining CLOUPE_PREPROCESS
        sed -i 's/^#*#@include "_cloupe_stages.mro"/@include "_cloupe_stages.mro"g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        if [[ $verbose  ]]; then
            echo "sed -i 's/^#*#@include "_cloupe_stages.mro"/@include "_cloupe_stages.mro"/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro"
        fi
        sed -i 's/^#*#@include "_cloupe_stages.mro"/@include "_cloupe_stages.mro"g/' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        ## remove listing CLOUPE in output
        sed -i '/output_for_cloupe/s/s/^#*#//g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        sed -i '/output_for_cloupe/s/^#*#//g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        ## remove calling CLOUPE_PREPROCESS
        ### iterate over all files calling CLOUPE_PREPROCESS
        for file in $(grep -l  "call CLOUPE_PREPROCES"  /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/mro/*.mro )
        for file in $(grep -l  "call CLOUPE_PREPROCESS"  /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/mro/*.mro )
        do
            #find  start of CLOUPE_PREPROCESS call
            num=$(grep -n "call CLOUPE_PREPROCESS" $file |  head -n 1 | cut -d":" -f1)
@@ -1587,15 +1596,15 @@ if [[ $lock -eq 0 ]]; then
        ## list cloupe output as null
        sed -i '/output_for_cloupe/s/CLOUPE_PREPROCESS\.output_for_cloupe/null/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        ## remove cloupe from outputs
        sed -i '/out cloupe cloupe/ {s/^/#/g}' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        sed -i '/out cloupe *cloupe/ {s/^/#/g}' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        #remove 11 lines for cloupe preprocess call (all following steps are needed to be suppressed together or call will break)
        ## remove defining CLOUPE_PREPROCESS
        sed -i 's/@include "_cloupe_stages.mro"/#@include "_cloupe_stages.mro"g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        sed -i 's/@include "_cloupe_stages.mro"/#@include "_cloupe_stages.mro"/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro
        ## remove listing CLOUPE in output
        sed -i '/output_for_cloupe/s/s/^/#/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        sed -i '/output_for_cloupe/s/^/#/g' ${cellrangerpath}-cs/${cellrangerversion}/mro/*mro 
        ## remove calling CLOUPE_PREPROCESS
        ### iterate over all files calling CLOUPE_PREPROCESS
        for file in $(grep -l  "call CLOUPE_PREPROCES"  /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/mro/*.mro )
        for file in $(grep -l  "call CLOUPE_PREPROCESS"  /home/tom/local/bin/cellranger-3.0.2/cellranger-cs/3.0.2/mro/*.mro )
        do
            #find  start of CLOUPE_PREPROCESS call
            num=$(grep -n "call CLOUPE_PREPROCESS" $file |  head -n 1 | cut -d":" -f1)