Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapping maltiple reactions #7

Open
iwatobipen opened this issue Dec 7, 2018 · 7 comments
Open

mapping maltiple reactions #7

iwatobipen opened this issue Dec 7, 2018 · 7 comments

Comments

@iwatobipen
Copy link

Dear Developer,

Is there any option for reaction mapping from list of reaction smiles?
Currently I have file of reaction list and I would like to map many reactions.
Any suggestion and advices are appreciated.
Kind regards,

Taka

@kjelljorner
Copy link

@iwatobipen Did you ever find out how to do this? I have the same problem

@iwatobipen
Copy link
Author

iwatobipen commented Apr 25, 2020

I wrote shell script to do it. But I took long time to process many reactions. I'm not good at Java so it has room for improvement.
Thanks.

@asad
Copy link
Owner

asad commented Jun 24, 2020

Thanks, scripting is a way to go.
We are exploring an inbuilt routine.

@asad
Copy link
Owner

asad commented Jun 29, 2020

Below is the shell script which can be used in BASH environment on UNIX/LINUX.

a) Store this in a file.. maybe run_recoder.sh
b) change the jar file name in JAR variable
c) RXN_FILE_DIR is the path to RXN files directory
d) run it in a shell prompt sh run_recoder.sh RXN_FILE_DIR

#!/bin/bash
rxn_dir=$1
job_DIR="OUTPUT"
mkdir $job_DIR
for i in rxn_dir/*.rxn
do
 echo "Preparing job for $i"
 rxn_file = $i
 xbase=${rxn_file##*/}
 xpref=${xbase%.*}
 job_id=xpref
 JAR="ReactionDecoder.jar"
 echo "Processing JobID=$job_id rxn_file=$rxn_file"
 JOB="java -Xmx4G -jar $JAR -c -g -x -f BOTH -j AAM -p $job_id -Q RXN -q $rxn_file"
 echo "Running command $JOB"
 $JOB >> job.log
done

echo "===DONE=="

@alperyilmaz
Copy link

Hi,
Here's a way to process many SMILES reactions in parallel.

parallel --joblog results/runtask.log --colsep ',' -j 10 'java -jar ReactionDecoder.jar -Q SMI -q "{=2 uq() =}" -g-c -j AAM -p results/{1} -f TEXT' :::: rxn_list.csv
  • rxn_list.csv is comma separated file, first column is reaction name or id, second column is the reaction smiles
  • outputs and log are put under results folder, so create it before running the command
  • requires newer version of parallel, (>2019)
  • I chose number of jobs as 10 but due to Java's inability to configure cpu affinity, still uses all cpus

@UnixJunkie
Copy link

there should be a -i option: reaction SMILES input file.
And a -o option: reaction SMILES (mapped) output file

@UnixJunkie
Copy link

@iwatobipen you should try this updated version https://github.com/Laboratoire-de-Chemoinformatique/RDTool.
They have -i and -o.
It's a little slow though; about 1s per reaction and you need to set a timeout (maybe something like 3s) so
that mapping some reactions doesn't take 20min...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants