ana.registerFile(valDirKey, 'galaxyOutput', galaxyOutputDir) ana.createOutFile(valDirKey, 'nonGalaxyOutput', '%s_sample_fastqc', ext='dir') ana.createOutFile(valZipKey, 'nonGalaxyOutput', '%s_sample_fastqc', ext='zip') ana.createOutFile(valJsonKey, 'nonGalaxyOutput', '%s_validate', ext='json') # Galaxy needs to know about a single file within the dir. While it is moved to the analysisDir # as part of the htmlDir, It must be manually moved for galaxy. Thus, the standard # analysis file forwarding is slightly modified here: ana.registerFile(valHtmlKey, 'galaxyOutput', galaxyOutputHtml) nonGalaxyOutput = ana.createOutFile(valHtmlKey,'nonGalaxyOutput', \ '%s_sample_fastqc/fastqc_report', ext='html' ) #ana.registerFile(valZipKey,'galaxyOutput',galaxyOutputZip) # No need: galaxy zips it anyway jsonOut = ana.registerFile(valJsonKey, 'galaxyOutput', galaxyOutSummary) # This step needs closer control of how files are delivered: ana.deliveryKeys([valDirKey, valZipKey, valJsonKey]) # Restrict file delivery to just these ana.deliverToGalaxyKeys([valDirKey, valZipKey, valHtmlKey, valJsonKey ]) # Restrict delivery to these and in order ## TODO: methods for delivering json # Establish step and run it: step = FastqValidationStep(ana, suffix) err = step.run() # Determine success or failure by reading json output # NOTE: if this test were in FastqValidationStep(), the results would not be delivered to galaxy! if err == 0: fp = open(jsonOut, 'r') valJson = json.load(fp) fp.close()
ana.registerFile(valDirKey,'galaxyOutput',galaxyOutputDir) ana.createOutFile(valDirKey,'nonGalaxyOutput', '%s_sample_fastqc', ext='dir' ) ana.createOutFile(valZipKey,'nonGalaxyOutput', '%s_sample_fastqc', ext='zip' ) ana.createOutFile(valJsonKey,'nonGalaxyOutput','%s_validate', ext='json' ) # Galaxy needs to know about a single file within the dir. While it is moved to the analysisDir # as part of the htmlDir, It must be manually moved for galaxy. Thus, the standard # analysis file forwarding is slightly modified here: ana.registerFile(valHtmlKey,'galaxyOutput',galaxyOutputHtml) nonGalaxyOutput = ana.createOutFile(valHtmlKey,'nonGalaxyOutput', \ '%s_sample_fastqc/fastqc_report', ext='html' ) #ana.registerFile(valZipKey,'galaxyOutput',galaxyOutputZip) # No need: galaxy zips it anyway jsonOut = ana.registerFile(valJsonKey,'galaxyOutput',galaxyOutSummary) # This step needs closer control of how files are delivered: ana.deliveryKeys([valDirKey,valZipKey,valJsonKey]) # Restrict file delivery to just these ana.deliverToGalaxyKeys([valDirKey,valZipKey,valHtmlKey,valJsonKey]) # Restrict delivery to these and in order ## TODO: methods for delivering json # Establish step and run it: step = FastqValidationStep(ana,suffix) err = step.run() # Determine success or failure by reading json output # NOTE: if this test were in FastqValidationStep(), the results would not be delivered to galaxy! if err == 0: fp = open(jsonOut, 'r') valJson = json.load(fp) fp.close() grade = str(valJson['FastQC']['basic'])