Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Pop-up box warning if 'groups.tab' or 'contrast.tab' are not in RNA-s…
Browse files Browse the repository at this point in the history
…eq working directory before dry-running
  • Loading branch information
skchronicles committed Oct 12, 2018
1 parent d908ec2 commit b97bf16
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion gui/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,17 @@ def init_work_dir( self ):
showinfo( "Success", "The work directory has successfully initialized!")
else :
showerror( "Symlink failed", "" )


def popup_warning(self, filename):
try:
fname = self.workpath.get() + '/' + filename
fh = open(fname, 'r')
return False
except IOError:
print("Could not find required file {} in your working directory:{}".format(filename, self.workpath.get()))
showerror("Error","{0} file not found!\nDid you initialize the working directory?\nDid you copy {0} into the working directory?".format(filename))
return True

def popup_window( self, text, filename ) :
top = Toplevel()

Expand Down Expand Up @@ -691,6 +701,11 @@ def readpaste( self, ftype, comments ):
return

def dryrun( self ) :
pl = self.pipeline_name
print("Drying-running: {}".format(pl))
if pl == 'RNAseq':
if self.popup_warning('groups.tab') or self.popup_warning('contrasts.tab'):
return
self.makejson("none")
#self.run_button.config( state='active' )
return self.cmd( "--dryrun -p -s %s/Snakefile --rerun-incomplete -d %s" % ( self.workpath.get(), self.workpath.get()))
Expand Down

0 comments on commit b97bf16

Please sign in to comment.