details: http://www.bx.psu.edu/hg/galaxy/rev/e2be1e679ab1 changeset: 1747:e2be1e679ab1 user: guru date: Fri Apr 03 13:25:01 2009 -0400 description: Added a new option to specify minimum match value in the liftOver tool. 2 file(s) affected in this change: tools/extract/liftOver_wrapper.py tools/extract/liftOver_wrapper.xml diffs (69 lines): diff -r 1c923b889e90 -r e2be1e679ab1 tools/extract/liftOver_wrapper.py --- a/tools/extract/liftOver_wrapper.py Fri Mar 27 16:55:34 2009 -0400 +++ b/tools/extract/liftOver_wrapper.py Fri Apr 03 13:25:01 2009 -0400 @@ -12,20 +12,24 @@ 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 -r 1c923b889e90 -r e2be1e679ab1 tools/extract/liftOver_wrapper.xml --- a/tools/extract/liftOver_wrapper.xml Fri Mar 27 16:55:34 2009 -0400 +++ b/tools/extract/liftOver_wrapper.xml Fri Apr 03 13:25:01 2009 -0400 @@ -1,11 +1,11 @@ <tool id="liftOver1" name="Convert genome coordinates"> <description> between assemblies and genomes</description> - <command interpreter="python">liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey</command> + <command interpreter="python">liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey $minMatch</command> <inputs> <param format="interval" name="input" type="data" label="Convert coordinates of"> <validator type="unspecified_build" /> <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="Liftover mappings are currently not available for the specified build." /> - </param> + </param> <param name="to_dbkey" type="select" label="To"> <options from_file="liftOver.loc"> <column name="name" index="1"/> @@ -13,7 +13,8 @@ <column name="dbkey" index="0"/> <filter type="data_meta" ref="input" key="dbkey" column="0" /> </options> - </param> + </param> + <param name="minMatch" size="10" type="float" value="0.10" label="Minimum ratio of bases that must remap" /> </inputs> <outputs> <data format="input" name="out_file1" /> @@ -26,7 +27,8 @@ <tests> <test> <param name="input" value="5.bed" dbkey="hg18" ftype="bed" /> - <param name="to_dbkey" value="/depot/data2/galaxy/hg18/liftOver/hg18ToPanTro2.over.chain" /> + <param name="to_dbkey" value="/depot/data2/galaxy/hg18/liftOver/hg18ToPanTro2.over.chain" /> + <param name="misMatch" value="0.95" /> <output name="out_file1" file="5_liftover_mapped.bed"/> <output name="out_file2" file="5_liftover_unmapped.bed"/> </test>