Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Question: Question: How to fix the following error while compiling MCSCanX !

Shruti Paniwala
1829 days ago

Question: How to fix the following error while compiling MCSCanX !

detect_collinear_tandem_arrays.cc:286:17: note: suggested alternative: 'getpt'
     while ((c = getopt(argc, argv, "g:b:c:o:")) != -1)
                 ^~~~~~
                 getpt
detect_collinear_tandem_arrays.cc:291:32: error: 'optarg' was not declared in this scope
             sprintf(gpath,"%s",optarg);
                                ^~~~~~
detect_collinear_tandem_arrays.cc:291:32: note: suggested alternative: 'opath'
             sprintf(gpath,"%s",optarg);
                                ^~~~~~
                                opath
detect_collinear_tandem_arrays.cc:307:17: error: 'optopt' was not declared in this scope
             if (optopt!='g' || optopt!='b' || optopt!='c' ||optopt!='o')
                 ^~~~~~
detect_collinear_tandem_arrays.cc:307:17: note: suggested alternative: 'getpt'
             if (optopt!='g' || optopt!='b' || optopt!='c' ||optopt!='o')
                 ^~~~~~
                 getpt
make: *** [makefile:6: mcscanx] Error 1
(base) ➜  MCScanx git:(master) ✗ ls

Answers
0

Follow these steps:

(base) ➜  MCScanx git:(master) ✗ for f in msa.h dissect_multiple_alignment.h detect_collinear_tandem_arrays.h ; do sed -i '1 i\#include <unistd.h>' $f ; done
(base) ➜  MCScanx git:(master) ✗ make                                                                                                                        
g++ struct.cc mcscan.cc read_data.cc out_utils.cc dagchainer.cc msa.cc permutation.cc -o MCScanX
g++ struct.cc mcscan_h.cc read_homology.cc out_homology.cc dagchainer.cc msa.cc permutation.cc -o MCScanX_h
g++ struct.cc dup_classifier.cc read_data.cc out_utils.cc dagchainer.cc cls.cc permutation.cc -o duplicate_gene_classifier
g++ dissect_multiple_alignment.cc -o downstream_analyses/dissect_multiple_alignment
g++ detect_collinear_tandem_arrays.cc -o downstream_analyses/detect_collinear_tandem_arrays
cd downstream_analyses/ && make
make[1]: Entering directory '/home/urbe/Tools/MCScanX2/MCScanx/downstream_analyses'
javac -g family_circle_plotter.java
javac -g dot_plotter.java
javac -g family_tree_plotter.java
javac -g family_tree_plotter_show_length.java
javac -g bar_plotter.java
javac -g dual_synteny_plotter.java
javac -g circle_plotter.java
javac -g family_tree_plotter_chr.java
make[1]: Leaving directory '/home/urbe/Tools/MCScanX2/MCScanx/downstream_analyses'

More at https://vcru.wisc.edu/simonlab/bioinformatics/programs/install/mcscanx.htm