Skip to content

Commit

Permalink
v1.0.5 stable release
Browse files Browse the repository at this point in the history
  • Loading branch information
endixk committed Aug 10, 2023
1 parent a27b399 commit a48a38a
Show file tree
Hide file tree
Showing 17 changed files with 1,357 additions and 1,376 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
.settings/
.idea/

bin/
jar/
*.cfg

test/
fix/
target/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:jammy
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH

ARG VERSION=1.0.4
ARG VERSION=1.0.5
ARG BUILD=0

# Install dependencies
Expand Down
4 changes: 0 additions & 4 deletions bin/setup.sh

This file was deleted.

4 changes: 0 additions & 4 deletions bin/ufcg

This file was deleted.

11 changes: 0 additions & 11 deletions config/ppx.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions config/tree.cfg

This file was deleted.

Binary file removed jar/UFCG-latest.jar
Binary file not shown.
Binary file removed jar/UFCG-v1.0.1.jar
Binary file not shown.
Binary file removed jar/UFCG-v1.0.2.jar
Binary file not shown.
Binary file removed jar/UFCG-v1.0.3.jar
Binary file not shown.
Binary file removed jar/UFCG-v1.0.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>steineggerlab</groupId>
<artifactId>ufcg</artifactId>
<version>1.0.4</version>
<version>1.0.5</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2,228 changes: 1,114 additions & 1,114 deletions src/module/ProfileModule.java

Large diffs are not rendered by default.

190 changes: 95 additions & 95 deletions src/pipeline/ModuleHandler.java
Original file line number Diff line number Diff line change
@@ -1,95 +1,95 @@
package pipeline;

import envs.toolkit.Prompt;
import module.AlignModule;
import module.ConvertModule;
import module.ProfileModule;
import module.ProfileProModule;
import module.ProfileRnaModule;
import module.PruneModule;
import module.TrainModule;
import module.TreeModule;
import module.DownloadModule;

import java.util.Arrays;
import java.util.List;

public class ModuleHandler {
private final int module;
private final String[] args;
public final boolean help;

public ModuleHandler(int module, String[] args) {
this.module = module;
this.args = args;
List<String> argList = Arrays.asList(args);
if(argList.contains("-h") || argList.contains("-help") || argList.contains("--help")) {
Prompt.SUPPRESS = true;
help = true;
} else if((module == UFCGMainPipeline.MODULE_PROFILE || module == UFCGMainPipeline.MODULE_PROFILE_RNA) && (argList.contains("-hh") || argList.contains("--hh"))) {
Prompt.SUPPRESS = true;
help = true;
} else {
help = false;
}
if(module == UFCGMainPipeline.MODULE_DOWNLOAD && argList.contains("-c")) {
Prompt.SUPPRESS = true;
}
}

private void handle_no_module() {
UFCGMainPipeline.run(args);
}
private void handle_profile() {
Prompt.talk("UFCG profile v" + UFCGMainPipeline.VERSION);
ProfileModule.run(args);
}
private void handle_profile_rna() {
Prompt.talk("UFCG profile-rna v" + UFCGMainPipeline.VERSION);
ProfileRnaModule.run(args);
}
private void handle_profile_pro() {
Prompt.talk("UFCG profile-pro v" + UFCGMainPipeline.VERSION);
ProfileProModule.run(args);
}
private void handle_align() {
Prompt.talk("UFCG align v" + UFCGMainPipeline.VERSION);
AlignModule.run(args);
}
private void handle_train() {
Prompt.talk("UFCG train v" + UFCGMainPipeline.VERSION);
TrainModule.run(args);
}
private void handle_convert() {
Prompt.talk("UFCG convert v" + UFCGMainPipeline.VERSION);
ConvertModule.run(args);
}
private void handle_tree() {
Prompt.talk("UFCG tree v" + UFCGMainPipeline.VERSION);
TreeModule.run(args);
}
private void handle_prune() {
Prompt.talk("UFCG prune v" + UFCGMainPipeline.VERSION);
PruneModule.run(args);
}
private void handle_download(){
Prompt.talk("UFCG download v" + UFCGMainPipeline.VERSION);
DownloadModule.run(args);
}

public void handle() {
switch(module) {
case UFCGMainPipeline.NO_MODULE: handle_no_module(); break;
case UFCGMainPipeline.MODULE_PROFILE: handle_profile(); break;
case UFCGMainPipeline.MODULE_PROFILE_RNA: handle_profile_rna(); break;
case UFCGMainPipeline.MODULE_PROFILE_PRO: handle_profile_pro(); break;
case UFCGMainPipeline.MODULE_TREE: handle_tree(); break;
case UFCGMainPipeline.MODULE_PRUNE: handle_prune(); break;
case UFCGMainPipeline.MODULE_ALIGN: handle_align(); break;
case UFCGMainPipeline.MODULE_TRAIN: handle_train(); break;
case UFCGMainPipeline.MODULE_CONVERT: handle_convert(); break;
case UFCGMainPipeline.MODULE_DOWNLOAD: handle_download(); break;
default: break;
}
}
}
package pipeline;

import envs.toolkit.Prompt;
import module.AlignModule;
import module.ConvertModule;
import module.ProfileModule;
import module.ProfileProModule;
import module.ProfileRnaModule;
import module.PruneModule;
import module.TrainModule;
import module.TreeModule;
import module.DownloadModule;

import java.util.Arrays;
import java.util.List;

public class ModuleHandler {
private final int module;
private final String[] args;
public final boolean help;

public ModuleHandler(int module, String[] args) {
this.module = module;
this.args = args;
List<String> argList = Arrays.asList(args);
if(argList.contains("-h") || argList.contains("-help") || argList.contains("--help")) {
Prompt.SUPPRESS = true;
help = true;
} else if((module == UFCGMainPipeline.MODULE_PROFILE || module == UFCGMainPipeline.MODULE_PROFILE_RNA) && (argList.contains("-hh") || argList.contains("--hh"))) {
Prompt.SUPPRESS = true;
help = true;
} else {
help = false;
}
if(module == UFCGMainPipeline.MODULE_DOWNLOAD && argList.contains("-c")) {
Prompt.SUPPRESS = true;
}
}

private void handle_no_module() {
UFCGMainPipeline.run(args);
}
private void handle_profile() {
Prompt.talk("UFCG profile v" + UFCGMainPipeline.VERSION);
ProfileModule.run(args);
}
private void handle_profile_rna() {
Prompt.talk("UFCG profile-rna v" + UFCGMainPipeline.VERSION);
ProfileRnaModule.run(args);
}
private void handle_profile_pro() {
Prompt.talk("UFCG profile-pro v" + UFCGMainPipeline.VERSION);
ProfileProModule.run(args);
}
private void handle_align() {
Prompt.talk("UFCG align v" + UFCGMainPipeline.VERSION);
AlignModule.run(args);
}
private void handle_train() {
Prompt.talk("UFCG train v" + UFCGMainPipeline.VERSION);
TrainModule.run(args);
}
private void handle_convert() {
Prompt.talk("UFCG convert v" + UFCGMainPipeline.VERSION);
ConvertModule.run(args);
}
private void handle_tree() {
Prompt.talk("UFCG tree v" + UFCGMainPipeline.VERSION);
TreeModule.run(args);
}
private void handle_prune() {
Prompt.talk("UFCG prune v" + UFCGMainPipeline.VERSION);
PruneModule.run(args);
}
private void handle_download(){
Prompt.talk("UFCG download v" + UFCGMainPipeline.VERSION);
DownloadModule.run(args);
}

public void handle() {
switch(module) {
case UFCGMainPipeline.NO_MODULE: handle_no_module(); break;
case UFCGMainPipeline.MODULE_PROFILE: handle_profile(); break;
case UFCGMainPipeline.MODULE_PROFILE_RNA: handle_profile_rna(); break;
case UFCGMainPipeline.MODULE_PROFILE_PRO: handle_profile_pro(); break;
case UFCGMainPipeline.MODULE_TREE: handle_tree(); break;
case UFCGMainPipeline.MODULE_PRUNE: handle_prune(); break;
case UFCGMainPipeline.MODULE_ALIGN: handle_align(); break;
case UFCGMainPipeline.MODULE_TRAIN: handle_train(); break;
case UFCGMainPipeline.MODULE_CONVERT: handle_convert(); break;
case UFCGMainPipeline.MODULE_DOWNLOAD: handle_download(); break;
default: break;
}
}
}
6 changes: 3 additions & 3 deletions src/pipeline/UFCGMainPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

@SuppressWarnings("restriction")
public class UFCGMainPipeline {
public static final String VERSION = "1.0.4";
public static final Boolean STABLE = false;
public static final String RELEASE_DATE = "May 2023";
public static final String VERSION = "1.0.5";
public static final Boolean STABLE = true;
public static final String RELEASE_DATE = "Aug 2023";
public static final String CITATION = " Kim, D., Gilchrist, C.L.M., Chun, J. & Steinegger, M. (2023)\n"
+ " UFCG: database of universal fungal core genes and pipeline for genome-wide phylogenetic analysis of fungi.\n"
+ " Nucleic Acids Research, 51(D1), D777-D784, doi:10.1093/nar/gkac894.\n";
Expand Down
92 changes: 46 additions & 46 deletions src/tree/tools/Arguments.java
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
package tree.tools;

import java.util.Hashtable;

@Deprecated
public class Arguments {
public Hashtable<String,String> hash = new Hashtable<>();
public String[] args;

int process_next(int index)
{
if (index==args.length-1) {
hash.put(args[index], "");// for last, just add
return args.length;
}
if (args[index+1].startsWith("-")) {

hash.put(args[index], "");
return index;
}
hash.put(args[index],args[index+1]);
return index+1;
}

public Arguments(String[] args){
this.args = args;
for (int i=0; i<args.length; i++)
{
if (args[i].startsWith("-"))
{
i=process_next(i);
}
}
}

/**
*
* @param arg - tag of argument
* @return return null if no exist matched tag, or
* empty string if anything value is not assigned for the tag
*/
public String get(String arg)
{
return hash.get(arg);
}

package tree.tools;

import java.util.Hashtable;

@Deprecated
public class Arguments {
public Hashtable<String,String> hash = new Hashtable<>();
public String[] args;

int process_next(int index)
{
if (index==args.length-1) {
hash.put(args[index], "");// for last, just add
return args.length;
}
if (args[index+1].startsWith("-")) {

hash.put(args[index], "");
return index;
}
hash.put(args[index],args[index+1]);
return index+1;
}

public Arguments(String[] args){
this.args = args;
for (int i=0; i<args.length; i++)
{
if (args[i].startsWith("-"))
{
i=process_next(i);
}
}
}

/**
*
* @param arg - tag of argument
* @return return null if no exist matched tag, or
* empty string if anything value is not assigned for the tag
*/
public String get(String arg)
{
return hash.get(arg);
}

}
Loading

0 comments on commit a48a38a

Please sign in to comment.