From d0c13d7ec425cefd76aba3e7d6373ae03ecc5ef5 Mon Sep 17 00:00:00 2001 From: Guruprasad Anada Date: Fri, 3 Apr 2009 13:25:01 -0400 Subject: [PATCH] Added a new option to specify minimum match value in the liftOver tool. --- tools/extract/liftOver_wrapper.py | 12 ++++++++---- tools/extract/liftOver_wrapper.xml | 10 ++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/extract/liftOver_wrapper.py b/tools/extract/liftOver_wrapper.py index a9f88d4af05..f15fead0d2b 100644 --- a/tools/extract/liftOver_wrapper.py +++ b/tools/extract/liftOver_wrapper.py @@ -12,20 +12,24 @@ def stop_err(msg): sys.stderr.write(msg) sys.exit() -if len( sys.argv ) != 6: - stop_err( "USAGE: prog input out_file1 out_file2 input_dbkey output_dbkey" ) +if len( sys.argv ) != 7: + stop_err( "USAGE: prog input out_file1 out_file2 input_dbkey output_dbkey minMatch" ) infile = sys.argv[1] outfile1 = sys.argv[2] outfile2 = sys.argv[3] in_dbkey = sys.argv[4] mapfilepath = sys.argv[5] - +minMatch = sys.argv[6] +try: + assert float(minMatch) +except: + minMatch = 0.1 #ensure dbkey is set if in_dbkey == "?": stop_err( "Input dataset genome build unspecified, click the pencil icon in the history item to specify it." ) -cmd_line = "liftOver " + infile + " " + mapfilepath + " " + outfile1 + " " + outfile2 + " > /dev/null 2>&1" +cmd_line = "liftOver -minMatch=" + minMatch + " " + infile + " " + mapfilepath + " " + outfile1 + " " + outfile2 + " > /dev/null 2>&1" if not os.path.isfile( mapfilepath ): stop_err( "%s mapping is not currently available." % ( mapfilepath.split('/')[-1].split('.')[0] ) ) diff --git a/tools/extract/liftOver_wrapper.xml b/tools/extract/liftOver_wrapper.xml index 99bc7dee46b..a19784a2a21 100644 --- a/tools/extract/liftOver_wrapper.xml +++ b/tools/extract/liftOver_wrapper.xml @@ -1,11 +1,11 @@ between assemblies and genomes - liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey + liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey $minMatch - + @@ -13,7 +13,8 @@ - + + @@ -26,7 +27,8 @@ - + +