Mercurial > repos > deepakjadmin > mayatool3_test3
changeset 3:e420415a1799 draft
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 12:16:47 -0500 |
parents | dfff2614510e |
children | 477c11865013 |
files | mayatoolV1.xml test.pl tool_dependencies.xml |
diffstat | 3 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mayatoolV1.xml Wed Jan 20 12:16:47 2016 -0500 @@ -0,0 +1,32 @@ +<tool id="mayatoolsbar45se11" name="mayatools" version="0.0.1"> + <description>extract data from file according to field name and Ids </description> + <requirements> + <requirement type="set_environment">MAYA_TOOL3_PATH</requirement> + + +</requirements> + <command interpreter=""> +#if '.sdf' in $inputsdf.name +/bin/mkdir $inputsdf.extra_files_path; +ln -s $inputsdf $inputsdf.extra_files_path/molecules.sdf; +/usr/bin/perl \$MAYA_TOOL3_PATH/test.pl $outputsdf.name $inputsdf.extra_files_path/molecules.sdf $Identifier $indexnumbers > $logs; +/bin/rm -rf $inputsdf.extra_files_path; +cp $outputsdf.name $outputsdf; +#end if + </command> + <inputs> + <param name="inputsdf" type="data" format="sdf" label="Original SDF File " help="sdf file from which selected ids of molecules need to be extracted." /> + <param name="Identifier" type="text" label="Field name" help="Give field name of molecules on which compound need to be extracted Ex. MolID,PUBCHEM_COMPOUND_ID,CID etc." /> + <param name="indexnumbers" type="data" format="txt" label="Id file which need to be extracted from dataset" help="select file of ids ie. result file obtained from the tool 'Extract IDs From Prediction Result'" /> + + <!--param name="max_olap" type="integer" value="50" label="Set maximum overlap length" help="Overlaps this short or shorter are ignored." /--> + </inputs> + <outputs> + <data name="outputsdf" type="txt" format="sdf" label="extracted_cpds_from_${inputsdf.name}.sdf" /> + <data name="logs" format="txt" label="logfile" /> + + </outputs> + <tests> + + </tests> + </tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.pl Wed Jan 20 12:16:47 2016 -0500 @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w +use warnings; +$out1 = $ARGV[0]; +$in1 = $ARGV[1]; +$fieldname = $ARGV[2]; +$idfiles = $ARGV[3]; + +open(FILE, $idfiles) or die "Can't read file 'filename' [$!]\n"; +@document = <FILE>; +close (FILE); +$strw = join(",",@document); +$strw =~ tr/\r\n//d; +$fieldValues = join(",",$fieldname,$strw); +system("mayachemtools/bin/ExtractFromSDFiles.pl -m datafieldbylist -d $fieldValues -r $out1 -o $in1" );
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Wed Jan 20 12:16:47 2016 -0500 @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<tool_dependency> + +<set_environment version="1.0"> + <environment_variable name="MAYA_TOOL3_PATH" action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable> + </set_environment> + +</tool_dependency>