diff --git a/dge_workflow/dge_utils.sh b/dge_workflow/dge_utils.sh index 3c0c6dc684f3470eba94151376729c5f9c7992be..be190f0fc1b1d15c65f8f1c2daa79771005fdf88 100755 --- a/dge_workflow/dge_utils.sh +++ b/dge_workflow/dge_utils.sh @@ -298,8 +298,14 @@ fi bamsSplit="" for label in $(echo $labels | tr ", " " "); do + # DEBUG label="liver"; label="cyst" echo $label - labelBams=$(echo "$allBams" | grep $label | xargs echo -n | tr ' ' ',') + + ## grep the bam names excluding the path + echo "$allBams" | xargs -n1 basename | grep $label > ${label}.cuff_bamlist + labelBams=$(echo "$allBams" | grep -Ff ${label}.cuff_bamlist | xargs echo -n | tr ' ' ',') + # echo "$allBams" | grep -Ff ${label}.bamlist | xargs -n1 echo + bamsSplit+=$labelBams" " done #echo $bamsSplit @@ -312,8 +318,8 @@ echo $gtfFile $bamsSplit | tr "," " " | xargs ls -la cdCmd="cuffdiff -L $labels -o . -p 10 $gtfFile $bamsSplit" echo "cuffdiff cmd is: $cdCmd" -# eval $cdCmd -mysub "${project}__cuffdiff" "$cdCmd" -q long -n 4 -R span[hosts=1] | blockScript +eval $cdCmd +#mysub "${project}__cuffdiff" "$cdCmd" -q long -n 4 -R span[hosts=1] | blockScript ## create a cuffdiff db using cummerbund in a temporary directory to avoid locking problems @@ -324,7 +330,7 @@ cp -r . $tmpDbDir genome=$(echo $gtfFile | cut -f8 -d'/' | tr '[:upper:]' '[:lower:]'); echo "genome is $genome" ## make sure to use temp-r to avoid file locking problems -export R_LIBS=/tmp/r_index +#export R_LIBS=/tmp/r_index echo ' require(cummeRbund) @@ -333,7 +339,7 @@ gtfFile=commandArgs(T)[2] genome=commandArgs(T)[3] ## note without providing the gtf the db is much smaller readCufflinks(dir=dbDir, rebuild=T, gtf=gtfFile, genome=genome) -' | R -q --no-save --no-restore --args $tmpDbDir $gtfFile $genome +' | R -q --no-save --no-restore --args "$tmpDbDir" "$gtfFile" "$genome" if [ ! -f $tmpDbDir/cuffData.db ]; then >&2 echo "cummerbund failed to create cuffidff sqlite db"; return;