diff --git a/README.md b/README.md index 7abe1e8..80cf3f2 100755 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ read sequencing data. # Requirements -This software is suitable for all linux-like systems with automake, autoconf, java and gcc installed (Unfortunately not Windows < v.10). +This software is suitable for all linux-like systems with ```automake```, ```autoconf```, ```gcc``` installed (Unfortunately not Windows < v.10). The pipeline is mainly written in **python 2.7**. # Table of content @@ -43,6 +43,9 @@ Before starting, MitoFinder installation requires ```automake``` and ```autoconf sudo apt-get install automake autoconf ``` +If you want to use MiTFi for the tRNA annotation step (recommended), ```java``` needs to be installed. To install it : ```sudo apt install default-jre``` + + Clone mitofinder from [GitHub](https://github.com/RemiAllio/MitoFinder) ```shell diff --git a/mitofinder b/mitofinder index 2b98b77..291b360 100755 --- a/mitofinder +++ b/mitofinder @@ -180,12 +180,23 @@ if __name__ == "__main__": print "Job name = "+args.processName - + if not os.path.exists(module_dir+"/install.sh.ok"): print "\nERROR: MitoFinder is not installed.\nNo such file or directory: "+module_dir+"/install.sh.ok\nPlease run ./install.sh in the MitoFinder directory.\nAborting." - logfile.write("\nERROR: MitoFinder is not installed.\nNo such file or directory: "+module_dir+"/install.sh.ok\nPlease run ./install.sh in the MitoFinder directory.\nAborting.") + logfile.write("\nERROR: MitoFinder is not installed.\nNo such file or directory: "+module_dir+"/install.sh.ok\nPlease run ./install.sh in the MitoFinder directory.\nAborting.\n") exit() - + if args.tRNAannotation.lower() == "mitfi": + try: + command = "java" + args1 = shlex.split(command) + java_test = Popen(args1, stdout=open("test_java.ok","w"),stderr=open("test_java.ok","w")) + java_test.wait() + if os.path.exists("test_java.ok"): + os.remove("test_java.ok") + except: + print "\nERROR: java is not installed/loaded.\nPlease install/load java to run MitoFinder with MiTFi." + logfile.write("\nERROR: java is not installed/loaded.\nPlease install/load java to run MitoFinder with MiTFi.") + exit() if args.PE1 == "" and args.PE2 == "" and args.SE == "" and args.Assembly == "" : print "\nERROR: Read or assembly files are not specified.\n Please, use -1 -2 -s or -a option to specify input data." logfile.write("\nERROR: Read or assembly files are not specified.\n Please, use -1 -2 -s or -a option to specify input data.\n") @@ -382,7 +393,6 @@ if __name__ == "__main__": pathToMitfiFolder = line.replace('\n','').replace(' ','').split('=')[-1] - #if config file has 'default' in the folder field, use the default program folders given with the script if pathToMegahitFolder.lower() == 'default': pathToMegahitFolder = os.path.join(module_dir, 'megahit/')