def parse_arguments()

in src/main/python/rna_qc_metrics.py [0:0]


def parse_arguments(argv):
	sample, rnaseq, duplicate,gcbias, project, run, date= None,None,None,None,None,None,None
	
	try:
		opts, args = getopt.getopt(argv[1:], "h", \
					["sample=","rnaseq=","duplicate=","gcbias=","output=","project=","run=","date=","help"])
	except getopt.GetoptError as err:
		# print help information and exit:
		print str(err)  # will print something like "option -a not recognized"
		usage()

	for opt, arg in opts:
		if opt == ('-h','--help'):
			usage()
		
		elif opt in ("--rnaseq"):
			rnaseq = arg
			if not os.path.isfile(rnaseq):
				raise ArgumentError("Argument Error: Invalid rna sequencing summary file passed.")
		
		elif opt in ("--duplicate"):
			duplicate = arg
			if not os.path.isfile(duplicate):
				raise ArgumentError("Argument Error: Invalid duplicate summary file passed.")
		
		elif opt in ("--gcbias"):
			gcbias = arg
			if not os.path.isfile(gcbias):
				raise ArgumentError("Argument Error: Invalid gcbias summary file passed.")
				
		elif opt in ("--output"):
			outfile = arg
		
		elif opt in ("--sample"):
			sample = arg
		
		elif opt in ("--project"):
			project = arg
			
		elif opt in ("--run"):
			run = arg
			
		elif opt in ("--date"):
			date = arg
			
		else:
			raise ArgumentError("Bad argument: I don't know what %s is" % arg)
	
    # return argument values
	return sample, rnaseq, duplicate, gcbias, project, run, date, outfile