Skip to content
Snippets Groups Projects
Commit 08c29098 authored by Holger Brandl's avatar Holger Brandl
Browse files

create local copy of spinnable script for better decoupling of analysis

parent 16a9b342
No related branches found
No related tags found
No related merge requests found
...@@ -298,8 +298,14 @@ fi ...@@ -298,8 +298,14 @@ fi
bamsSplit="" bamsSplit=""
for label in $(echo $labels | tr ", " " "); do for label in $(echo $labels | tr ", " " "); do
# DEBUG label="liver"; label="cyst"
echo $label 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" " bamsSplit+=$labelBams" "
done done
#echo $bamsSplit #echo $bamsSplit
...@@ -312,8 +318,8 @@ echo $gtfFile $bamsSplit | tr "," " " | xargs ls -la ...@@ -312,8 +318,8 @@ echo $gtfFile $bamsSplit | tr "," " " | xargs ls -la
cdCmd="cuffdiff -L $labels -o . -p 10 $gtfFile $bamsSplit" cdCmd="cuffdiff -L $labels -o . -p 10 $gtfFile $bamsSplit"
echo "cuffdiff cmd is: $cdCmd" echo "cuffdiff cmd is: $cdCmd"
# eval $cdCmd eval $cdCmd
mysub "${project}__cuffdiff" "$cdCmd" -q long -n 4 -R span[hosts=1] | blockScript #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 ## create a cuffdiff db using cummerbund in a temporary directory to avoid locking problems
...@@ -324,7 +330,7 @@ cp -r . $tmpDbDir ...@@ -324,7 +330,7 @@ cp -r . $tmpDbDir
genome=$(echo $gtfFile | cut -f8 -d'/' | tr '[:upper:]' '[:lower:]'); echo "genome is $genome" genome=$(echo $gtfFile | cut -f8 -d'/' | tr '[:upper:]' '[:lower:]'); echo "genome is $genome"
## make sure to use temp-r to avoid file locking problems ## make sure to use temp-r to avoid file locking problems
export R_LIBS=/tmp/r_index #export R_LIBS=/tmp/r_index
echo ' echo '
require(cummeRbund) require(cummeRbund)
...@@ -333,7 +339,7 @@ gtfFile=commandArgs(T)[2] ...@@ -333,7 +339,7 @@ gtfFile=commandArgs(T)[2]
genome=commandArgs(T)[3] genome=commandArgs(T)[3]
## note without providing the gtf the db is much smaller ## note without providing the gtf the db is much smaller
readCufflinks(dir=dbDir, rebuild=T, gtf=gtfFile, genome=genome) 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 if [ ! -f $tmpDbDir/cuffData.db ]; then
>&2 echo "cummerbund failed to create cuffidff sqlite db"; return; >&2 echo "cummerbund failed to create cuffidff sqlite db"; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment