Files
hartman-server/workflow/.old/templates/qhtcp/REMcMaster2.sh
2024-07-27 17:56:56 -04:00

93 líneas
2.6 KiB
Bash

#REMcMaster.sh Is to perform all REMc task and to operate from source directory REMc
#Step 0 Perform JoinInteractExps3dev.R to create the "REMcRdy_lm_only.csv" and "Shift_only.csv" files
Rscript JoinInteractExps3dev.R
#Step1 Perform REMc java utility using file input file REMcRdy_lm_only.csv
#and producing REMcRdy_lm_only.csv-finalTable.csv
sh ./REMcJar2.sh
wait #wait isn't holding process until Jar is complete. Should take at least 3minuites
#Step 2
if [ -f "REMcRdy_lm_only.csv-finalTable.csv" ]; then
echo "REMcRdy_lm_only.csv-finalTable.csv exists."
#Jarflag= 1
#echo "Jarflag = $Jarflag"
echo "REMcJar... .sh completed"
else
echo "REMcJar failed"
wait
exit
fi
echo "start Step2"
#Step2 If REMcJar successfully produces "REMcRdy_lm_only.csv-finalTable.csv"
#then add shift values back to the "REMcRdy_lm_only.csv-finalTable.csv"
#and output it as "REMcWithShift.csv" to be used to produce the REMc Heatmaps.
if [ -f "REMcRdy_lm_only.csv-finalTable.csv" ]; then
echo "REMcRdy_lm_only.csv-finalTable.csv exists."
Rscript ./AddShiftVals2.R
wait
echo "AddShiftVals2.R executed"
wait
fi
#Step3 Execute REMcHeatmaps_zscores.R contingent upon "REMcWithShift.csv" being created.
cd REMcHeatmaps
if [ -f "REMcWithShift.csv" ]; then
echo "REMcWithShift.csv exists."
fi
cd ..
Rscript REMcHeatmaps_zscores.R
wait
echo "REMcHeatmaps executed"
wait
pdftk *.pdf output compiledREMcHeatmaps.pdf
wait
#Step4 Begin the process of GTF contingent upon "REMcRdy_lm_only.csv-finalTable.csv"
# being produced by "REMcJar.sh" (Step1)
if [ -f "REMcRdy_lm_only.csv-finalTable.csv" ]; then
echo "REMcRdy_lm_only.csv-finalTable.csv exists."
python2 DconJG2.py REMcRdy_lm_only.csv-finalTable.csv GTF/Process/
#python2 DconJG.py REMcRdy_lm_only.csv-finalTable.csv 12 GTF/Process/
else
echo "DconJG.py failed"
wait
exit
fi
if [ -f "GTF/Process/REMcRdy_lm_only/1-0-0-finaltable.csv" ]; then
echo "Begin copying REMcRdy_lm_only to /Function and /Component"
cp -r GTF/Process/REMcRdy_lm_only GTF/Function/
echo "Copy to Function complete"
wait
cp -r GTF/Process/REMcRdy_lm_only GTF/Component/
echo "Copy to Component complete"
wait
else
echo "COPY failed"
wait
exit
fi
if [ -f "GTF/Function/REMcRdy_lm_only/1-0-0-finaltable.csv" ]; then
echo "Begin concurrent running of GTF tasks"
sh ./mProcess.sh &
sh ./mFunction.sh &
sh ./mComponent.sh &
echo "GTF ontologies run in background"
wait
else
echo "GTFontologies failed"
exit
echo "masterDev.sh Finished"
exit
fi