Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Jarvis Patrick API / JARP command line differences
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
seijo

Joined: 30 Jul 2010
Posts: 8

View user's profile

Back to top
Link to postPosted: Wed Jul 09, 2014 10:33 amPost subject: Jarvis Patrick API / JARP command line differences Reply with quote

I am interested in Jarvis-Patrick clustering, and I met two difficulties:

 

1) First, I initially try to implement the command line

jarp -i "/home/X/Desktop/JavaProject/testJP" -c 0.1 -t 1.6 -f 0 -m 3 -z -y

it in a java code with:
       

         JarvisPatrick jp=new JarvisPatrick();       
         try {
            jp.setInput("/home/X/Desktop/JavaProject/testJP");
        } catch (FileNotFoundException e1) {

              e1.printStackTrace();
        }
         jp.setMinCommonRatio(0.1f); //-c
         jp.setThreshold(1.6f); //-t
         jp.setFpSize(0); // -f
         jp.setDimensions(2); // -m
         jp.setStatNeeded(true); // -z
         try {
            jp.run();
        } catch (ClusteringException | IOException | SQLException| InvalidLicenseKeyException e) {
            e.printStackTrace();
        }

 

But it give me the following error:
Exception in thread "main" java.lang.NullPointerException
    at chemaxon.clustering.JarvisPatrick.run(JarvisPatrick.java:348)
    at Clustering.JarvisPatrickClustering.<init>(JarvisPatrickClustering.java:55)
    at main.runJarvisPatrick.main(runJarvisPatrick.java:14)

 

It should be note that the command line work well.

Is there any specific option I do not gave?

 

-----


2) Second, I would like to be sure about the data to give as input file.

Initially, I gave a neighbors matrix (with 0 and 1), but based on a previous post, https://www.chemaxon.com/forum/viewpost2909.html

I do a matrix distances as follow:

251 0.000 0.890 0.913 0.915 0.954 0.923 0.891 0.900 0.962 0.888
252 0.890 0.000 0.891 0.838 0.935 0.929 0.805 0.896 0.944 0.845
253 0.913 0.891 0.000 0.908 0.905 0.907 0.883 0.909 0.921 0.871
254 0.915 0.838 0.908 0.000 0.916 0.942 0.879 0.862 0.907 0.892
255 0.954 0.935 0.905 0.916 0.000 0.805 0.891 0.917 0.798 0.955
256 0.923 0.929 0.907 0.942 0.805 0.000 0.844 0.919 0.906 0.925
257 0.891 0.805 0.883 0.879 0.891 0.844 0.000 0.911 0.914 0.877
258 0.900 0.896 0.909 0.862 0.917 0.919 0.911 0.000 0.908 0.902
259 0.962 0.944 0.921 0.907 0.798 0.906 0.914 0.908 0.000 0.931
260 0.888 0.845 0.871 0.892 0.955 0.925 0.877 0.902 0.931 0.000

 

jarp -i "/data/txt" -c 0.01 -t 0.9 -f 0 -m 10 -z -y

I obtain only singletons, even if by looking the matrix, a lot of compounds have a distance lower than the the threshold t of 0.9 and satisfy the common neighbors percentage.

Is there any complement information/problem in my understood in this point?


Any helps for one or both points are welcome

seijo

Joined: 30 Jul 2010
Posts: 8

View user's profile

Back to top
Link to postPosted: Mon Jul 14, 2014 1:51 pmPost subject: Reply with quote

I really need an urgent help about this issue, please.

I will appreciate it a lot if you spare even a little time.

Gabor
ChemAxon personnel
Joined: 29 May 2005
Posts: 317

View user's profile

Back to top
Link to postPosted: Fri Jul 18, 2014 5:46 pmPost subject: Reply with quote

Apologies for the late answer. What JChem version are you using? What is your use case? Could other clustering method (sphere exclusion/wards/single- complete- or full linkage) be suitable? What is your input set size?

 

Regards,

Gabor

seijo

Joined: 30 Jul 2010
Posts: 8

View user's profile

Back to top
Link to postPosted: Wed Jul 23, 2014 9:18 amPost subject: Reply with quote

Dear Gabor,

the JChem version I use is jchem-6.2.2. I want actually test different metrics for our academic projec, and Jarvis Patrick is actually need.

 

Thank you for the help,

 

Gabor
ChemAxon personnel
Joined: 29 May 2005
Posts: 317

View user's profile

Back to top
Link to postPosted: Wed Jul 23, 2014 5:29 pmPost subject: Reply with quote

Dear Marianne,

 

The offending line in JarvisPatrick.java:348 is

if(!onlyStat)
            output.printHeader(showCentroids);

Output must be set using setOutput() methods.

Regarding the input file: the lines are interpreted as individual 10 dimensional floating point descriptors; distance matrix input is not supported.

Regards,

Gabor

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum