Commit ebc55103 authored by kai.b's avatar kai.b
Browse files

monir changes to the --verbose comments

parent 39c9401e
Loading
Loading
Loading
Loading
+71 −61
Original line number Diff line number Diff line
@@ -995,13 +995,14 @@ if [[ $setup == "false" ]]; then
fi

if [[ $verbose ]]; then
    echo "  ${#read1[@]} read1s: ${read1[@]}"
    echo "  ${#read2[@]} read2s: ${read2[@]}"
    echo " Input files prost-curation 1"
    echo "  ${#read1[@]}files - read1s: ${read1[@]}"
    echo "  ${#read2[@]}files - read2s: ${read2[@]}"
    if [[ ${#index1[@]} -gt 0 ]]; then
        echo "  ${#index1[@]} I1s: ${index1[@]}"
        echo "  ${#index1[@]}files - I1s: ${index1[@]}"
    fi
    if [[ ${#index2[@]} -gt 0 ]]; then
        echo "  ${#index2[@]} I2s: ${index2[@]}"
        echo "  ${#index2[@]}files - I2s: ${index2[@]}"
    fi
    echo "  number of these files are as expected"
fi
@@ -1101,13 +1102,14 @@ for key in ${keys[@]}; do
done

if [[ $verbose ]]; then
    echo "  ${#read1[@]} read1s: ${read1[@]}"
    echo "  ${#read2[@]} read2s: ${read2[@]}"
    echo " Input files post-curation 2"
    echo "  ${#read1[@]}files - read1s: ${read1[@]}"
    echo "  ${#read2[@]}files - read2s: ${read2[@]}"
    if [[ ${#index1[@]} -gt 0 ]]; then
        echo "  ${#index1[@]} I1s: ${index1[@]}"
        echo "  ${#index1[@]}files - I1s: ${index1[@]}"
    fi
    if [[ ${#index2[@]} -gt 0 ]]; then
        echo "  ${#index2[@]} I2s: ${index2[@]}"
        echo "  ${#index2[@]}files -  I2s: ${index2[@]}"
    fi
    echo "  files exist, with extentions compatible with launch_universc.sh"
fi
@@ -1288,13 +1290,14 @@ for key in ${keys[@]}; do
done

if [[ $verbose ]]; then
    echo "  ${#read1[@]} read1s: ${read1[@]}"
    echo "  ${#read2[@]} read2s: ${read2[@]}"
    echo " Input files post-curation 3"
    echo "  ${#read1[@]}files - read1s: ${read1[@]}"
    echo "  ${#read2[@]}files - read2s: ${read2[@]}"
    if [[ ${#index1[@]} -gt 0 ]]; then
        echo "  ${#index1[@]} I1s: ${index1[@]}"
        echo "  ${#index1[@]}files - I1s: ${index1[@]}"
    fi
    if [[ ${#index2[@]} -gt 0 ]]; then
        echo "  ${#index2[@]} I2s: ${index2[@]}"
        echo "  ${#index2[@]}files - I2s: ${index2[@]}"
    fi
    echo "  names of these files are compatible with launch_universc.sh"
fi
@@ -1375,13 +1378,14 @@ if [[ "$technology" == "indrop-v2" ]] || [[ "$technology" == "indrop-v3" ]] || [
fi

if [[ $verbose ]]; then
    echo "  ${#read1[@]} read1s: ${read1[@]}"
    echo "  ${#read2[@]} read2s: ${read2[@]}"
    echo " Input files post-curation 4"
    echo "  ${#read1[@]}files - read1s: ${read1[@]}"
    echo "  ${#read2[@]}files - read2s: ${read2[@]}"
    if [[ ${#index1[@]} -gt 0 ]]; then
        echo "  ${#index1[@]} I1s: ${index1[@]}"
        echo "  ${#index1[@]}files - I1s: ${index1[@]}"
    fi
    if [[ ${#index2[@]} -gt 0 ]]; then
        echo "  ${#index2[@]} I2s: ${index2[@]}"
        echo "  ${#index2[@]}files -  I2s: ${index2[@]}"
    fi
    echo "  input files adjusted for technology-specific conditions"
fi
@@ -1399,12 +1403,12 @@ elif [[ ${#index1[@]} -gt 0 ]]; then
fi

if [[ $verbose ]]; then
    echo "reads:" ${read12[@]}
    echo "files to be curated:" ${read12[@]}
fi

for fq in "${read12[@]}"; do
    if [[ $verbose ]]; then
        echo "read: $fq"
        echo " read file: $fq"
    fi
    name=`basename $fq`
    name=${name%.*}
@@ -1429,13 +1433,16 @@ for fq in "${read12[@]}"; do
        exit 1
    fi
    
    if [[ $verbose == true ]]; then
       echo "SAMPLE: $SAMPLE"
       echo "sample (field): $sn"
    if [[ $verbose ]]; then
        echo "  $sn(extracted from file) <- $fq"
        echo "  SAMPLE NAME: $SAMPLE"
    fi

    if [[ ${sn} != $SAMPLE ]]; then
        if [[ -z $SAMPLE ]]; then
            if [[ $verbose ]]; then
                echo "  setting SAMPLE NAME to ${sn}"
            fi
            SAMPLE=${sn}
        else
            echo "Error: some samples are labeled $SAMPLE while others are labeled $sn. cellranger can only handle files from one sample at a time."
@@ -1584,7 +1591,7 @@ fi



#####check if reference is present#####
####check if reference is present#####
if [[ -z $reference ]]; then
    if [[ $setup == "false" ]] || [[ ${#read1[@]} -ne 0 ]] || [[ ${#read2[@]} -ne 0 ]]; then
        echo "Error: option --reference is required";
@@ -1687,6 +1694,7 @@ crIN=${crIN}_${id}
##########



#####checking if crIN exists#####
if [[ ! -d $crIN ]]; then
    convert=true
@@ -1859,6 +1867,7 @@ if [[ $lock -eq 0 ]]; then
            sed -i "s/assert np.array_equal(in_mc.get_barcodes(), barcodes)/#assert np.array_equal(in_mc.get_barcodes(), barcodes)/g" ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/molecule_counter.py
        fi
    fi
    
    #backup 10x navbar
    if [[ ! -f ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.backup.html ]];then
        cp ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.html ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.backup.html
@@ -1872,6 +1881,7 @@ if [[ $lock -eq 0 ]]; then
        if [[ -f ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.backup.html ]];then
            cp ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.backup.html ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.html
        fi
        
        #restore cloupe generation
        if [[ $verbose ]]; then
            echo "restore cloupe" 
@@ -1886,6 +1896,7 @@ if [[ $lock -eq 0 ]]; 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
        if [[ $verbose ]]; then
@@ -1896,8 +1907,7 @@ if [[ $lock -eq 0 ]]; then
        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_PREPROCESS"  ${cellrangerpath}-cs/${cellrangerversion}/mro/*.mro )
        do
        for file in $(grep -l  "call CLOUPE_PREPROCESS"  ${cellrangerpath}-cs/${cellrangerversion}/mro/*.mro ); do
            #find  start of CLOUPE_PREPROCESS call
            num=$(grep -n "call CLOUPE_PREPROCESS" $file |  head -n 1 | cut -d":" -f1)
            #find end of CLOUPE_PREPROCESS call
@@ -1913,6 +1923,7 @@ if [[ $lock -eq 0 ]]; then
            #line of HTML in header is removed
            sed '/class="logo"/d' ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.backup.html > ${cellrangerpath}-cs/${cellrangerversion}/lib/python/cellranger/webshim/template/navbar.html
        fi
        
        #disable cloupe generation
        if [[ $verbose ]]; then
            echo "disable cloupe"
@@ -2325,7 +2336,6 @@ else
            
            #returns a combined R1 file with I1-I2-R1 concatenated (I1 and I2 are R1 barcode)
            mv $crIN/Concatenated_File.fastq ${convR1}

        done
    fi