Mercurial > repos > melissacline > ucsc_xena_platform
changeset 2:6eeb3ca663fb
Fixed dataset delete bugs (the full pathname was needed) plus changed xena_import to give a checkbox for turning on column normalization
author | melissacline |
---|---|
date | Wed, 14 Jan 2015 15:21:09 -0800 |
parents | ca4510434eda |
children | 98b498545a52 |
files | xena_delete.py xena_import.py xena_import.xml |
diffstat | 3 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/xena_delete.py Wed Jan 14 12:47:23 2015 -0800 +++ b/xena_delete.py Wed Jan 14 15:21:09 2015 -0800 @@ -29,9 +29,11 @@ # is generated, output a traceback and exit with nonzero status. If # no exception was generated, indicate a successful import and exit # with zero status. - xenaDeleteCmd = "java -jar %s --delete %s -p %s" % (xena.jarPath(), - args.datasetName, - xena.port()) + xenaDeleteCmd = "java -jar %s --delete %s/%s -p %s" % (xena.jarPath(), + xenaFileDir, + args.datasetName, + xena.port()) + print "Issuing command", xenaDeleteCmd try: subprocess.call(xenaDeleteCmd, shell=True) except:
--- a/xena_import.py Wed Jan 14 12:47:23 2015 -0800 +++ b/xena_import.py Wed Jan 14 15:21:09 2015 -0800 @@ -52,6 +52,7 @@ parser.add_argument("--type", type=str) parser.add_argument("--dataSubType", type=str, default=None) parser.add_argument("--label", type=str, default=None) + parser.add_argument("--colNormalization", type=bool, default=False) args = parser.parse_args() fp2 = open(args.outfile, "w") @@ -78,6 +79,10 @@ metadata['dataSubType'] = args.dataSubType if args.label is not None: metadata['label'] = args.label + if args.colNormalization: + metadata['colNormalization'] = "true" + else: + updateColNormalization(metadata) jsonMetadata = json.dumps(metadata, indent=2) fp = open(jsonMetadataTargetPathname, "w") fp.write("%s\n" % (jsonMetadata))
--- a/xena_import.xml Wed Jan 14 12:47:23 2015 -0800 +++ b/xena_import.xml Wed Jan 14 15:21:09 2015 -0800 @@ -24,6 +24,9 @@ --label "${xenaInputData.name}" #end if #end if + #if $colNormalization: + --colNormalization 1 + #end if </command> <inputs> <param format="data" type="data" name="xenaInputData" label="Data to import to Xena" optional="false"/> @@ -112,6 +115,7 @@ <param type="text" name="label" label="Display Name (Optional)" optional="true"/> </when> </conditional> + <param type="boolean" name="colNormalization" label="Apply Column Normalization" checked="false"/> </inputs> <outputs> <data format="txt" name="outfile"/>