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

made the input file for each run unique.

parent fc514a3c
Loading
Loading
Loading
Loading
+23 −29
Original line number Diff line number Diff line
@@ -530,6 +530,10 @@ if [[ -z $id ]]; then
        exit 1
    fi
fi
crIN=${crIN}_$id
if [[ ! -d ${crIN} ]]; then
    convert=true
fi
##########


@@ -785,11 +789,8 @@ fi
echo "creating a folder for all cellranger input files ..."
convFiles=()

if [[ ! -d $crIN ]] || [[ $lastcall != $technology ]]; then
if [[ ! -d $crIN ]]; then
    echo " directory $crIN created for converted files"
    if [[ -d $crIN ]]; then
        rm -rf $crIN
    fi
    mkdir $crIN
else
    echo " directory $crIN already exists"
@@ -803,17 +804,14 @@ crR1s=()
for fq in "${read1[@]}"; do
    to=`basename $fq`
    to="${crIN}/${to}"
    to=$(echo "$to" | sed 's/\.gz$//')
    crR1s+=($to)
    
    if [[ $convert == "true" ]]; then
    echo " handling $fq ..."
        convFiles+=($to)
        if [[ $fq == *'.gz' ]]; then
            gunzip -c $fq > $to
        else
            cp -T $fq $to
    if [[ ! -f $to ]] || [[ $convert == "true" ]]; then
        cp -f $fq $to
    fi
    if [[ $convert == "true" ]]; then
        convFiles+=($to)
    fi
done

@@ -824,13 +822,9 @@ for fq in "${read2[@]}"; do
    to=$(echo "$to" | sed 's/\.gz$//')
    crR2s+=($to)
    
    if [[ $convert == "true" ]]; then
    echo " handling $fq ..."
        if [[ $fq == *'.gz' ]]; then
            gunzip -c $fq > $to
        else
            cp -T $fq $to
        fi
    if [[ ! -f $to ]] || [[ $convert == "true" ]]; then
        cp -f $fq $to
    fi
done
##########