#runfolder=`pwd | sed -e 's/^.*\///'`
#changed for the HTSW merged
fullpath=$2
-#echo "fullpath is $fullpath"
+echo "fullpath is $fullpath"
runfolder=`echo $fullpath | sed -e 's/^.*\///'`
-#echo "runfolder is $runfolder"
+echo "runfolder is $runfolder"
if [ $3 ] && [ $3 == 'init' ]
exptrackmainsc="exp_track_main.py"
# -- Check Image folders and find out cycle number
#tocycle=`$HOME/EXPTRACK/CheckImageFolders`
-#tocycle=`CheckImageFolders`
+echo "calling CheckImageFolders"
+tocycle=`./CheckImageFolders $fullpath`
## Uncomment this if you want to force a cycle number:
-tocycle=36
+#tocycle=36
if [ $tocycle -gt 0 ] && [ $tocycle -lt 37 ]
then echo ""
else
- echo "PROBLEM: Check Image folders failed to a cycle between 0 and 36. Found: $tocycle"
+ echo "PROBLEM: CheckImagefolders failed to return a cycle number between 0 and 36. Returned: '$tocycle'"
echo "Note: to input cycle number edit the MainP..Script un-comment ##tocycle=36"
echo " --- tocycle SET to 0 --- "
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "FlowcellId: $fcid"
echo "------------------------------------------------------"
echo "Config File generation"
-#rm config.txt
+rm config.txt
python $exptrackmainsc getconfile $fcid $runfolder
if [ -f config.txt ]
then
echo "ERROR: config.txt not found."
exit
fi
-#cat config.txt
+cat config.txt
echo ""
echo "------------------------------------------------------"
echo "LaneNames.xml file generation: "
echo ""
-#rm LaneNames.xml
+rm LaneNames.xml
python $exptrackmainsc getLanesNames $fcid
if [ -f LaneNames.xml ]
then
echo "ERROR: LaneNames.xml not found."
exit
fi
-#cat LaneNames.xml
+cat LaneNames.xml
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Will run Cycles: 1 to $tocycle"
echo " and Bustard finished.txt found."
if [ -f $gerfinished ]
then
- phaseMsg='It seems like Solexa pipeline has completed (found all 3 finished.txt files). Procees to next steps (CollectReads etc..)'
+ phaseMsg='Looks like Solexa pipeline has completed (found all 3 finished.txt files).'
#? [Yes/[Any Key]] (Any Key = Start from scratch)'
nextDo='CollectReads'
echo " and Gerald finished.txt found."
if [ $confirm == "Yes" ]
then
#Launch MPListener in the background
- echo " ..... supposed to run MPListener in the background here ...."
- ##NOT READY YET MPListener $fcid $runfolder $tocycle &
+ echo " ... starting MPListener in the background ..."
+ #./MPListener $fcid $runfolder $tocycle &
+ ./MPListener $fcid $fullpath $tocycle &
if [ $nextDo == "Bustard" ]
then
#Change dir down to Bustard run folder
python $exptrackmainsc updsts $fcid $runfolder 0 ERROR:_Need_Specific_Firecrest_Dir
exit
else
- echo "ERROR: Firecrest directory NOT FOUND."
+ echo "ERROR: Firecrest directory NOT FOUND. Looked for /^C1-$tocycle.*_Firecrest.*/"
python $exptrackmainsc updsts $fcid $runfolder 0 ERROR:_Firecrest_Dir_Not_Found
exit
fi