diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a03964e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +maven-src/.idea +maven-src/target +maven-src/out + diff --git a/.idea/HAlign2.0.iml b/.idea/HAlign2.0.iml deleted file mode 100644 index d6ebd48..0000000 --- a/.idea/HAlign2.0.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 455f219..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index adfb17b..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TreeMSA - treemsa - num - 漏洞 - - s_out1 - deleted sequences - delete - > - '>' - - - C:\Users\J. Chao\source\IdeaProjects\HAlign-II\src\main - C:\Users\J. Chao\source\IdeaProjects\HAlign-II\src\main\java - C:\Users\J. Chao\source\IdeaProjects\HAlign-II\src\main\java\halign\kband - C:\Users\J. Chao\source\IdeaProjects\HAlign-II\src - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1544979117230 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - malab:jar - - - - - - - - No facets are configured - - - - - - - - - - - - - - - 1.8_oracle - - - - - - - - malab - - - - - - - - Maven: com.clearspring.analytics:stream:2.7.0 - - - - - - - - \ No newline at end of file diff --git a/maven-src/malab.jar b/maven-src/malab.jar index 9451e67..385ff73 100644 Binary files a/maven-src/malab.jar and b/maven-src/malab.jar differ diff --git a/maven-src/pom.xml b/maven-src/pom.xml index 7a7343c..b598115 100644 --- a/maven-src/pom.xml +++ b/maven-src/pom.xml @@ -4,17 +4,28 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - spark - malab - 1.0-SNAPSHOT + malab + HAlign + 2.1.2 + + + 1.8 + 1.8 + UTF-8 + + org.apache.maven.plugins - maven-compiler-plugin + maven-jar-plugin + 2.4 - 1.8 - 1.8 + + + main + + diff --git a/maven-src/META-INF/MANIFEST.MF b/maven-src/src/main/java/META-INF/MANIFEST.MF similarity index 100% rename from maven-src/META-INF/MANIFEST.MF rename to maven-src/src/main/java/META-INF/MANIFEST.MF diff --git a/maven-src/src/main/java/halign/kband/AffineGapPenalty.java b/maven-src/src/main/java/halign/kband/AffineGapPenalty.java index 411dd3a..550d356 100644 --- a/maven-src/src/main/java/halign/kband/AffineGapPenalty.java +++ b/maven-src/src/main/java/halign/kband/AffineGapPenalty.java @@ -66,8 +66,14 @@ public void InitC(int K){ } } - for (int i=1;i<=k;i++) - c[i][0+k-i]=-(h+g*i); +// for (int i=1;i<=k;i++) { + for (int i=1;i<=k && i < m;i++) // 20200715 chaojiannan debug + { +// System.out.println("acc row: " + i + " of " + m); +// System.out.println("acc col: " + (k - i) + " of " + K); + c[i][k - i] = -(h + g * i); + // c[i][0+k-i]=-(h+g*i); + } } diff --git a/maven-src/target/classes/BLOSUM100 b/maven-src/target/classes/BLOSUM100 deleted file mode 100644 index 46e9e85..0000000 --- a/maven-src/target/classes/BLOSUM100 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum100_3.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 100 -# Entropy = 1.4516, Expected = -1.0948 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 8 -3 -4 -5 -2 -2 -3 -1 -4 -4 -4 -2 -3 -5 -2 1 -1 -6 -5 -2 -4 -2 -2 -10 -R -3 10 -2 -5 -8 0 -2 -6 -1 -7 -6 3 -4 -6 -5 -3 -3 -7 -5 -6 -4 -1 -3 -10 -N -4 -2 11 1 -5 -1 -2 -2 0 -7 -7 -1 -5 -7 -5 0 -1 -8 -5 -7 5 -2 -3 -10 -D -5 -5 1 10 -8 -2 2 -4 -3 -8 -8 -3 -8 -8 -5 -2 -4 -10 -7 -8 6 0 -4 -10 -C -2 -8 -5 -8 14 -7 -9 -7 -8 -3 -5 -8 -4 -4 -8 -3 -3 -7 -6 -3 -7 -8 -5 -10 -Q -2 0 -1 -2 -7 11 2 -5 1 -6 -5 2 -2 -6 -4 -2 -3 -5 -4 -5 -2 5 -2 -10 -E -3 -2 -2 2 -9 2 10 -6 -2 -7 -7 0 -5 -8 -4 -2 -3 -8 -7 -5 0 7 -3 -10 -G -1 -6 -2 -4 -7 -5 -6 9 -6 -9 -8 -5 -7 -8 -6 -2 -5 -7 -8 -8 -3 -5 -4 -10 -H -4 -1 0 -3 -8 1 -2 -6 13 -7 -6 -3 -5 -4 -5 -3 -4 -5 1 -7 -2 -1 -4 -10 -I -4 -7 -7 -8 -3 -6 -7 -9 -7 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-10 -10 1 diff --git a/maven-src/target/classes/BLOSUM30 b/maven-src/target/classes/BLOSUM30 deleted file mode 100644 index 81ebd98..0000000 --- a/maven-src/target/classes/BLOSUM30 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum30.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/5 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 30 -# Entropy = 0.1424, Expected = -0.1074 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 0 0 -3 1 0 0 -2 0 -1 0 1 -2 -1 1 1 -5 -4 1 0 0 0 -7 -R -1 8 -2 -1 -2 3 -1 -2 -1 -3 -2 1 0 -1 -1 -1 -3 0 0 -1 -2 0 -1 -7 -N 0 -2 8 1 -1 -1 -1 0 -1 0 -2 0 0 -1 -3 0 1 -7 -4 -2 4 -1 0 -7 -D 0 -1 1 9 -3 -1 1 -1 -2 -4 -1 0 -3 -5 -1 0 -1 -4 -1 -2 5 0 -1 -7 -C -3 -2 -1 -3 17 -2 1 -4 -5 -2 0 -3 -2 -3 -3 -2 -2 -2 -6 -2 -2 0 -2 -7 -Q 1 3 -1 -1 -2 8 2 -2 0 -2 -2 0 -1 -3 0 -1 0 -1 -1 -3 -1 4 0 -7 -E 0 -1 -1 1 1 2 6 -2 0 -3 -1 2 -1 -4 1 0 -2 -1 -2 -3 0 5 -1 -7 -G 0 -2 0 -1 -4 -2 -2 8 -3 -1 -2 -1 -2 -3 -1 0 -2 1 -3 -3 0 -2 -1 -7 -H -2 -1 -1 -2 -5 0 0 -3 14 -2 -1 -2 2 -3 1 -1 -2 -5 0 -3 -2 0 -1 -7 -I 0 -3 0 -4 -2 -2 -3 -1 -2 6 2 -2 1 0 -3 -1 0 -3 -1 4 -2 -3 0 -7 -L -1 -2 -2 -1 0 -2 -1 -2 -1 2 4 -2 2 2 -3 -2 0 -2 3 1 -1 -1 0 -7 -K 0 1 0 0 -3 0 2 -1 -2 -2 -2 4 2 -1 1 0 -1 -2 -1 -2 0 1 0 -7 -M 1 0 0 -3 -2 -1 -1 -2 2 1 2 2 6 -2 -4 -2 0 -3 -1 0 -2 -1 0 -7 -F -2 -1 -1 -5 -3 -3 -4 -3 -3 0 2 -1 -2 10 -4 -1 -2 1 3 1 -3 -4 -1 -7 -P -1 -1 -3 -1 -3 0 1 -1 1 -3 -3 1 -4 -4 11 -1 0 -3 -2 -4 -2 0 -1 -7 -S 1 -1 0 0 -2 -1 0 0 -1 -1 -2 0 -2 -1 -1 4 2 -3 -2 -1 0 -1 0 -7 -T 1 -3 1 -1 -2 0 -2 -2 -2 0 0 -1 0 -2 0 2 5 -5 -1 1 0 -1 0 -7 -W -5 0 -7 -4 -2 -1 -1 1 -5 -3 -2 -2 -3 1 -3 -3 -5 20 5 -3 -5 -1 -2 -7 -Y -4 0 -4 -1 -6 -1 -2 -3 0 -1 3 -1 -1 3 -2 -2 -1 5 9 1 -3 -2 -1 -7 -V 1 -1 -2 -2 -2 -3 -3 -3 -3 4 1 -2 0 1 -4 -1 1 -3 1 5 -2 -3 0 -7 -B 0 -2 4 5 -2 -1 0 0 -2 -2 -1 0 -2 -3 -2 0 0 -5 -3 -2 5 0 -1 -7 -Z 0 0 -1 0 0 4 5 -2 0 -3 -1 1 -1 -4 0 -1 -1 -1 -2 -3 0 4 0 -7 -X 0 -1 0 -1 -2 0 -1 -1 -1 0 0 0 0 -1 -1 0 0 -2 -1 0 -1 0 -1 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/BLOSUM35 b/maven-src/target/classes/BLOSUM35 deleted file mode 100644 index a6d99f5..0000000 --- a/maven-src/target/classes/BLOSUM35 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum35.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/4 Bit Units -# Blocks Database = /data/blocks_5.0/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-1 -1 -3 0 -3 -4 10 -2 0 -4 -3 -3 -1 0 -1 -5 -S 1 -1 0 -1 -3 0 0 1 -1 -2 -2 0 -1 -1 -2 4 2 -2 -1 -1 0 0 0 -5 -T 0 -2 0 -1 -1 0 -1 -2 -2 -1 0 0 0 -1 0 2 5 -2 -2 1 -1 -1 0 -5 -W -2 0 -2 -3 -5 -1 -1 -1 -4 -1 0 0 1 1 -4 -2 -2 16 3 -2 -3 -1 -1 -5 -Y -1 0 -2 -2 -5 0 -1 -2 0 0 0 -1 0 3 -3 -1 -2 3 8 0 -2 -1 -1 -5 -V 0 -1 -2 -2 -2 -3 -2 -3 -4 4 2 -2 1 1 -3 -1 1 -2 0 5 -2 -2 0 -5 -B -1 -1 4 5 -2 0 0 0 0 -2 -2 0 -2 -2 -1 0 -1 -3 -2 -2 5 0 -1 -5 -Z -1 0 0 1 -2 4 5 -2 -1 -3 -2 1 -2 -3 0 0 -1 -1 -1 -2 0 4 0 -5 -X 0 -1 0 -1 -2 -1 -1 -1 -1 0 0 0 0 -1 -1 0 0 -1 -1 0 -1 0 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM40 b/maven-src/target/classes/BLOSUM40 deleted file mode 100644 index 1a4baa2..0000000 --- a/maven-src/target/classes/BLOSUM40 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum40.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/4 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 40 -# Entropy = 0.2851, Expected = -0.2090 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -1 -2 0 -1 1 -2 -1 -2 -1 -1 -3 -2 1 0 -3 -2 0 -1 -1 0 -6 -R -2 9 0 -1 -3 2 -1 -3 0 -3 -2 3 -1 -2 -3 -1 -2 -2 -1 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4 -5 -6 -1 -2 -2 -5 -3 -1 -2 -2 1 -4 -5 -4 19 3 -3 -4 -2 -2 -6 -Y -2 -1 -2 -3 -4 -1 -2 -3 2 0 0 -1 1 4 -3 -2 -1 3 9 -1 -3 -2 -1 -6 -V 0 -2 -3 -3 -2 -3 -3 -4 -4 4 2 -2 1 0 -3 -1 1 -3 -1 5 -3 -3 -1 -6 -B -1 -1 4 6 -2 0 1 -1 0 -3 -3 0 -3 -3 -2 0 0 -4 -3 -3 5 2 -1 -6 -Z -1 0 0 1 -3 4 5 -2 0 -4 -2 1 -2 -4 -1 0 -1 -2 -2 -3 2 5 -1 -6 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 0 -1 -2 0 0 -2 -1 -1 -1 -1 -1 -6 -* -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 1 diff --git a/maven-src/target/classes/BLOSUM45 b/maven-src/target/classes/BLOSUM45 deleted file mode 100644 index 18c3323..0000000 --- a/maven-src/target/classes/BLOSUM45 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum45.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 45 -# Entropy = 0.3795, Expected = -0.2789 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -2 -2 0 -1 -1 0 -5 -R -2 7 0 -1 -3 1 0 -2 0 -3 -2 3 -1 -2 -2 -1 -1 -2 -1 -2 -1 0 -1 -5 -N -1 0 6 2 -2 0 0 0 1 -2 -3 0 -2 -2 -2 1 0 -4 -2 -3 4 0 -1 -5 -D -2 -1 2 7 -3 0 2 -1 0 -4 -3 0 -3 -4 -1 0 -1 -4 -2 -3 5 1 -1 -5 -C -1 -3 -2 -3 12 -3 -3 -3 -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 0 -3 -1 0 -3 -1 5 -3 -3 -1 -5 -B -1 -1 4 5 -2 0 1 -1 0 -3 -3 0 -2 -3 -2 0 0 -4 -2 -3 4 2 -1 -5 -Z -1 0 0 1 -3 4 4 -2 0 -3 -2 1 -1 -3 -1 0 -1 -2 -2 -3 2 4 -1 -5 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -2 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM50 b/maven-src/target/classes/BLOSUM50 deleted file mode 100644 index 3f62e3c..0000000 --- a/maven-src/target/classes/BLOSUM50 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum50.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 50 -# Entropy = 0.4808, Expected = -0.3573 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -2 -1 -1 -3 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -2 7 -1 -2 -4 1 0 -3 0 -4 -3 3 -2 -3 -3 -1 -1 -3 -1 -3 -1 0 -1 -5 -N -1 -1 7 2 -2 0 0 0 1 -3 -4 0 -2 -4 -2 1 0 -4 -2 -3 4 0 -1 -5 -D -2 -2 2 8 -4 0 2 -1 -1 -4 -4 -1 -4 -5 -1 0 -1 -5 -3 -4 5 1 -1 -5 -C -1 -4 -2 -4 13 -3 -3 -3 -3 -2 -2 -3 -2 -2 -4 -1 -1 -5 -3 -1 -3 -3 -2 -5 -Q -1 1 0 0 -3 7 2 -2 1 -3 -2 2 0 -4 -1 0 -1 -1 -1 -3 0 4 -1 -5 -E -1 0 0 2 -3 2 6 -3 0 -4 -3 1 -2 -3 -1 -1 -1 -3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3 2 5 -1 -5 -X -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 0 -3 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM55 b/maven-src/target/classes/BLOSUM55 deleted file mode 100644 index c0cf3ff..0000000 --- a/maven-src/target/classes/BLOSUM55 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum55.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 55 -# Entropy = 0.5637, Expected = -0.4179 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -2 0 -1 -1 0 -2 -2 -2 -1 -1 -3 -1 2 0 -4 -2 0 -2 -1 -1 -5 -R -2 8 -1 -2 -4 1 0 -3 0 -4 -3 3 -2 -3 -3 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 -1 8 2 -3 0 0 0 1 -4 -4 0 -3 -4 -2 1 0 -5 -2 -4 4 0 -1 -5 -D -2 -2 2 8 -4 0 2 -2 -1 -4 -5 -1 -4 -5 -2 0 -1 -5 -3 -4 5 1 -2 -5 -C 0 -4 -3 -4 13 -4 -4 -3 -4 -2 -2 -4 -2 -3 -3 -1 -1 -4 -3 -1 -4 -4 -2 -5 -Q -1 1 0 0 -4 7 2 -2 1 -4 -3 2 0 -4 -1 0 -1 -2 -1 -3 0 4 -1 -5 -E -1 0 0 2 -4 2 7 -3 -1 -4 -4 1 -3 -4 -1 0 -1 -3 -2 -3 1 5 -1 -5 -G 0 -3 0 -2 -3 -2 -3 8 -2 -5 -5 -2 -3 -4 -3 0 -2 -3 -4 -4 -1 -3 -2 -5 -H -2 0 1 -1 -4 1 -1 -2 11 -4 -3 0 -2 -1 -3 -1 -2 -3 2 -4 0 0 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5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM60 b/maven-src/target/classes/BLOSUM60 deleted file mode 100644 index 4fd1943..0000000 --- a/maven-src/target/classes/BLOSUM60 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum60.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 60 -# Entropy = 0.6603, Expected = -0.4917 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -1 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0 -4 -R -1 5 0 -1 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -2 -1 0 -1 -4 -N -1 0 6 1 -2 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -4 -D -2 -1 1 6 -3 0 2 -1 -1 -3 -3 -1 -3 -3 -1 0 -1 -4 -3 -3 4 1 -1 -4 -C 0 -3 -2 -3 9 -3 -3 -2 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1 -3 -3 -2 -4 -Q -1 1 0 0 -3 5 2 -2 1 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2 0 3 -1 -4 -E -1 0 0 2 -3 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -4 -G 0 -2 0 -1 -2 -2 -2 6 -2 -3 -4 -1 -2 -3 -2 0 -2 -2 -3 -3 -1 -2 -1 -4 -H -2 0 1 -1 -3 1 0 -2 7 -3 -3 -1 -1 -1 -2 -1 -2 -2 2 -3 0 0 -1 -4 -I -1 -3 -3 -3 -1 -3 -3 -3 -3 4 2 -3 1 0 -3 -2 -1 -2 -1 3 -3 -3 -1 -4 -L -1 -2 -3 -3 -1 -2 -3 -4 -3 2 4 -2 2 0 -3 -2 -1 -2 -1 1 -3 -2 -1 -4 -K -1 2 0 -1 -3 1 1 -1 -1 -3 -2 4 -1 -3 -1 0 -1 -3 -2 -2 0 1 -1 -4 -M -1 -1 -2 -3 -1 0 -2 -2 -1 1 2 -1 5 0 -2 -1 -1 -1 -1 1 -3 -1 -1 -4 -F -2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6 -4 -2 -2 1 3 -1 -3 -3 -1 -4 -P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7 -1 -1 -4 -3 -2 -2 -1 -2 -4 -S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 1 -3 -2 -2 0 0 0 -4 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 4 -2 -2 0 0 -1 0 -4 -W -3 -3 -4 -4 -2 -2 -3 -2 -2 -2 -2 -3 -1 1 -4 -3 -2 10 2 -3 -4 -2 -2 -4 -Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 6 -1 -2 -2 -1 -4 -V 0 -2 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 -3 -2 -1 -4 -B -2 -1 3 4 -3 0 1 -1 0 -3 -3 0 -3 -3 -2 0 0 -4 -2 -3 4 1 -1 -4 -Z -1 0 0 1 -3 3 4 -2 0 -3 -2 1 -1 -3 -1 0 -1 -2 -2 -2 1 3 -1 -4 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 0 0 -2 -1 -1 -1 -1 -1 -4 -* -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 1 diff --git a/maven-src/target/classes/BLOSUM62 b/maven-src/target/classes/BLOSUM62 deleted file mode 100644 index 205f139..0000000 --- a/maven-src/target/classes/BLOSUM62 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum62.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 62 -# Entropy = 0.6979, Expected = -0.5209 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0 -4 -R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -4 -N -2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -4 -D -2 -2 1 6 -3 0 2 -1 -1 -3 -4 -1 -3 -3 -1 0 -1 -4 -3 -3 4 1 -1 -4 -C 0 -3 -3 -3 9 -3 -4 -3 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1 -3 -3 -2 -4 -Q -1 1 0 0 -3 5 2 -2 0 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2 0 3 -1 -4 -E -1 0 0 2 -4 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -4 -G 0 -2 0 -1 -3 -2 -2 6 -2 -4 -4 -2 -3 -3 -2 0 -2 -2 -3 -3 -1 -2 -1 -4 -H -2 0 1 -1 -3 0 0 -2 8 -3 -3 -1 -2 -1 -2 -1 -2 -2 2 -3 0 0 -1 -4 -I -1 -3 -3 -3 -1 -3 -3 -4 -3 4 2 -3 1 0 -3 -2 -1 -3 -1 3 -3 -3 -1 -4 -L -1 -2 -3 -4 -1 -2 -3 -4 -3 2 4 -2 2 0 -3 -2 -1 -2 -1 1 -4 -3 -1 -4 -K -1 2 0 -1 -3 1 1 -2 -1 -3 -2 5 -1 -3 -1 0 -1 -3 -2 -2 0 1 -1 -4 -M -1 -1 -2 -3 -1 0 -2 -3 -2 1 2 -1 5 0 -2 -1 -1 -1 -1 1 -3 -1 -1 -4 -F -2 -3 -3 -3 -2 -3 -3 -3 -1 0 0 -3 0 6 -4 -2 -2 1 3 -1 -3 -3 -1 -4 -P -1 -2 -2 -1 -3 -1 -1 -2 -2 -3 -3 -1 -2 -4 7 -1 -1 -4 -3 -2 -2 -1 -2 -4 -S 1 -1 1 0 -1 0 0 0 -1 -2 -2 0 -1 -2 -1 4 1 -3 -2 -2 0 0 0 -4 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -2 -2 0 -1 -1 0 -4 -W -3 -3 -4 -4 -2 -2 -3 -2 -2 -3 -2 -3 -1 1 -4 -3 -2 11 2 -3 -4 -3 -2 -4 -Y -2 -2 -2 -3 -2 -1 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1 -3 -2 -1 -4 -V 0 -3 -3 -3 -1 -2 -2 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 -3 -2 -1 -4 -B -2 -1 3 4 -3 0 1 -1 0 -3 -4 0 -3 -3 -2 0 -1 -4 -3 -3 4 1 -1 -4 -Z -1 0 0 1 -3 3 4 -2 0 -3 -3 1 -1 -3 -1 0 -1 -3 -2 -2 1 4 -1 -4 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 0 0 -2 -1 -1 -1 -1 -1 -4 -* -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 1 diff --git a/maven-src/target/classes/BLOSUM65 b/maven-src/target/classes/BLOSUM65 deleted file mode 100644 index 1eacd14..0000000 --- a/maven-src/target/classes/BLOSUM65 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum65.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 65 -# Entropy = 0.7576, Expected = -0.5675 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -2 -2 0 -1 -1 0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 0 -2 -2 -1 4 1 -3 -2 -2 0 0 -1 -5 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -3 -2 0 -1 -1 -1 -5 -W -3 -3 -4 -5 -2 -2 -3 -3 -2 -2 -2 -3 -2 1 -4 -3 -3 10 2 -3 -4 -3 -2 -5 -Y -2 -2 -2 -3 -2 -2 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1 -3 -2 -1 -5 -V 0 -3 -3 -3 -1 -2 -3 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 -3 -2 -1 -5 -B -2 -1 3 4 -3 0 1 -1 0 -3 -4 0 -3 -3 -2 0 -1 -4 -3 -3 4 1 -1 -5 -Z -1 0 0 1 -4 3 4 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -5 -X -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 -1 -2 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM70 b/maven-src/target/classes/BLOSUM70 deleted file mode 100644 index 3e4093f..0000000 --- a/maven-src/target/classes/BLOSUM70 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum70.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 70 -# Entropy = 0.8391, Expected = -0.6313 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -2 -2 -2 -1 -1 -1 0 -2 -2 -2 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -2 6 -1 -2 -4 1 0 -3 0 -3 -3 2 -2 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 -1 6 1 -3 0 0 -1 0 -4 -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-3 -2 -3 -2 1 -4 -3 -3 11 2 -3 -4 -3 -3 -5 -Y -2 -2 -2 -4 -3 -2 -3 -4 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -2 -3 -2 -2 -5 -V 0 -3 -3 -4 -1 -2 -3 -4 -3 3 1 -3 1 -1 -3 -2 0 -3 -2 4 -3 -3 -1 -5 -B -2 -1 3 4 -4 0 1 -1 -1 -4 -4 -1 -3 -4 -2 0 -1 -4 -3 -3 4 0 -1 -5 -Z -1 0 0 1 -4 3 4 -2 0 -3 -3 1 -2 -4 -1 0 -1 -3 -2 -3 0 4 -1 -5 -X -1 -1 -1 -2 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 -1 -3 -2 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM75 b/maven-src/target/classes/BLOSUM75 deleted file mode 100644 index 98964be..0000000 --- a/maven-src/target/classes/BLOSUM75 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum75.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 75 -# Entropy = 0.9077, Expected = -0.6845 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -2 -2 -2 -1 -1 -1 0 -2 -2 -2 -1 -1 -3 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -2 6 -1 -2 -4 1 0 -3 0 -3 -3 2 -2 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 -1 6 1 -3 0 -1 -1 0 -4 -4 0 -3 -4 -3 0 0 -4 -3 -3 3 0 -1 -5 -D -2 -2 1 6 -4 -1 1 -2 -1 -4 -4 -1 -4 -4 -2 -1 -1 -5 -4 -4 4 1 -2 -5 -C -1 -4 -3 -4 9 -3 -5 -3 -4 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-2 -3 -4 -4 3 1 -3 1 -1 -3 -2 0 -3 -2 4 -4 -3 -1 -5 -B -2 -1 3 4 -4 0 1 -1 -1 -4 -4 -1 -3 -4 -2 0 -1 -5 -3 -4 4 0 -2 -5 -Z -1 0 0 1 -4 3 4 -2 0 -4 -3 1 -2 -4 -2 0 -1 -3 -3 -3 0 4 -1 -5 -X -1 -1 -1 -2 -2 -1 -1 -2 -1 -2 -1 -1 -1 -2 -2 -1 -1 -3 -2 -1 -2 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/BLOSUM80 b/maven-src/target/classes/BLOSUM80 deleted file mode 100644 index 81ff9a7..0000000 --- a/maven-src/target/classes/BLOSUM80 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum80_3.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 80 -# Entropy = 0.9868, Expected = -0.7442 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 7 -3 -3 -3 -1 -2 -2 0 -3 -3 -3 -1 -2 -4 -1 2 0 -5 -4 -1 -3 -2 -1 -8 -R -3 9 -1 -3 -6 1 -1 -4 0 -5 -4 3 -3 -5 -3 -2 -2 -5 -4 -4 -2 0 -2 -8 -N -3 -1 9 2 -5 0 -1 -1 1 -6 -6 0 -4 -6 -4 1 0 -7 -4 -5 5 -1 -2 -8 -D -3 -3 2 10 -7 -1 2 -3 -2 -7 -7 -2 -6 -6 -3 -1 -2 -8 -6 -6 6 1 -3 -8 -C -1 -6 -5 -7 13 -5 -7 -6 -7 -2 -3 -6 -3 -4 -6 -2 -2 -5 -5 -2 -6 -7 -4 -8 -Q -2 1 0 -1 -5 9 3 -4 1 -5 -4 2 -1 -5 -3 -1 -1 -4 -3 -4 -1 5 -2 -8 -E -2 -1 -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 6 0 -3 -8 -Z -2 0 -1 1 -7 5 6 -4 0 -6 -5 1 -3 -6 -2 -1 -2 -5 -4 -4 0 6 -1 -8 -X -1 -2 -2 -3 -4 -2 -2 -3 -2 -2 -2 -2 -2 -3 -3 -1 -1 -5 -3 -2 -3 -1 -2 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/BLOSUM85 b/maven-src/target/classes/BLOSUM85 deleted file mode 100644 index cb47fd2..0000000 --- a/maven-src/target/classes/BLOSUM85 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum85.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 85 -# Entropy = 1.0805, Expected = -0.8153 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -2 -1 -1 -1 0 -2 -2 -2 -1 -2 -3 -1 1 0 -3 -3 -1 -2 -1 -1 -6 -R -2 6 -1 -2 -4 1 -1 -3 0 -4 -3 2 -2 -4 -2 -1 -2 -4 -3 -3 -2 0 -2 -6 -N -2 -1 7 1 -4 0 -1 -1 0 -4 -4 0 -3 -4 -3 0 0 -5 -3 -4 4 -1 -2 -6 -D -2 -2 1 7 -5 -1 1 -2 -2 -5 -5 -1 -4 -4 -2 -1 -2 -6 -4 -4 4 1 -2 -6 -C -1 -4 -4 -5 9 -4 -5 -4 -5 -2 -2 -4 -2 -3 -4 -2 -2 -4 -3 -1 -4 -5 -3 -6 -Q -1 1 0 -1 -4 6 2 -3 1 -4 -3 1 0 -4 -2 -1 -1 -3 -2 -3 -1 4 -1 -6 -E -1 -1 -1 1 -5 2 6 -3 -1 -4 -4 0 -3 -4 -2 -1 -1 -4 -4 -3 0 4 -1 -6 -G 0 -3 -1 -2 -4 -3 -3 6 -3 -5 -5 -2 -4 -4 -3 -1 -2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-2 -2 -1 -1 -2 -2 -1 -1 -3 -2 -1 -2 -1 -2 -6 -* -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 1 diff --git a/maven-src/target/classes/BLOSUM90 b/maven-src/target/classes/BLOSUM90 deleted file mode 100644 index 71441b5..0000000 --- a/maven-src/target/classes/BLOSUM90 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum90.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 90 -# Entropy = 1.1806, Expected = -0.8887 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -3 -1 -1 -1 0 -2 -2 -2 -1 -2 -3 -1 1 0 -4 -3 -1 -2 -1 -1 -6 -R -2 6 -1 -3 -5 1 -1 -3 0 -4 -3 2 -2 -4 -3 -1 -2 -4 -3 -3 -2 0 -2 -6 -N -2 -1 7 1 -4 0 -1 -1 0 -4 -4 0 -3 -4 -3 0 0 -5 -3 -4 4 -1 -2 -6 -D -3 -3 1 7 -5 -1 1 -2 -2 -5 -5 -1 -4 -5 -3 -1 -2 -6 -4 -5 4 0 -2 -6 -C -1 -5 -4 -5 9 -4 -6 -4 -5 -2 -2 -4 -2 -3 -4 -2 -2 -4 -4 -2 -4 -5 -3 -6 -Q -1 1 0 -1 -4 7 2 -3 1 -4 -3 1 0 -4 -2 -1 -1 -3 -3 -3 -1 4 -1 -6 -E -1 -1 -1 1 -6 2 6 -3 -1 -4 -4 0 -3 -5 -2 -1 -1 -5 -4 -3 0 4 -2 -6 -G 0 -3 -1 -2 -4 -3 -3 6 -3 -5 -5 -2 -4 -5 -3 -1 -3 -4 -5 -5 -2 -3 -2 -6 -H -2 0 0 -2 -5 1 -1 -3 8 -4 -4 -1 -3 -2 -3 -2 -2 -3 1 -4 -1 0 -2 -6 -I -2 -4 -4 -5 -2 -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 -6 -6 -6 1 diff --git a/maven-src/target/classes/META-INF/MANIFEST.MF b/maven-src/target/classes/META-INF/MANIFEST.MF deleted file mode 100644 index df98b61..0000000 --- a/maven-src/target/classes/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: main - diff --git a/maven-src/target/classes/java/halign/centerstar/BuildTree.java b/maven-src/target/classes/java/halign/centerstar/BuildTree.java deleted file mode 100644 index f06db35..0000000 --- a/maven-src/target/classes/java/halign/centerstar/BuildTree.java +++ /dev/null @@ -1,212 +0,0 @@ -package halign.centerstar; - -/** - * Build Tree. - * - * @author Huiyan Li, Quan Zou - */ -public class BuildTree { - - private Queue Q = new Queue(); //常用变量:队列Q - private int idCounter = 1; //常用变量:结点的ID值加法器 - - /*public String readStr() throws IOException { - BufferedReader sb = new BufferedReader(new InputStreamReader(System.in)); - return sb.readLine(); - } - - public int readInt() throws IOException { - String s = readStr(); - return Integer.parseInt(s); - }*/ - - /** - * 输出方法:用于输出Aho-Corasick算法的结果 - * 处理的是本类中的Q对列,其中保存了记录Aho-Corasick处理结果信息的 - * Record类对象I(详见本类方法ACsearch())。 - */ - public int[][] out() { - Position p; //Position类的变量,用于读取保存的位置 - Record I; //Record类的变量,用于读取记录的信息 - int i = 0; //整数i用户循环计数 - int[][] all = new int[2][Q.size() + 1]; //#############有待修改############################33 - - while (Q.size() != 0) { //当队列不空时,循环 - I = Q.popI(); //读取队首的记录 - p = (Position) I.name.get(0); //读取该模式号。 - all[0][i] = p.position; - all[1][i] = I.site; - i++; - } - all[0][i] = 0; - all[1][i] = 0; - return (all); - } - - /** - * 建树方法:根据字符串P中每段划分的起始位置和长度,在关键字树trie上 - * (可能是子树)递归地建立相应的分支。 - * - * @param P - 从键盘读入的字符串 - * @param i - 准备读入的子串的起始位置(在某一段划分中) - * @param r - 未读的子串的长度 - * @param trie - 已经部分建立的关键字树(子树树根地址) - * @param pid - 表示本次正在处理的是P中的哪段,编号从1开始。该参数 - * 纯粹为了输出方便,其实只要划分结束,在任何时候都可 - * 以计算出来。 - */ - public void build(String P, int i, int r, int pid, NewRoot trie) { - if (r > 0) { //如果还有没有读入的字符,则执行下面的语句 - NewRoot son = trie.searchSon(P.charAt(i)); /*在trie的儿子中查找是否有P中位置i的字符出现*/ - if (son == null) { //如果没有的话 - son = new NewRoot(P.charAt(i)); /*根据位置和字符建立一个新儿子结点*/ - /*注意,下面这两句和ID相关的话可以删除。*/ - son.ID = idCounter; //新结点的ID为id - idCounter++; //然后id+1以产生下一个ID号 - trie.addSon(son); //将新结点加入trie的儿子当中 - } - if (r == 1) { //如果处理到本段的最后一个字符,则 - son.setPos(pid); //在该结点中保存本段的段号。 - } - /*将son作为新子树树根,并根据P中下一个位置的字符继续建树,未读子串长度-1*/ - build(P, i + 1, r - 1, pid, son); - } - } - - /** - * 建立失效链接的方法:根据队列Q中的内容和树根trie层次地建立起每个结 - * 点的失效链接 - * - * @param trie - 关键字树(树根地址) - */ - public void failLink(NewRoot trie) { - int i; //整数i用于以后的循环计数 - int level = 1; /*整数level用于计算结点层次。 - 同时,它还永远等于即将遍历的 - 层次。这里是第一层。*/ - Q.clear(); //系统队列清零备用 - - NewRoot son; //建立一个树结点类型的变量son - for (i = 0; i < trie.sons.size(); i++) { //初始化第一层结点 - son = (NewRoot) trie.sons.get(i); /*每一个结点,即 - 根的儿子*/ - son.nv = trie; //其失效链接指向树根 - son.level = level; //其层次为1(因为是第一层) - Q.insert(son); //将该儿子插入队列。 - } - level++; //层次level加1,备用。 - - NewRoot NewRoot= new NewRoot(); //新建一个树结点 - NewRoot.v = 'L'; /*该结点的字符为‘L’,即 - “分层符”表示树的一层。 - 该符号用于判断每一层 - 遍历是否结束以便计算 - level的值。*/ - Q.insert(NewRoot); //将该节点插入队列。 - NewRoot w; //建立一个树结点类型的变量w - - while (Q.size() != 0) { //当队列不为空时 - NewRoot= Q.popfront(); //读出队列的队首结点 - if (NewRoot.v != 'L') { //如果该结点不是“分层符”则, - for (i = 0; i < NewRoot.sons.size(); i++) {//对该结点的 - son = (NewRoot) NewRoot.sons.get(i);/*每一个儿子 - 进行如下操作*/ - w = NewRoot.nv; /*看这个儿子父亲(即队首结点)的失效链接*/ -/*(这是下面这句的注释)如果该链接不是树根且没有标定该儿子字符的儿子,则*/ - while (w != trie && w.searchSon(son.v) == null) - w = w.nv; //接着看这个失效链接的失效链接 -/*可以看出,循环停止条件是失效链接指向树根,或存在标定该儿子字符的儿子*/ - if (w.searchSon(son.v) != null) {/*如果w存在 - 标定该son字符的儿子*/ - son.nv = w.searchSon(son.v); /*该son - 的失效链接指向标定该 - son字符的w的儿子*/ - } else //否则,即w的儿子中不存在这样的标定 - son.nv = trie; //则该son的失效链接指向树根 -/*(这是下面if语句的注释)如果该son不是每个分段的结束结点,但其失效链接最终 - 会指向某个Pi的末端结点(不一定直接指向),则该son的positions中插入-1, - 表示通过这个son结点找失效链接的话最终能够找到一个代表某个模式的结点,无论 - 这个节点或模式的尾节点是否是树叶。*/ - if (son.positions.size() == 0 && son.nv.positions.size() != 0) - son.setPos(-1); - - son.level = level; //将level值保存到son中去。 - Q.insert(son); /*将该儿子保存在队列中,以便 - 下一个层测的层次遍历*/ - } - } else { //否则,即队列的首结点是“分层符”L的话, - if (Q.size() != 0) { /*看队列是否为空,即刚弹出的队首 - 是否是最后一个结点,如果不是*/ - level++; //level加1,即该遍历下一层了 - Q.insert(NewRoot); /*将这个有“分层符”的结点再插到 - 队尾,这样队尾前的都是同以层 - 的树结点,层号都是刚才加1后 - 的level*/ - } - } - } - } - - /** - * Aho-Corasick搜索方法:根据关键字树trie对字符串T进行处理 - * - * @param T - 读入的字符串 - * @param trie - 建立的关键字树 - */ - public void ACsearch(String T, NewRoot trie) { - int i; //整数i用于循环计数 - Position p; //Position类的p用于暂存位置 - NewRoot NewRoot= trie; //树结点Nodea先等于树根trie - NewRoot son; //树结点变量son以后用。 - Record I; //Record类型变量用于保存结果 - Q.clear(); //队列清零备用 - for (i = 0; i < T.length(); i++) { //对于T中的每一个字符T(i) - son = NewRoot.searchSon(T.charAt(i)); /*看看Nodea的儿子 - 里有没有标定T(i)的*/ - while (son == null) { //如果没有的话 - if (NewRoot == trie) //如果Nodea是树根, - break; //则跳出。 - NewRoot= NewRoot.nv; //否则Nodea等于它的失效链接 - son = NewRoot.searchSon(T.charAt(i)); /*继续在它的 - 儿子中寻找T(i)*/ - } - - if (NewRoot == trie && son == null) /*如果Nodea是树根,而且 - 刚才跳出了(这样son才会为空)*/ - continue; /*则结束外层循环,继续看T中下一个 - 字符*/ - NewRoot= son; //Nodea等于它那个标定T(i)的儿子 - if (NewRoot.positions.size() != 0) { /*如果该结点可能代表 - 一个模式Pi*/ - p = (Position) NewRoot.positions.get(0); /*检查 - positions的 - 首位以判断这个 - 结点是否直接代 - 表着某个模式*/ - if (p.position != -1) { /*如果positions的首位不是 - -1,即意味着该结点直接代表着 - 某个模式Pi的话*/ -/*(这是下面这句的注释)将该结点所代表的模式在T中的起始位置计算并记录在I中, - 同时将该结点所代表的模式号也记录下来。*/ - I = new Record(i + 2 - NewRoot.level, NewRoot.positions); - Q.insert(I); //将I保存在队列中。 - } - son = NewRoot.nv; //继续看Nodea的失效链接 -/*(这是下面这句的注释)如果该链接不为空而且不指向根节点,而且可能代表着某个 - 模式的话,则进行循环,该循环找到这个结点所连接到的所有可能模式*/ - while (son != null && son != trie && son.positions.size() != 0) { - p = (Position) son.positions.get(0);/*看该 - 链接的positions首位*/ - if (p.position != -1) { /*如果首位不是-1,即该 - 失效链接直接代表着某个模式,则*/ -/*(这是下面这句的注释)将该结点所代表的模式在T中的起始位置计算并记录在I中, - 同时将该结点所代表的模式号也记录下来。*/ - I = new Record(i + 2 - son.level, son.positions); - Q.insert(I); //将I保存在队列中。 - son = son.nv; //继续看它的失效链接 - } - } - } - } - } -} diff --git a/maven-src/target/classes/java/halign/centerstar/MatrixMSA.java b/maven-src/target/classes/java/halign/centerstar/MatrixMSA.java deleted file mode 100644 index 0fe0769..0000000 --- a/maven-src/target/classes/java/halign/centerstar/MatrixMSA.java +++ /dev/null @@ -1,332 +0,0 @@ -package halign.centerstar; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; - -import halign.suffixtree.ExtremeMSA; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.NullWritable; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; -import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; - -import utils.HDFSUtils; - -public class MatrixMSA { - private String filepath = ""; //记录文件名称 - private static String Pi[]; // 记录每一个序列 - private static String Piname[]; // 记录每一个序列的名字 - private int Spaceevery[][]; //存放中心序列分别与其他序列比对时增加的空格的位置 - private int Spaceother[][]; //存放其他序列与中心序列比对时增加的空格的位置 - private int n; //存放序列个数 - private int center; //存放中心序列编号 - private int spacescore = -1, matchscore = 0, mismatchscore = -1; //###########定义匹配,不匹配和空格的罚分############### - - //原始的星比对算法 - public void start(String inputfile, String outputfile, String outputDFS) - throws IOException, ClassNotFoundException, InterruptedException { - filepath = inputfile; - n = countnum();//记录序列的个数 - if (outputDFS == null) { - input(); //Pi PiName - } else { - Pi = new String[n]; - Piname = new String[n]; - System.out.println(">>Clearing HDFS Path & uploading ..."); - HDFSUtils MSAFileUtils = new HDFSUtils(); - MSAFileUtils.clear_dfs_path(outputDFS); - MSAFileUtils.local_to_dfs(inputfile, outputDFS + "/input/input.txt"); - - System.out.println(">>Map reducing ..."); - Configuration conf = new Configuration(); - conf.set("mapred.task.timeout", "0"); - Job job = Job.getInstance(conf, "msa_matrix"); - job.setJarByClass(ExtremeMSA.class); - job.setInputFormatClass(TextInputFormat.class); - job.setMapperClass(MatrixMapper.class); - job.setMapOutputKeyClass(NullWritable.class); - job.setMapOutputValueClass(Text.class); - FileInputFormat.addInputPath(job, new Path(outputDFS + "/input/input.txt")); - FileOutputFormat.setOutputPath(job, new Path(outputDFS + "/output")); - job.setNumReduceTasks(1); - job.waitForCompletion(true); - } - - - // 先找星序列(相似度值最大的序列),然后根据星序列进行多序列比对 - center = findNumMax(computesim()); - //System.out.println("中心序列是第" + centerstar + "条!"); - Spaceevery = new int[n][Pi[center].length() + 1]; //存放中心序列分别与其他序列比对时增加的空格的位置 - Spaceother = new int[n][computeMaxLength(center) + 1]; //存放其他序列与中心序列比对时增加的空格的位置 - for (int i = 0; i < n; i++) { - if (i == center) continue; - int M[][] = computeScoreMatrixForDynamicProgram(Pi[i], Pi[center]);//动态规划矩阵计算完毕 - //将插入的空格存入数组,spaceevery存中心序列,spaceother存比较的序列 - traceBackForDynamicProgram(M, Pi[i].length(), Pi[center].length(), i, 0, 0); - } - //Space数组长度是中心序列长度+1,元素存入该元素的max spaceevery元素值(就是中心序列应该插入的元素值) - int Space[] = combine(); - //Space - output(Space, outputfile); - } - - //计算序列个数 - private int countnum() { - int num = 0; - try { - BufferedReader br = new BufferedReader(new FileReader(filepath)); - String s; - while (br.ready()) { - s = br.readLine(); - if (s.charAt(0) == '>') - num++; - } - br.close(); - } catch (Exception ignored) { - } - return (num); - } - - //将序列一次读入数组中 - private void input() { - Pi = new String[n]; - Piname = new String[n]; - int i = 0; - try { - BufferedReader br = new BufferedReader(new FileReader(filepath)); - String BR = br.readLine(); - while (br.ready()) { - if (BR.length() != 0 && BR.charAt(0) == '>') { - Piname[i] = BR; - Pi[i] = ""; - while (br.ready() && (BR = br.readLine()).charAt(0) != '>') { - Pi[i] += BR; - } - i++; - } else - BR = br.readLine(); - } - br.close(); - } catch (Exception ex) { - System.out.println(ex.getMessage()); - System.exit(0); - } - } - - //找出Num[][]数组中和最大的那一行 - private int findNumMax(int Num[][]) { - int Numsum[] = new int[n]; - for (int i = 0; i < n; i++) { - Numsum[i] = 0; - for (int j = 0; j < n; j++) - Numsum[i] = Numsum[i] + Num[i][j]; - } - int tmpcenter = 0; - for (int i = 1; i < n; i++) { - if (Numsum[i] > Numsum[tmpcenter]) - tmpcenter = i; - } - return (tmpcenter); - } - - //在动态规划中计算矩阵积分 - private int[][] computeScoreMatrixForDynamicProgram(String stri, String strC) { - int len1 = stri.length() + 1; - int len2 = strC.length() + 1; - int M[][] = new int[len1][len2]; //定义动态规划矩阵 - //---初始化动态规划矩阵----------- - int p, q; - for (p = 0; p < len1; p++) - M[p][0] = spacescore * p; - for (q = 0; q < len2; q++) - M[0][q] = spacescore * q; - //---初始化结束---------- - //----计算矩阵的值------------ - for (p = 1; p < len1; p++) { - for (q = 1; q < len2; q++) {//M[p][q]=max(M[p-1][q]-1,M[p][q-1]-1,M[p-1][q-1]+h) - int h; - if (stri.charAt(p - 1) == strC.charAt(q - 1)) { - h = matchscore; - } - else h = mismatchscore; - M[p][q] = Math.max(M[p - 1][q - 1] + h, Math.max(M[p - 1][q] + spacescore, M[p][q - 1] + spacescore)); - } - } - return (M); - } - - //在动态规划中回溯 - private void traceBackForDynamicProgram(int[][] M, int p, int q, int i, int k1, int k2) { - while (p > 0 && q > 0) { - if (M[p][q] == M[p][q - 1] + spacescore) { - Spaceother[i][p + k1]++; - q--; - } else if (M[p][q] == M[p - 1][q] + spacescore) { - Spaceevery[i][q + k2]++; - p--; - } else { - p--; - q--; - } - } - if (p == 0) { - while (q > 0) { - Spaceother[i][k1]++; - q--; - } - } - if (q == 0) { - while (p > 0) { - Spaceevery[i][k2]++; - p--; - } - } - } - - private int[] combine() { - int Space[] = new int[Pi[center].length() + 1];//该数组用来记录在P[centerstar]的最终结果各个空隙间插入空格的个数 - int i, j; - for (i = 0; i < Pi[center].length() + 1; i++) { - int max = 0; - for (j = 0; j < n; j++) { - if (Spaceevery[j][i] > max) { - max = Spaceevery[j][i]; - } - } - Space[i] = max; - } - return (Space); - } - - //计算除中心序列以外的其他序列的最大长度 - private int computeMaxLength(int center) { - int maxlength = 0; - for (int i = 0; i < n; i++) { - if (i == center) - continue; - if (Pi[i].length() > maxlength) - maxlength = Pi[i].length(); - } - return (maxlength); - } - - private void output(int[] Space, String outputfile) { - int i, j; - //---------输出中心序列---------- - String PiAlign[] = new String[n]; - PiAlign[center] = ""; - for (i = 0; i < Pi[center].length(); i++) { - for (j = 0; j < Space[i]; j++) { - PiAlign[center] = PiAlign[center].concat("-"); - } - PiAlign[center] = PiAlign[center].concat(Pi[center].substring(i, i + 1)); - } - for (j = 0; j < Space[Pi[center].length()]; j++) { - PiAlign[center] = PiAlign[center].concat("-"); - } - //--------中心序列输出完毕----- - //---------输出其他序列------- - for (i = 0; i < n; i++) { - if (i == center) - continue; - //----计算和中心序列比对后的P[i],记为Pi----- - PiAlign[i] = ""; - for (j = 0; j < Pi[i].length(); j++) { - String kong = ""; - for (int k = 0; k < Spaceother[i][j]; k++) { - kong = kong.concat("-"); - } - PiAlign[i] = PiAlign[i].concat(kong).concat(Pi[i].substring(j, j + 1)); - } - String kong = ""; - for (j = 0; j < Spaceother[i][Pi[i].length()]; j++) { - kong = kong.concat("-"); - } - PiAlign[i] = PiAlign[i].concat(kong); - //---Pi计算结束--------- - //----计算差异数组---- - int Cha[] = new int[Pi[center].length() + 1]; - int position = 0; //用来记录插入差异空格的位置 - for (j = 0; j < Pi[center].length() + 1; j++) { - Cha[j] = 0; - if (Space[j] - Spaceevery[i][j] > 0) { - Cha[j] = Space[j] - Spaceevery[i][j]; - } - //----差异数组计算完毕--- - //----填入差异空格---- - position = position + Spaceevery[i][j]; - if (Cha[j] > 0) { //在位置position处插入Cha[j]个空格 - kong = ""; - for (int k = 0; k < Cha[j]; k++) { - kong = kong.concat("-"); - } - PiAlign[i] = PiAlign[i].substring(0, position).concat(kong).concat(PiAlign[i].substring(position)); - } - position = position + Cha[j] + 1; - //----差异空格填入完毕-- - } - } - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile)); - for (i = 0; i < n; i++) { - //System.out.println(Piname[i]); - bw.write(Piname[i]); - bw.newLine(); - bw.flush(); - //System.out.println(PiAlign[i]); - bw.write(PiAlign[i]); - bw.newLine(); - bw.flush(); - } - bw.close(); - } catch (Exception ignored) { - - } -//---------其他序列输出完毕----- -//---------输出结束-------------- - - } - - //计算原始星比对中sim矩阵的值 - private int[][] computesim() { - int[][] sim = new int[n][n]; - int i, j; - //计算上三角 - for (i = 0; i < n; i++) { - for (j = i + 1; j < n; j++) { - int M[][]; - // 双序列的动态规划对比 - M = computeScoreMatrixForDynamicProgram(Pi[i], Pi[j]); - sim[i][j] = M[Pi[i].length()][Pi[j].length()]; - } - } - //-----计算sim[][]的下三角 - for (i = 0; i < n; i++) - sim[i][i] = 0; - for (i = 1; i < n; i++) - for (j = 0; j < i; j++) { - sim[i][j] = sim[j][i]; - } - return (sim); - } - - public static class MatrixMapper extends Mapper { - int count = 0; - public void map(Object key, Text value, Context context) throws IOException, InterruptedException{ - if (value.charAt(0) == '>') { - Piname[count] = value.toString(); - } else { - Pi[count] = value.toString(); - count++; - } - context.write(NullWritable.get(), value); - } - } -} diff --git a/maven-src/target/classes/java/halign/centerstar/NewRoot.java b/maven-src/target/classes/java/halign/centerstar/NewRoot.java deleted file mode 100644 index 899ada0..0000000 --- a/maven-src/target/classes/java/halign/centerstar/NewRoot.java +++ /dev/null @@ -1,69 +0,0 @@ -package halign.centerstar; - -import java.util.ArrayList; - -public class NewRoot { - /*如果两个划分存在相同前缀,因为该前缀中的符号在树中有唯一的位置,故用 - 一个ArrayList的positions来记录该相同符号在P中所出现的位置*/ - ArrayList positions = new ArrayList(); - char v; //结点所代表的符号 - NewRoot nv; //失效链接中该结点的对应结点(地址) - ArrayList sons = new ArrayList(); /*用来记录该节点所有的儿子结点(地址)*/ - int ID; /*为了方便人为判断关键字树的建立是否正确,为每个结点引入一个ID以助判断结点之间的关系。注:以后可以删除,对结果无甚影响*/ - int level; /*结点所在的层测。为了在AC算法中能得到Pi在T中的开始位置而设立。该位置用当前T中位置号减去当前结点的层次即可得到。*/ - - /** - * 构造方法:初始化一个根结点,nv指向根结点本身 - */ - NewRoot() { - v = 'r'; //结点的符号是跟 - nv = this; //结点的失效链接是它本身 - level = 0; - } - - /** - * 构造方法:根据当前符号来初始化一个结点(通常是儿子) - */ - NewRoot(char c) { - v = c; //设结点的符号为c - } - - /** - * 该方法把相同前缀中的符号在P中出现的新位置保存起来 - * - * @param posit - 符号在P中的位置 - */ - public void setPos(int posit) { - Position posrec = new Position(); //新建一个Position对象 - posrec.position = posit; //该对象的设置为整数posit - positions.add(posrec); //将这个对象加入到positions中。 - } - - /** - * 该方法为结点添加一个新儿子 - * - * @param newSon - 新儿子 - */ - public void addSon(NewRoot newSon) { - sons.add(newSon); //add方法有ArrayList提供 - } - - /** - * 该方法根据输入的符号在结点的所有儿子中查询是否已经有代表该符号的儿 - *  子出现。有则返回该儿子(地址),无则返回空 - * @param c - 要查询的符号 - * @return son - 查询结果,查到则返回该儿子,无则为空 - */ - public NewRoot searchSon(char c) { - NewRoot son = null; - for (int i = 0; i < sons.size(); i++) { - son = (NewRoot) sons.get(i); //查询每一个儿子 - if (son.v == c) //如果儿子的字符和c一样 - break; //中断循环 - else - son = null; //否则儿子为空 - } - return son; //返回查询结果 - } - -} diff --git a/maven-src/target/classes/java/halign/centerstar/Position.java b/maven-src/target/classes/java/halign/centerstar/Position.java deleted file mode 100644 index 056169f..0000000 --- a/maven-src/target/classes/java/halign/centerstar/Position.java +++ /dev/null @@ -1,8 +0,0 @@ -package halign.centerstar; - -public class Position { - - int position; //结点所代表的符号在P中的位置 - - -} \ No newline at end of file diff --git a/maven-src/target/classes/java/halign/centerstar/Queue.java b/maven-src/target/classes/java/halign/centerstar/Queue.java deleted file mode 100644 index 01b610f..0000000 --- a/maven-src/target/classes/java/halign/centerstar/Queue.java +++ /dev/null @@ -1,77 +0,0 @@ -package halign.centerstar; - -import java.util.ArrayList; - -/** - * 队列类型,用来进行层次遍历时保存访问过的结点(地址)。 - * - * @author 李慧妍 - * @version 2006年3月27日 - */ -public class Queue { - - ArrayList Q = new ArrayList(); //声明并初始化一个ArrayList - - /** - * 队列的插入方法:即在队尾插入一个树结点 - * - * @param node - 树结点 - */ - public void insert(NewRoot node) { - Q.add(node); //add是ArrayList提供的 - } - - /** - * 队列的插入方法:即在队尾插入一个记录AC算法处理信息的结点 - * - * @param I - Record类型的结点 - */ - public void insert(Record I) { - Q.add(I); - } - - /** - * 队列的弹出方法,即从队首读取并删除一个树结点 - * - * @return 队首的树结点 - */ - public NewRoot popfront() { - NewRoot node; //用一个数结点类型的变量node - if (Q.size() == 0) //size是ArrayList提供的.如果Q为空则 - node = null; //node为空值 - else { //否则 - node = (NewRoot) Q.get(0); //node等于队首节点 - Q.remove(0); //并将队首结点删除。 - } - return node; //返回node - } - - /** - * 队列的弹出方法:从队首读取并删除一个Record类型的节点。 - * - * @return 队首的Record类对象 - */ - public Record popI() { - Record I; //用一个Record类型的变量I - /*因为调用时已经保证队列不为空,因此在这里就不进行判断直接处理了*/ - I = (Record) Q.get(0); //I等于队首结点 - Q.remove(0); //将队首节点删除 - return I; //返回I - } - - /** - * 队列的长度方法,利用ArrayList提供的size()方法返回队列长度 - * - * @return 队列长度 - */ - public int size() { - return Q.size(); - } - - /** - * 队列的清除方法,利用ArrayList提供的clear()方法清空队列 - */ - public void clear() { - Q.clear(); - } -} diff --git a/maven-src/target/classes/java/halign/centerstar/Record.java b/maven-src/target/classes/java/halign/centerstar/Record.java deleted file mode 100644 index 6b134ef..0000000 --- a/maven-src/target/classes/java/halign/centerstar/Record.java +++ /dev/null @@ -1,37 +0,0 @@ -package halign.centerstar; - -import java.util.ArrayList; - -/** - * 记录类型,用于保存Aho-Corasick算法搜索时找到的匹配信息。 - * - * @author 李慧妍 - * @version 2006年3月27日 - */ -public class Record { - - int site; /*用于记录该匹配模式在T中出现的起始位置。因为 - Aho-Corasick算法是针对每个位置的,因此每个记录只 - 保存一个位置。*/ - ArrayList name = new ArrayList(); /*用于记录该记录保存的位置 - 所对应的所有模式*/ - /*请注意: - *从上面的信息域可以看出,尽管每个记录可以对应多个模式,但每个记录却 - 只保存一个位置。因此会存在多个记录(位置)对应一个模式的情况。*/ - - /** - * 记录的构造方法:根据匹配字符串在T中的起始位置和对应的所有模式建立 - * 一个新记录。 - * - * @param st - 本次匹配的模式的在T中的起始位置。 - * @param pos - 本次匹配的所有模式在P中的编号。 - */ - Record(int st, ArrayList pos) { - site = st; //让site等于st。 - Position p; //用一个Position变量p来遍历pos。 - for (int i = 0; i < pos.size(); i++) { //对于pos中的每一个 - p = (Position) pos.get(i); //Position类对象, - name.add(p); //将这个对象添加到name里 - } - } -} diff --git a/maven-src/target/classes/java/halign/centerstar/TreeMSA.java b/maven-src/target/classes/java/halign/centerstar/TreeMSA.java deleted file mode 100644 index 4a4a1e5..0000000 --- a/maven-src/target/classes/java/halign/centerstar/TreeMSA.java +++ /dev/null @@ -1,375 +0,0 @@ -package halign.centerstar; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.NullWritable; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; -import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; - -import utils.HDFSUtils; - -public class TreeMSA { - private static String[] sequence; // 序列 - private static String[] sequenceName; // 序列名 - private int[][] spaceCentre; // 中心序列增加空格的位置 - private int[][] spaceOthers; // 其它序列增加空格的位置 - private int r; // 被划分的小段的长度 - private int n; // 序列数量 - private int c; // 中心序列索引 - private int spaceScore = -1; // 动态规划 - private int[][][][] name; - - public boolean start(String inputFile, String outputFile, String outputDFS) - throws IOException, ClassNotFoundException, InterruptedException { - n = count(inputFile); - if (n < 2) - return false; - if (outputDFS == null) - input(inputFile); - else { - sequence = new String[n]; - sequenceName = new String[n]; - System.out.println(">>Clearing HDFS Path & uploading ..."); - HDFSUtils MSAFileUtils = new HDFSUtils(); - MSAFileUtils.clear_dfs_path(outputDFS); - MSAFileUtils.local_to_dfs(inputFile, outputDFS + "/input/input.txt"); - System.out.println(">>Map reducing ..."); - Configuration conf = new Configuration(); - conf.set("mapred.task.timeout", "0"); - Job job = Job.getInstance(conf, "msa_tree"); - job.setJarByClass(TreeMSA.class); - job.setInputFormatClass(TextInputFormat.class); - job.setMapperClass(TreeMapper.class); - job.setMapOutputKeyClass(NullWritable.class); - job.setMapOutputValueClass(Text.class); - FileInputFormat.addInputPath(job, new Path(outputDFS + "/input/input.txt")); - FileOutputFormat.setOutputPath(job, new Path(outputDFS + "/output")); - job.setNumReduceTasks(1); - job.waitForCompletion(true); - } - // 计算划分的序列长度,待改进 - r = sequence[1].length() < 300 ? sequence[1].length() : sequence[1].length() / 30; - System.out.printf("the length of substrings is %d\n", r); - c = findCentre(); - System.out.printf("centre sequence is sequence[%d]\n", c); - // 多序列比对部分 - spaceCentre = new int[n][sequence[c].length() + 1]; // 存放中心序列增加空格的位置 - spaceOthers = new int[n][maxLength() + 1]; // 存放其它序列增加空格的位置 - for (int i = 0; i < n; ++i) { - if (i == c) - continue; - // 比对其它序列与中心序列有重合的前端 - if (name[c][i][0][0] != 0 && name[c][i][1][0] != 0) { - System.out.printf("preAligning sequence[%d]\n", i); - // 此处有漏洞,如果name[c][i][0][0] == 0,会报错 - String strCentre = sequence[c].substring(0, (name[c][i][0][0] - 1) * r); - String strOthers = sequence[i].substring(0, name[c][i][1][0] - 1); // 第二个参数-1 - System.out.printf("\tcentre: %s\n", strCentre); - System.out.printf("\tothers: %s\n", strOthers); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, 0, 0); - } - // 比对其它序列与中心序列有重合的中间部分 - System.out.printf("midAligning sequence[%d]\n", i); - for (int j = 1; j < name[c][i][0].length - 1; ++j) // 判断条件-1 - if (name[c][i][0][j] != 0 && name[c][i][1][j] >= name[c][i][1][j - 1] + r && name[c][i][0][j] > name[c][i][0][j - 1]) { // 去掉一个不等于0的检查 - // 此处有漏洞,如果name[c][i][0][0] == 0,会报错 - System.out.printf("%d:\n", j); - String strCentre = sequence[c].substring(name[c][i][0][j - 1] * r, (name[c][i][0][j] - 1) * r); - String strOthers = sequence[i].substring(name[c][i][1][j - 1] + r - 1, name[c][i][1][j] - 1); // 各-1 - System.out.printf("\tcentre: %s\n", strCentre); - System.out.printf("\tothers: %s\n", strOthers); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, - name[c][i][1][j - 1] + r - 1, name[c][i][0][j - 1] * r); - } - // 比对其它序列与中心序列有重合的后端 - int j = name[c][i][0].length - 1; - System.out.printf("postAligning sequence[%d]\n", i); - if (j != 0) { - String strCentre = sequence[c].substring(r * name[c][i][0][j - 1]); - String strOthers = sequence[i].substring(name[c][i][1][j - 1] + r - 1); // -1 - System.out.printf("\tcentre: %s\n", strCentre); - System.out.printf("\tothers: %s\n", strOthers); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, name[c][i][1][j - 1] + r - 1, name[c][i][0][j - 1] * r); - } else { - String strCentre = sequence[c]; - String strOthers = sequence[i]; - System.out.printf("\tcentre: %s\n", strCentre); - System.out.printf("\tothers: %s\n", strOthers); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, 0, 0); - } - } - output(combine(), outputFile); - return true; - } - - // 读入 - private void input(String inputFile) { - sequence = new String[n]; - sequenceName = new String[n]; - int i = -1; - try { - BufferedReader br = new BufferedReader(new FileReader(inputFile)); - String line; - while (br.ready()) { - line = br.readLine(); - if (line.length() > 0 && line.charAt(0) == '>') { - sequenceName[++i] = line; - sequence[i] = ""; - break; - } - } - while (br.ready()) { - line = br.readLine(); - if (line.length() > 0 && line.charAt(0) == '>') { - sequenceName[++i] = line; - sequence[i] = ""; - } else - sequence[i] += format(line); - } - br.close(); - } catch (Exception ex) { - System.out.println(ex.getMessage()); - System.exit(0); - } - } - - // 格式化String,转为大写字母,保留A, G, C, T, N,替换U为T,忽略空格,其它字符为N - private String format(String s) { - s = s.toUpperCase(); - s = s.replaceAll("\\s*", ""); - s = s.replace('U', 'T'); - StringBuilder sb = new StringBuilder(s); // 可能待改,线程安全警告 - for (int i = 0; i < sb.length(); ++i) { - switch (sb.charAt(i)) { - case 'A': - case 'C': - case 'G': - case 'T': - case 'N': - break; - default: - sb.replace(i, i + 1, "n"); - } - } - return sb.toString(); - } - - // 建立关键字树 - private NewRoot buildTrieTree(int i, BuildTree buildTree) { - NewRoot trie = new NewRoot(); // 创建一个新关键字树(树根) - trie.ID = 0; // 树根的ID为0 - for (int j = 0; j < sequence[i].length() / r; ++j) // 建树。对于每一个长度为r的划分子串 - buildTree.build(sequence[i], j * r, r, j + 1, trie); // 根据这个子串建树 - buildTree.failLink(trie); // 建立整个树的失效链接 - return trie; - } - - // 找出num[][]数组中和最大的那一行,作为中心序列 - private int findNumMax(int[][] num) { - int[] sum = new int[n]; - for (int i = 0; i < n; i++) { - sum[i] = 0; - for (int j = 0; j < n; j++) - sum[i] += num[i][j]; - } - int max = 0; - for (int i = 1; i < n; i++) - max = sum[max] > sum[i] ? max : i; - return max; - } - - // 找出中心序列 - private int findCentre() { - int[][] num = new int[n][n]; // 用来记录出现的个数 - name = new int[n][n][2][]; // 用来存放出现的名字 - BuildTree buildTree = new BuildTree(); - for (int i = 0; i < n; ++i) { - NewRoot trieTree = buildTrieTree(i, buildTree); - for (int j = 0; j < n; j++) - if (i != j) { - buildTree.ACsearch(sequence[j], trieTree); - name[i][j] = buildTree.out(); - num[i][j] = name[i][j][0].length - 1; - } else - num[i][j] = 0; - } - return findNumMax(num); - } - - // 动态规划矩阵 - private int[][] scoreMatrix(String strOthers, String strCentre) { - int matchScore = 0, mismatchScore = -1; - int len1 = strOthers.length() + 1, len2 = strCentre.length() + 1; - int[][] dp = new int[len1][len2]; // 定义动态规划矩阵 - // 初始化 - int p, q; - for (p = 0; p < len1; ++p) - dp[p][0] = spaceScore * p; - for (q = 1; q < len2; ++q) - dp[0][q] = spaceScore * q; - // 矩阵每一个元素依赖于其左上角元素及其对应字符是否相等,上边的元素和左边的元素 - // dp[p][q]=max(dp[p-1][q]-1,dp[p][q-1]-1,dp[p-1][q-1]+h) - for (p = 1; p < len1; ++p) - for (q = 1; q < len2; ++q) { - int h; - h = strOthers.charAt(p - 1) == strCentre.charAt(q - 1) ? matchScore : mismatchScore; - dp[p][q] = Math.max(dp[p - 1][q - 1] + h, Math.max(dp[p - 1][q] + spaceScore, dp[p][q - 1] + spaceScore)); - } - return dp; - } - - // 回溯。p, q为间隔字符串长度,k1, k2为字串起始位置 - private void traceBack(int[][] dp, int p, int q, int i, int k1, int k2) { - while (p > 0 && q > 0) - if (dp[p][q] == dp[p][q - 1] + spaceScore) { - // 可能来自上边就向上走 - ++spaceOthers[i][p + k1]; - --q; - } else if (dp[p][q] == dp[p - 1][q] + spaceScore) { - // 否则,可能来自左边就向左走 - ++spaceCentre[i][q + k2]; - --p; - } else { - // 否则,向左上走 - --p; - --q; - } - while (q > 0) { - ++spaceOthers[i][k1]; - --q; - } - while (p > 0) { - ++spaceCentre[i][k2]; - --p; - } - } - - private int[] combine() { - int[] space = new int[sequence[c].length() + 1];// 记录中心序列中空格的添加位置和数量 - int i, j, max; - for (i = 0; i < sequence[c].length() + 1; ++i) { - max = 0; - for (j = 0; j < n; ++j) - max = spaceCentre[j][i] > max ? spaceCentre[j][i] : max; - space[i] = max; - } - return space; - } - - // 返回序列数量 - private int count(String filePath) { - int num = 0; - try { - BufferedReader br = new BufferedReader(new FileReader(filePath)); - String s; - while (br.ready()) { - s = br.readLine(); - if (s.length() > 0 && s.charAt(0) == '>') - ++num; - } - br.close(); - } catch (Exception ex) { - ex.getStackTrace(); - } - if (num == 0) { - System.out.println("no sequence found"); - System.out.println("no need to align"); - } else if (num == 1) { - System.out.println("only one sequence found"); - System.out.println("please try another file"); - } else - System.out.println(num + " sequences found"); - return num; - } - - // 计算除中心序列以外的其他序列的最大长度 - private int maxLength() { - int maxLength = 0; - for (int i = 0; i < n; ++i) - if (i != c) - maxLength = sequence[i].length() > maxLength ? sequence[i].length() : maxLength; - return maxLength; - } - - private void output(int[] space, String outputFile) { - String[] output = new String[n]; - // 输出中心序列 - output[c] = ""; - for (int i = 0; i < sequence[c].length(); ++i) { - for (int j = 0; j < space[i]; ++j) - output[c] = output[c].concat("-"); - output[c] = output[c].concat(sequence[c].substring(i, i + 1)); - } - for (int j = 0; j < space[sequence[c].length()]; ++j) - output[c] = output[c].concat("-"); - // 输出其它序列 - for (int i = 0; i < n; ++i) - if (i != c) { - output[i] = ""; - for (int j = 0; j < sequence[i].length(); ++j) { - for (int k = 0; k < spaceOthers[i][j]; ++k) - output[i] = output[i].concat("-"); - output[i] = output[i].concat(sequence[i].substring(j, j + 1)); - } - for (int j = 0; j < spaceOthers[i][sequence[i].length()]; ++j) - output[i] = output[i].concat("-"); - // 计算差异数组 - int[] dis = new int[sequence[c].length() + 1]; - int position = 0; // 插入差异空格的位置 - for (int j = 0; j < sequence[c].length() + 1; ++j) { - int tmp1 = space[j] - spaceCentre[i][j]; - dis[j] = tmp1 > 0 ? tmp1 : 0; - position = position + spaceCentre[i][j]; - if (dis[j] > 0) { // 在位置position处插入空格 - String tmp2 = ""; - for (int k = 0; k < dis[j]; ++k) - tmp2 = tmp2.concat("-"); - output[i] = output[i].substring(0, position).concat(tmp2).concat(output[i].substring(position)); - } - position += dis[j] + 1; - } - } - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile)); - for (int i = 0; i < n; ++i) { - bw.write(sequenceName[i]); - bw.newLine(); - bw.flush(); - bw.write(output[i].toUpperCase()); - if (i != n - 1) - bw.newLine(); - bw.flush(); - } - bw.close(); - } catch (Exception ignored) { - } - } - - public static class TreeMapper extends Mapper { - int count = 0; - - public void map(Object key, Text value, Context context) throws IOException, InterruptedException { - if (value.charAt(0) == '>') { - sequenceName[count] = value.toString(); - } else { - sequence[count] = value.toString(); - ++count; - } - context.write(NullWritable.get(), value); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/halign/kband/AffineGapPenalty.java b/maven-src/target/classes/java/halign/kband/AffineGapPenalty.java deleted file mode 100644 index 411dd3a..0000000 --- a/maven-src/target/classes/java/halign/kband/AffineGapPenalty.java +++ /dev/null @@ -1,114 +0,0 @@ -package halign.kband; - -public class AffineGapPenalty {//完成数组,a,b,c,p的初始化 - int m,n,g,h,mn,min,M,misM; - static int [][] a,b,c,p; - static int k; - String s,t; - public AffineGapPenalty(int m,int n,int g,int h,int k,int mn,String s,String t,int M,int misM) { - this.m=m+1; - this.n=n+1; - this.g=g; - this.h=h; - AffineGapPenalty.k=k; - this.mn=mn; - this.s=s; - this.t=t; - min=-1073741824;//int类型最小值为-2的31次方即-2147483648,假设min=2的-30次方是负无穷 - this.M = M; - this.misM = misM; - } - - public void InitP(String s,String t,int K){ - p=new int[m][K]; - for(int i=1;i=1){ - char s1, t1; - s1 = s.charAt(i-1);//******************** - t1 = t.charAt(j-1);//******************** - if (s1 == t1) - p[i][j+k-i]=M;//p[i][j] = 1; p'(i,j+k-i)=p(i,j) - else - p[i][j+k-i]=misM;//p[i][j] = -1; - } - } - } - } - - public void InitA(int K){ - a=new int[m][K]; - for(int i=0;i=1){ - mk=maxOfThree(a[i-1][j-1+k-(i-1)],b[i-1][j-1+k-(i-1)],c[i-1][j-1+k-(i-1)]); - a[i][j+k-i]=p[i][j+k-i]+mk; - if(insideStrip(i,j-1,mn,k)){ - mk=maxOfThree(a[i][j-1+k-i]-(h+g),b[i][j-1+k-i]-g,c[i][j-1+k-i]-(h+g)); - b[i][j+k-i]=mk; - } - - if(insideStrip(i-1,j,mn,k)){ - mk=maxOfThree(a[i-1][j+k-(i-1)]-(h+g),b[i-1][j+k-(i-1)]-(h+g),c[i-1][j+k-(i-1)]-g); - c[i][j + k - i] = mk; - } - } - } - } - return maxOfThree(a[m-1][n-1+k-(m-1)],b[m-1][n-1+k-(m-1)],c[m-1][n-1+k-(m-1)]); - } - - public int maxOfThree(int a,int b,int c){ - int k=Math.max(a,b); - return Math.max(k,c); - } - - public boolean insideStrip(int i,int j,int mn,int k){ - if(j-i>=-k&&j-i<=mn+k) - return true; - else - return false; - } -} - diff --git a/maven-src/target/classes/java/halign/kband/InitGapPenalty.java b/maven-src/target/classes/java/halign/kband/InitGapPenalty.java deleted file mode 100644 index 69ca564..0000000 --- a/maven-src/target/classes/java/halign/kband/InitGapPenalty.java +++ /dev/null @@ -1,40 +0,0 @@ -package halign.kband; - -//帮助Generate类的完成 -public class InitGapPenalty { - private int[][] a,b,c,p; - private int h,g,k; - - //abcp初始化 - InitGapPenalty(int g, int h) { - a=AffineGapPenalty.a; - b=AffineGapPenalty.b; - c=AffineGapPenalty.c; - p=AffineGapPenalty.p; - k=AffineGapPenalty.k; - this.g=g; - this.h=h; - } - - int caseA(int i, int j){ - if(a[i][j+k-i]==p[i][j+k-i]+a[i-1][j-1+k-(i-1)]){ return 1;} - else if(a[i][j+k-i]==p[i][j+k-i]+b[i-1][j-1+k-(i-1)]){return 2;} - else if(a[i][j+k-i]==p[i][j+k-i]+c[i-1][j-1+k-(i-1)]){return 3;} - else{return 'F';} - } - - int caseB(int i, int j){ - if(b[i][j+k-i]==a[i][j-1+k-i]-(h+g)){ return 1;} - else if(b[i][j+k-i]==b[i][j-1+k-i]-g){ return 2;} - else if(b[i][j+k-i]==c[i][j-1+k-i]-(h+g)){ return 3;} - else{return 'F';} - } - - int caseC(int i, int j){ - if(c[i][j+k-i]==a[i-1][j+k-(i-1)]-(h+g)){ return 1;} - else if(c[i][j+k-i]==b[i-1][j+k-(i-1)]-(h+g)){ return 2;} - else if(c[i][j+k-i]==c[i-1][j+k-(i-1)]-g){ return 3;} - else{return 'F';} - - } -} diff --git a/maven-src/target/classes/java/halign/kband/KbandAlignTwo.java b/maven-src/target/classes/java/halign/kband/KbandAlignTwo.java deleted file mode 100644 index d573704..0000000 --- a/maven-src/target/classes/java/halign/kband/KbandAlignTwo.java +++ /dev/null @@ -1,35 +0,0 @@ -package halign.kband; - -public class KbandAlignTwo { - private static int M=1, misM=-1, g=10, h=2, rate=2; - private static int maxk; - - public void align(String s, String t){ - int mn = Math.abs(s.length()-t.length()); - int k = rate*mn+1; - int pok, m=s.length(), n=t.length();//M为匹配积分,pok用于控制终止 - do{ - AffineGapPenalty aff = new AffineGapPenalty(m, n, g, h, k, mn, s, t, M, misM); - maxk = aff.Init(); //必须先行调用此方法初始化数组 - - //a[m,n]>=M*(n-k-1)-2*(k+1)*(h+g)控制终止 - //最坏情况估计至少k+1对空格,且不相邻 - - pok = M*(n-k-1)-2*(k+1)*(h+g); - if(maxk < pok) { - k=k*2; - } - else break; - }while(k<=pok); - - int ch = 1;//1.2.3对应a.b.c - if(maxk == AffineGapPenalty.a[m][n+k-m]){ch=1;} - else if(maxk == AffineGapPenalty.b[m][n+k-m]){ch=2;} - else {ch=3;}//(k==AffineGapPenalty.c[m][n+k-m]) - - KbandMake make = new KbandMake(g,h,m,n,k,mn,s,t,true); - make.run(ch); - } - - -} diff --git a/maven-src/target/classes/java/halign/kband/KbandMSA.java b/maven-src/target/classes/java/halign/kband/KbandMSA.java deleted file mode 100644 index 9a0ab01..0000000 --- a/maven-src/target/classes/java/halign/kband/KbandMSA.java +++ /dev/null @@ -1,128 +0,0 @@ -package halign.kband; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.NullWritable; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; -import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; -import utils.HDFSUtils; -import utils.IOUtils; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -public class KbandMSA { - - static List s_key = new ArrayList<>(); - static List s_val = new ArrayList<>(); - - public void start(String inputFile, String outputFile, String outputDFS) - throws IOException, ClassNotFoundException, InterruptedException { - if (outputDFS == null) { - IOUtils formatUtils = new IOUtils(); - formatUtils.readFasta(inputFile, true); - s_key = formatUtils.getS_key(); - s_val = formatUtils.getS_val(); - } else { - System.out.println(">>Clearing HDFS Path & uploading ..."); - HDFSUtils MSAFileUtils = new HDFSUtils(); - MSAFileUtils.clear_dfs_path(outputDFS); - MSAFileUtils.local_to_dfs(inputFile, outputDFS + "/input/input.txt"); - - System.out.println(">>Map reducing ..."); - Configuration conf = new Configuration(); - conf.set("mapred.task.timeout", "0"); - Job job = Job.getInstance(conf, "msa_kband"); - job.setJarByClass(KbandMSA.class); - job.setInputFormatClass(TextInputFormat.class); - job.setMapperClass(KbandMapper.class); - job.setMapOutputKeyClass(NullWritable.class); - job.setMapOutputValueClass(Text.class); - FileInputFormat.addInputPath(job, new Path(outputDFS + "/input/input.txt")); - FileOutputFormat.setOutputPath(job, new Path(outputDFS + "/output")); - job.setNumReduceTasks(1); - job.waitForCompletion(true); - } - - /*将第一个序列作为根,与其他每个序列进行双序列比对,保留第一个序列的比对结果s_out1*/ - ArrayList s_out1 = new ArrayList<>(); - ArrayList s_out2 = new ArrayList<>(); - String sequence1 = s_val.get(0); - int sequenceLen1 = sequence1.length(); - KbandAlignTwo kbandAlignTwo = new KbandAlignTwo(); - for (int i=1; i { - public void map(Object key, Text value, Context context) throws IOException, InterruptedException{ - if (value.charAt(0) == '>') { - s_key.add(value.toString()); - } else { - s_val.add(value.toString()); - } - context.write(NullWritable.get(), value); - } - } -} diff --git a/maven-src/target/classes/java/halign/kband/KbandMake.java b/maven-src/target/classes/java/halign/kband/KbandMake.java deleted file mode 100644 index f59f7b6..0000000 --- a/maven-src/target/classes/java/halign/kband/KbandMake.java +++ /dev/null @@ -1,100 +0,0 @@ -package halign.kband; - -public class KbandMake { - int len,h,g,m,n,mn,k; - int [][] a,b,c,p; - InitGapPenalty ca; - public static char [] aligns,alignt,alignsQ,aligntQ; - String s,t; - boolean flag; - - public KbandMake(int g, int h, int m, int n, int k, int mn, String S, String T, boolean flag) { - a=AffineGapPenalty.a; - b=AffineGapPenalty.b; - c=AffineGapPenalty.c; - p=AffineGapPenalty.p; - this.g=g; - this.h=h; - this.m=m; - this.n=n; - this.mn=mn; - this.k=k; - this.flag = flag; - s=S; - t=T; - int ff=Math.max(m,n)+2+2*(k+1); - alignsQ=new char[ff];//max(m.n)+2+2(k+1);m+n+2 - aligntQ=new char[ff]; - for(int i=0;i s_key = new ArrayList<>(); -// static List s_val = new ArrayList<>(); -// -// public void start(String inputFile, String outputFile, String outputDFS) -// throws IOException, ClassNotFoundException, InterruptedException { -// if (outputDFS == null) { -// IOUtils formatUtils = new IOUtils(); -// formatUtils.readFasta(inputFile, true); -// s_key = formatUtils.getS_key(); -// s_val = formatUtils.getS_val(); -// } else { -// System.out.println(">>Clearing HDFS Path & uploading ..."); -// HDFSUtils MSAFileUtils = new HDFSUtils(); -// MSAFileUtils.clear_dfs_path(outputDFS); -// MSAFileUtils.local_to_dfs(inputFile, outputDFS + "/input/input.txt"); -// -// System.out.println(">>Map reducing ..."); -// Configuration conf = new Configuration(); -// conf.set("mapred.task.timeout", "0"); -// Job job = Job.getInstance(conf, "msa_kband"); -// job.setJarByClass(OldKbandMSA.class); -// job.setInputFormatClass(TextInputFormat.class); -// job.setMapperClass(KbandMapper.class); -// job.setMapOutputKeyClass(NullWritable.class); -// job.setMapOutputValueClass(Text.class); -// FileInputFormat.addInputPath(job, new Path(outputDFS + "/input/input.txt")); -// FileOutputFormat.setOutputPath(job, new Path(outputDFS + "/output")); -// job.setNumReduceTasks(1); -// job.waitForCompletion(true); -// } -// -// /*将第一个序列作为根,与其他每个序列进行双序列比对,保留第一个序列的比对结果s_out1*/ -// ArrayList s_out1 = new ArrayList<>(); -// ArrayList s_out2 = new ArrayList<>(); -// String sequence1 = s_val.get(0); -// int sequenceLen1 = sequence1.length(); -// KbandAlignTwo kbandAlignTwo = new KbandAlignTwo(); -// for (int i=1; i { -// public void map(Object key, Text value, Context context) throws IOException, InterruptedException{ -// if (value.charAt(0) == '>') { -// s_key.add(value.toString()); -// } else { -// s_val.add(value.toString()); -// } -// context.write(NullWritable.get(), value); -// } -// } -//} diff --git a/maven-src/target/classes/java/halign/smithwaterman/LocalProteinMSA.java b/maven-src/target/classes/java/halign/smithwaterman/LocalProteinMSA.java deleted file mode 100644 index b8a55ba..0000000 --- a/maven-src/target/classes/java/halign/smithwaterman/LocalProteinMSA.java +++ /dev/null @@ -1,204 +0,0 @@ -package halign.smithwaterman; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.matrix.MatrixLoader; -import jaligner.matrix.MatrixLoaderException; -import jaligner.util.SequenceParser; -import jaligner.util.SequenceParserException; -import utils.IOUtils; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -/** - * Implementation of Protein Multiple Sequence Alignment based on Smith Waterman Algorithm. - * - * @author ShixiangWan - * */ -public class LocalProteinMSA { - - private static List s_out1 = new ArrayList<>(); - private static List s_out2 = new ArrayList<>(); - - /** - * Run smithwaterman multiple sequence alignment. - * - * @param inputFile input file "path+name", fasta format. - * @param outputFile output file "path+name", fasta format. - * */ - public void start(String inputFile, String outputFile) { - System.out.println("Loading data ... " + inputFile); - long startTime = System.currentTimeMillis(); - - IOUtils formatUtils = new IOUtils(); - formatUtils.readFasta(inputFile, false); - List s_key = formatUtils.getS_key(); - List s_val = formatUtils.getS_val(); - - //The first sequence is used as the centerstar sequence. - String sequence1 = s_val.get(0); - int sequenceLen1 = sequence1.length(); - int sequence1_id = 0; - - // The "sequence1" is used as the "root", which compared with other sequences. - // The first alignment is preserved as "s_out1". - int total_num = s_val.size(); - for (String ignored : s_val) { - s_out1.add(""); - s_out2.add(""); - } - System.out.println("MultiThread MSA ... "); - int taskSize = 16; - ExecutorService pool = Executors.newFixedThreadPool(taskSize); - for (int i = 0; i < total_num; i++) { - String line = s_val.get(i); - AlignThread alignThread = new AlignThread(i, sequence1, line); - pool.execute(new Thread(alignThread)); - } - pool.shutdown(); - while(!pool.isTerminated()); - System.out.println("Aligned, " + (System.currentTimeMillis() - startTime) + "ms"); - - // Statistic the alignments with centerstar sequence, and get the merge results: - // - centerSpaces: record the spaces in each alignment. - // - oneSpace[]: record the spaces in centerstar alignment. - int index; - int oneSpaceLen = sequenceLen1 + 1; - int oneSpace[] = new int[oneSpaceLen]; - int centerSpaces[][] = new int[total_num][oneSpaceLen]; - for (int i = 0; i < total_num; i++) { - String line = s_out1.get(i); - index = 0; - for (int j = 0; j < line.length(); j++) { - if (line.charAt(j) == '-') { - centerSpaces[i][index]++; - } else { - index++; - } - // bug fixed. - if (oneSpace[index] < centerSpaces[i][index]) { - oneSpace[index] = centerSpaces[i][index]; - } - } - } - - // Get the centerstar alignment "sequence1". - StringBuilder stringBuilder = new StringBuilder(); - for (int i = 0; i < oneSpaceLen; i++) { - for (int j = 0; j < oneSpace[i]; j++) stringBuilder.append('-'); - if (i != oneSpaceLen - 1) stringBuilder.append(sequence1.charAt(i)); - } - sequence1 = stringBuilder.toString(); - - // Merge array based on "centerSpace", "oneSpace" and "s_out2", - // and align all sequences. - System.out.println("Merging sequences ... "); - for (int i = 0; i < total_num; i++) { - String line = s_out2.get(i); - // Record the position of inserted spaces. - int position = 0; - for (int j = 0; j < oneSpaceLen; j++) { - int gap = oneSpace[j] - centerSpaces[i][j]; - // bug fixed. - //position += centerSpaces[i][j]; - if (gap > 0) { - if (position < line.length()) { - // Insert spaces. - line = line.substring(0, position).concat(insert(gap)).concat(line.substring(position)); - } else { - // For some special sequences out of limited length, which need to - // be cut off and broken off insertion. - if (line.length() > sequence1.length()) { - line = line.substring(0, sequence1.length()); - } - break; - } - } - position += gap + 1; - } - - // Some special sequences is not equal to others after inserting spaces, - // which need to add some extra spaces. - if (line.length() < sequence1.length()) { - line = line.concat(insert(sequence1.length() - line.length())); - } - s_out2.set(i, line); - } - - // delete inconsistent results. - List deleteIndex = new IOUtils().deleteSimilarityOutput(s_key, s_val, s_key, s_out2); - if (deleteIndex.size() > 0) - System.out.println("There are "+deleteIndex.size()+" low similarity sequences (deleted):"); - for (int deleted : deleteIndex) { - System.out.println("deleted sequences: "+s_key.get(deleted)); - s_key.set(deleted, ""); - } - - // Save alignment to hard disk. - try { - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); - for (int i = 0; i < s_key.size(); i++) { - if (s_key.get(i).equals("")) continue; - bufferedWriter.write(s_key.get(i)+ "\n"); - bufferedWriter.write(s_out2.get(i)+ "\n"); - } - bufferedWriter.close(); - } catch (IOException e) { - e.printStackTrace(); - } - //System.out.println("Saved, " + (System.currentTimeMillis() - startTime) + "ms"); - } - - - private class AlignThread implements Runnable { - private int id; - private String sequence1; - private String sequence2; - - AlignThread(int id, String sequence1, String sequence2) { - this.id = id; - this.sequence1 = sequence1; - this.sequence2 = sequence2; - } - - @Override - public void run() { - try { - Sequence s1 = SequenceParser.parse("A" + sequence1 + "A"); - Sequence s2 = SequenceParser.parse("A" + sequence2 + "A"); - Alignment align = SmithWatermanGotoh.align(s1, s2, MatrixLoader.load("BLOSUM80"), 0.0f, 0.0f); - String o1 = new String(align.getSequence1()); - String o2 = new String(align.getSequence2()); - o1 = o1.substring(1, o1.length()-1); - o2 = o2.substring(1, o2.length()-1); - s_out1.set(id, o1); - s_out2.set(id, o2); -// Sequence s1 = SequenceParser.parse(sequence1); -// Sequence s2 = SequenceParser.parse(sequence2); -// Alignment align = SmithWatermanGotoh.align(s1, s2, MatrixLoader.load("BLOSUM80"), 0f, 0.5f); -// sequence1 = new String(align.getSequence1()); -// sequence2 = new String(align.getSequence2()); -// s_out1.set(id, sequence1); -// s_out2.set(id, sequence2); - } catch (SequenceParserException | MatrixLoaderException e) { - e.printStackTrace(); - } - } - } - - - private String insert(int num) { - StringBuilder stringBuilder = new StringBuilder(); - for (int k = 0; k < num; k++) { - stringBuilder.append('-'); - } - return stringBuilder.toString(); - } -} diff --git a/maven-src/target/classes/java/halign/smithwaterman/SparkProteinMSA.java b/maven-src/target/classes/java/halign/smithwaterman/SparkProteinMSA.java deleted file mode 100644 index 4d73692..0000000 --- a/maven-src/target/classes/java/halign/smithwaterman/SparkProteinMSA.java +++ /dev/null @@ -1,153 +0,0 @@ -package halign.smithwaterman; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.matrix.MatrixLoader; -import jaligner.util.SequenceParser; -import org.apache.spark.api.java.JavaPairRDD; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; -import org.apache.spark.api.java.function.Function2; -import org.apache.spark.api.java.function.PairFunction; -import org.apache.spark.broadcast.Broadcast; -import scala.Tuple2; -import utils.IOUtils; - -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; -import java.util.List; - -/** - * Implementation of Protein Multiple Sequence Alignment based on Smith Waterman Algorithm & Spark API. - * - * @author ShixiangWan - * */ -public class SparkProteinMSA { - - /** - * Run multiple sequence alignment. - * - * @param jsc java spark context, which can be initialized by JavaSparkContext. - * @param inputFile input file "path+name", fasta format. - * @param outputFile output file "path+name", fasta format. - * */ - public void start(JavaSparkContext jsc, String inputFile, String outputFile) { - System.out.println("(Spark mode for Protein) Loading data ... " + inputFile); - - long startTime = System.currentTimeMillis(); - IOUtils formatUtils = new IOUtils(); - formatUtils.readFasta(inputFile, false); - List fastaKeyList = formatUtils.getS_key(); - List fastaValList = formatUtils.getS_val(); - final String firstVal = fastaValList.get(0); - JavaRDD fastaKeyJavaRDD = jsc.parallelize(fastaKeyList).cache(); - JavaPairRDD fastaDataJavaPairRDD = fastaKeyJavaRDD.zip(jsc.parallelize(fastaValList)); - - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - fastaKeyJavaRDD = fastaKeyJavaRDD.coalesce(2, true); - - /*generate map: out2 -> out1 */ - System.out.println("MultiThread MSA ... "); - int firstValLen1 = firstVal.length() + 1; - final Broadcast fastaFirstValBC = jsc.broadcast(firstVal); - /*key is not changed, but value is calculated as int[] contains spaces*/ - JavaPairRDD fastaMSADataJavaPairRDD = fastaDataJavaPairRDD.mapToPair( - (PairFunction, String, String>) stringTuple2 -> { - Sequence s1 = SequenceParser.parse("A" + fastaFirstValBC.getValue()+ "A"); - Sequence s2 = SequenceParser.parse("A" + stringTuple2._2+ "A"); - Alignment alignment = SmithWatermanGotoh.align(s1, s2, MatrixLoader.load("BLOSUM80"), 0f, 0f); - String o1 = new String(alignment.getSequence1()); - String o2 = new String(alignment.getSequence2()); - o1 = o1.substring(1, o1.length()-1); - o2 = o2.substring(1, o2.length()-1); - return new Tuple2<>(o2, o1); - }).mapValues( - (Function) stringTuple2 -> { - int index = 0; - int lineSpace[] = new int[firstValLen1]; - for (char c : stringTuple2.toCharArray()) { - if (c == '-') lineSpace[index]++; - else index++; - } - return lineSpace; - }); - fastaMSADataJavaPairRDD = fastaMSADataJavaPairRDD.coalesce(2, true); - int firstSpaceArray[] = fastaMSADataJavaPairRDD.values().reduce( - (Function2) (int1, int2) -> { - for (int i = 0; i < int2.length; i++) - if (int1[i] < int2[i]) int1[i] = int2[i]; - return int1; - }); - String firstVal0 = firstVal; - /*calculate the first sequence: firstVal0*/ - StringBuilder stringBuilder = new StringBuilder(); - for (int i = 0; i < firstValLen1; i++) { - for (int j = 0; j < firstSpaceArray[i]; j++) stringBuilder.append('-'); - if (i != firstValLen1 - 1) stringBuilder.append(firstVal0.charAt(i)); - } - /* bug fixed. - int lastNum = firstSpaceArray[firstSpaceArray.length - 1]; - for (int i = 0; i < lastNum; i++) - stringBuilder = stringBuilder.append('-');*/ - firstVal0 = stringBuilder.toString(); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - /*merge msa out*/ - System.out.println("Converting results ... "); - final String firstValFinal = firstVal0; - JavaRDD fastaMSAOutJavaRDD = fastaMSADataJavaPairRDD.map( - (Function, String>) stringTuple2 -> { - String line = stringTuple2._1; - int spaces[] = stringTuple2._2; - // record spaces' position. - int pos = 0; - for (int j = 0; j < firstValLen1; j++) { - int gap = firstSpaceArray[j] - spaces[j]; - // bug fixed. - //pos += spaces[j]; - if (gap > 0) { - if (pos < line.length()) { - /*normal*/ - StringBuilder sb = new StringBuilder(); - for (int k = 0; k < gap; k++) sb.append('-'); - line = line.substring(0, pos).concat(sb.toString()).concat(line.substring(pos)); - } else { - /*for some sequences, exceed out of array, we need to break it*/ - if (line.length() > firstValFinal.length()) { - line = line.substring(0, firstValFinal.length()); - } - break; - } - } - pos += gap + 1; - } - /*for some sequences which can not meet the same length as firstVal, we need add it*/ - if (line.length() < firstValFinal.length()) { - int gap = firstValFinal.length() - line.length(); - StringBuilder sb = new StringBuilder(); - for (int k = 0; k < gap; k++) sb.append('-'); - line = line.concat(sb.toString()); - } - return line; - }); - - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - System.out.println("Saving final results ... "); - List> outDataList = fastaKeyJavaRDD.zip(fastaMSAOutJavaRDD).collect(); - try { - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); - for (Tuple2 tuple2 : outDataList) { - bufferedWriter.write(tuple2._1.toString() + "\n"); - bufferedWriter.write(tuple2._2.toString() + "\n"); - } - bufferedWriter.close(); - } catch (IOException e) { - e.printStackTrace(); - } - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - } -} diff --git a/maven-src/target/classes/java/halign/suffixautomation/SparkSuffixAutomation.java b/maven-src/target/classes/java/halign/suffixautomation/SparkSuffixAutomation.java deleted file mode 100644 index 6d84f85..0000000 --- a/maven-src/target/classes/java/halign/suffixautomation/SparkSuffixAutomation.java +++ /dev/null @@ -1,120 +0,0 @@ -package halign.suffixautomation; - -import halign.suffixtree.DNAPairAlign; -import halign.suffixtree.GenAlignOut; -import org.apache.spark.api.java.JavaPairRDD; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; -import org.apache.spark.api.java.function.Function2; -import org.apache.spark.api.java.function.PairFunction; -import org.apache.spark.broadcast.Broadcast; -import scala.Tuple2; -import utils.IOUtils; -import utils.HDFSUtils; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.util.ArrayList; -import java.util.List; - -/** - * Spark下实现后缀自动机(Suffix Automation, SAM) - * */ -public class SparkSuffixAutomation { - - public void start(JavaSparkContext jsc, String inputKVFile, String outputfile) { - - System.out.println("(Spark mode for DNA) Loading data ... " + inputKVFile); - - long start = System.currentTimeMillis(); - IOUtils formatUtils = new IOUtils(); - formatUtils.readFasta(inputKVFile, true); - int allNum = formatUtils.getAllNum(); - int maxLength = formatUtils.getMaxLength(); - List fastaKeyList = formatUtils.getS_key(); - List fastaValList = formatUtils.getS_val(); - final String firstVal = fastaValList.get(0); - - System.out.println((System.currentTimeMillis() - start) + "ms"); - System.out.println("MultiThread MSA ... "); - - /*SuffixTree suffixTree = new SuffixTree(); - suffixTree.build(firstVal + "$");*/ - SuffixAutomaton suffixAutomaton = new SuffixAutomaton(maxLength).buildSuffixAutomaton(firstVal.toCharArray()); - List nameList = new ArrayList<>(); - for (int i = 0; i < allNum; i++) { - /*AlignSubstring alignSubstring = new AlignSubstring(suffixTree, fastaValList.get(i)); - nameList.add(alignSubstring.findCommonSubstrings());*/ - char[] lcs = suffixAutomaton.lcs(fastaValList.get(i).toCharArray()); - int lcs_pos_S = suffixAutomaton.indexOf(lcs); - int lcs_pos_T = new SuffixAutomaton(maxLength).buildSuffixAutomaton(fastaValList.get(i).toCharArray()).indexOf(lcs); - int[][] matched_info = {{lcs_pos_S}, {lcs_pos_T}, {lcs.length}}; - nameList.add(matched_info); - } - System.out.println((System.currentTimeMillis() - start) + "ms"); - - - JavaRDD fastaValRDD = jsc.parallelize(fastaValList).cache(); - final Broadcast firstValBC = jsc.broadcast(firstVal); - JavaPairRDD spacePairsRDD = fastaValRDD.zip(jsc.parallelize(nameList)).mapToPair( - (PairFunction, int[], int[]>) tuple2 -> { - DNAPairAlign pairAlign = new DNAPairAlign(firstValBC.value(), tuple2._1, tuple2._2, maxLength); - pairAlign.pwa(); - return new Tuple2(pairAlign.get_spaceevery(), pairAlign.get_spaceother()); - }).cache(); - - int firstSpaceArray[] = spacePairsRDD.keys().reduce( - (Function2) (int1, int2) -> { - for (int i = 0; i < int2.length; i++) - if (int1[i] < int2[i]) int1[i] = int2[i]; - return int1; - }); - StringBuilder stringBuilder = new StringBuilder(); - String firstVal0 = firstVal; - int firstValLen = firstVal0.length() + 1; - for (int i = 0; i < firstValLen; i++) { - for (int j = 0; j < firstSpaceArray[i]; j++) stringBuilder.append('-'); - if (i != firstValLen - 1) stringBuilder.append(firstVal0.charAt(i)); - } - /* bug fixed. - int lastNum = firstSpaceArray[firstSpaceArray.length - 1]; - for (int i = 0; i < lastNum; i++) - stringBuilder = stringBuilder.append('-');*/ - firstVal0 = stringBuilder.toString(); - System.out.println((System.currentTimeMillis() - start) + "ms"); - - System.out.println(">>Converting results ... "); - final Broadcast firstVal0BC = jsc.broadcast(firstVal0); - final Broadcast firstSpaceArrayBC = jsc.broadcast(firstSpaceArray); - JavaRDD fastaMSAOutJavaRDD = fastaValRDD.zip(spacePairsRDD).map( - (Function>, String>) t -> { - String pi1 = t._1().trim(); - int[] spaceEvery = t._2()._1(); - int[] spaceOther = t._2()._2(); - GenAlignOut genAlignOut = new GenAlignOut(); - return genAlignOut.get_every_sequeces(firstVal0BC.value().trim(), pi1, - allNum, firstVal, firstVal.length(), - firstSpaceArrayBC.value(), spaceEvery, spaceOther); - }); - - List fastaMSAOutList = fastaMSAOutJavaRDD.repartition(1).collect(); - System.out.println(">>" + (System.currentTimeMillis() - start) + "ms"); - - - System.out.println(">>Saving final results ... "); - new HDFSUtils().clear_local_path(new File(outputfile)); - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile)); - for (int i = 0; i < allNum; i++) { - bw.write(fastaKeyList.get(i) + "\n"); - bw.write(fastaMSAOutList.get(i) + "\n"); - } - bw.close(); - } catch (Exception ignored) { - - } - System.out.println(">>" + (System.currentTimeMillis() - start) + "ms"); - } -} diff --git a/maven-src/target/classes/java/halign/suffixautomation/SuffixAutomaton.java b/maven-src/target/classes/java/halign/suffixautomation/SuffixAutomaton.java deleted file mode 100644 index 7a4ec0e..0000000 --- a/maven-src/target/classes/java/halign/suffixautomation/SuffixAutomaton.java +++ /dev/null @@ -1,447 +0,0 @@ -package halign.suffixautomation; - -import java.util.Arrays; -import java.util.BitSet; - -/** - * Suffix Automaton - * @see "http://e-maxx.ru/algo/suffix_automata" - */ -public class SuffixAutomaton { - public int size; - public int[] len; // 最短路径长度 - public int[] link; // 故障链接 - public int[][] next; // 下链接 - public int[] original; // 复制原始情形 - - public SuffixAutomaton(int sz) { - size = sz; - len = new int[sz]; - link = new int[sz]; - next = new int[sz][]; - original = new int[sz]; - } - - public static int enc(char c) { return c - 'a'; } - public static char dec(int n) { return (char)('a'+n); } - - /** - * 创建后缀自动机,拓扑排序并返回。 - * 由于每次添加一个字符时只创建一个克隆,所以总共只有2个| a | -1个或更少的节点。 - * @param a - * @return - */ - public SuffixAutomaton buildSuffixAutomaton(char[] a) { - int n = a.length; - int[] len = new int[2*n]; - int[] link = new int[2*n]; - int[][] next = new int[2*n][26]; - int[] original = new int[2*n]; - Arrays.fill(link, -1); - for(int i = 0;i < 2*n;i++){ - Arrays.fill(next[i], -1); - } - Arrays.fill(original, -1); - - len[0] = 0; - link[0] = -1; - int last = 0; - int sz = 1; - - // extend - for(char c : a){ - int v = enc(c); - int cur = sz++; - len[cur] = len[last] + 1; - int p; - for(p = last; p != -1 && next[p][v] == -1; p = link[p]){ - next[p][v] = cur; - } - if(p == -1){ - link[cur] = 0; - }else{ - int q = next[p][v]; - if(len[p] + 1 == len[q]){ - link[cur] = q; - }else{ - int clone = sz++; - original[clone] = original[q] != -1 ? original[q] : q; - len[clone] = len[p]+1; - System.arraycopy(next[q], 0, next[clone], 0, next[q].length); - link[clone] = link[q]; - for(;p != -1 && next[p][v] == q; p = link[p]){ - next[p][v] = clone; - } - link[q] = link[cur] = clone; - } - } - last = cur; - } - - // topological sort - int[] nct = new int[sz]; - for(int i = 0;i < sz;i++){ - for(int e : next[i]){ - if(e != -1)nct[e]++; - } - } - int[] ord = new int[sz]; - int p = 1; - ord[0] = 0; - for(int r = 0;r < p;r++){ - for(int e : next[ord[r]]){ - if(e != -1 && --nct[e] == 0)ord[p++] = e; - } - } - int[] iord = new int[sz]; - for(int i = 0;i < sz;i++)iord[ord[i]] = i; - - SuffixAutomaton sa = new SuffixAutomaton(sz); - for(int i = 0;i < sz;i++){ - sa.len[i] = len[ord[i]]; - sa.link[i] = link[ord[i]] != -1 ? iord[link[ord[i]]] : -1; - sa.next[i] = next[ord[i]]; - for(int j = 0;j < sa.next[i].length;j++)sa.next[i][j] = sa.next[i][j] != -1 ? iord[sa.next[i][j]] : -1; - sa.original[i] = original[ord[i]] != -1 ? iord[original[ord[i]]] : -1; - } - - return sa; - } - - public String toString() - { - StringBuilder sb = new StringBuilder(); - for(int i = 0;i < size;i++){ - sb.append("{"); - sb.append(i).append("|"); - sb.append("len:").append(len[i]).append(", "); - sb.append("link:").append(link[i]).append(", "); - sb.append("original:").append(original[i]).append(", "); - sb.append("next:{"); - for(int j = 0;j < 26;j++){ - if(next[i][j] != -1){ - sb.append(dec(j)).append(":").append(next[i][j]).append(","); - } - } - sb.append("}}\n"); - } - return sb.toString(); - } - - /** - * @param str - * @return 1:sa包括str,-x:sa包括到第x个字符的str - */ - public int contains(char[] str) - { - int cur = 0; - for(int i = 0;i < str.length;i++){ - int nex = next[cur][enc(str[i])]; - if(nex == -1)return -i; - cur = nex; - } - return 1; - } - - /** - * 不同连续子串的数量 - * @return - */ - public long numberOfDistinctSubstrings() - { - long[] dp = new long[size]; - for(int i = size-1;i >= 0;i--){ - dp[i] = 1; - for(int e : next[i]){ - if(e != -1)dp[i] += dp[e]; - } - } - return dp[0]-1; // remove empty - } - - /** - * 不同连续子串的长度之和 - * @return - */ - public long totalLengthOfDistinctSubstrings() - { - long[] dp = new long[size]; - int[] count = new int[size]; - for(int i = size-1;i >= 0;i--){ - count[i] = 1; - dp[i] = 0; - for(int e : next[i]){ - if(e != -1){ - count[i] += count[e]; - dp[i] += dp[e] + count[e]; - } - } - } - return dp[0]; - } - - /** - * 以字典顺序返回K个连续较小的连续子字符串 - * @param K (1-indexed) - * @return - */ - public String kthDistinctSubstring(long K) - { - if(K <= 0)return null; - long[] dp = new long[size]; - for(int i = size-1;i >= 0;i--){ - dp[i] = 1; - for(int e : next[i]){ - if(e != -1)dp[i] += dp[e]; - } - } - if(K > dp[0]-1)return null; - - StringBuilder sb = new StringBuilder(); - int cur = 0; - K++; - while(true){ - if(K == 1)break; - K--; - for(int i = 0;i < next[cur].length;i++){ - int nex = next[cur][i]; - if(nex != -1){ - long nct = dp[nex]; - if(K <= nct){ - sb.append(dec(i)); - cur = nex; - break; - }else{ - K -= nct; - } - } - } - } - return sb.toString(); - } - - /** - * 返回具有最小字典顺序的移位字符串。 - * 使用最小| s |字符构造SA对s + s (贪心)。 - * @param s - * @return - */ - public char[] smallestCyclicShift(char[] s) - { - char[] ss = new char[s.length*2]; - System.arraycopy(s, 0, ss, 0, s.length); - System.arraycopy(s, 0, ss, s.length, s.length); - SuffixAutomaton sa = buildSuffixAutomaton(ss); - - int cur = 0; - char[] ret = new char[s.length]; - for(int i = 0;i < s.length;i++){ - for(int j = 0;j < sa.next[cur].length;j++){ - int nex = sa.next[cur][j]; - if(nex != -1){ - ret[i] = dec(j); - cur = nex; - break; - } - } - } - - return ret; - } - - /** - * 各nodeについて、initial->nodeの連続部分文字列が元の文字列に何回出現するかカウントした配列を返す。 - * cloneされていないノードに1をつけて、len降順に走査してlinkに加算していく。 - * 同じ文字が現れた時最初のcloneにlinkが集まる仕掛けになっている。あとはlen降順で走査すればオリジナル文字列上のカウントが集まってくる。 - * @return - */ - public int[] enumNumberOfOccurs() - { - int n = size; - int[] dp = new int[n]; - for(int i = n-1;i >= 1;i--){ - if(original[i] == -1)dp[i] += 1; - dp[link[i]] += dp[i]; - } - return dp; - } - - public int track(char[] str) - { - int cur = 0; - for(int i = 0;i < str.length;i++){ - int nex = next[cur][enc(str[i])]; - if(nex == -1)return -1; - cur = nex; - } - return cur; - } - - /** - * 匹配子串第一次出现的位置 - * 用于非克隆的Len-1和用于克隆的原始的len-1是子串的结束位置。 - * @param q - * @return - */ - public int indexOf(char[] q) - { - int cur = 0; - for(int i = 0;i < q.length;i++){ - int nex = next[cur][enc(q[i])]; - if(nex == -1)return -1; - cur = nex; - } - if(original[cur] != -1)cur = original[cur]; - return len[cur]-1 - q.length + 1; - } - - public int[][] ilinks() - { - int n = size; - int[] ip = new int[n]; - for(int i = 1;i < n;i++)ip[link[i]]++; - int[][] ret = new int[n][]; - for(int i = 0;i < n;i++)if(ip[i] > 0)ret[i] = new int[ip[i]]; - for(int i = 1;i < n;i++)ret[link[i]][--ip[link[i]]] = i; - return ret; - } - - /** - * 匹配子串出现的所有位置 - * 按照故障链接进行反向操作,并为非克隆命令创建一个命中。 - * @param q - * @param ilinks - * @return - */ - public BitSet indexOfAll(char[] q, int[][] ilinks) - { - BitSet ret = new BitSet(); - int cur = track(q); - if(cur == -1)return ret; - dfsIndexOfAll(cur, q.length, ilinks, ret); - return ret; - } - - public void dfsIndexOfAll(int cur, int qlen, int[][] ilinks, BitSet bs) - { - if(original[cur] == -1) bs.set(len[cur]-qlen); - if(ilinks[cur] != null)for(int e : ilinks[cur]) dfsIndexOfAll(e, qlen, ilinks, bs); - } - - /** - * 不显示的最小长度 - 按字典顺序返回最小的字符串。 - * @return - * NOT TESTED - */ - public char[] nonOccuringString() - { - int n = size; - int[] dp = new int[n]; - int[] prev = new int[n]; - Arrays.fill(prev, -1); - for(int i = n-1;i >= 0;i--){ - dp[i] = n+1; - for(int j = 0;j < next[i].length;j++){ - int e = next[i][j]; - int v = e != -1 ? dp[e] : 0; - if(v < dp[i]){ - dp[i] = v; - prev[i] = j; - } - } - dp[i] = prev[i] == -1 ? 0 : dp[i]+1; - } - - int cur = 0; - char[] ret = new char[dp[0]]; - for(int i = 0;i < dp[0];i++, cur = next[cur][prev[cur]]){ - ret[i] = dec(prev[cur]); - } - return ret; - } - - /** - * 在t中连续字符串中,获取在T中最小位置的一个。 - * saをtrieとみなし、Tで検索している感じ。 - * @param t - * @return - */ - public char[] lcs(char[] t) - { - if(t.length == 0)return new char[0]; - int v = 0, l = 0, best = 0, bestPos = 0; - for(int i = 0;i < t.length;i++){ - int e = enc(t[i]); - while(v != 0 && next[v][e] == -1){ - v = link[v]; - l = len[v]; - } - if(next[v][e] != -1){ - v = next[v][e]; - l++; - } - if(l > best){ - best = l; bestPos = i; - } - } - return Arrays.copyOfRange(t, bestPos-best+1, bestPos+1); - } - - /** - * 多字符串连续字符串LCS。 - * O(sum |S|*W) - * @param strs - * @return - * NOT TESTED - */ - public char[] lcs(char[][] strs) - { - int m = strs.length; - StringBuilder sb = new StringBuilder(); - char delim = (char)('z'-(m-1)); - for(char[] str : strs){ - sb.append(new String(str)).append(delim++); - } - SuffixAutomaton sa = buildSuffixAutomaton(sb.toString().toCharArray()); - - int n = sa.size; - int[] dp = new int[n]; - int besti = -1; - for(int i = n-1;i >= 0;i--){ - for(int j = 0;j < sa.next[i].length;j++){ - int nex = sa.next[i][j]; - if(nex != -1){ - if(j >= 25-(m-1) && j <= 25){ - // delim - dp[i] |= 1<= nex){ -// U.tr(i, nex); -// } - dp[i] |= dp[nex]; - } - } - } -// U.tr(i, dp[i]); - if(dp[i] == (1<= 0;j--){ - for(int k = 0;k < sa.next[j].length;k++){ - if(sa.next[j][k] == cur && sa.len[j] + 1 == sa.len[cur]){ - ret[pos--] = dec(k); - cur = j; - break; - } - } - } - return ret; - } -} diff --git a/maven-src/target/classes/java/halign/suffixtree/AlignSubstring.java b/maven-src/target/classes/java/halign/suffixtree/AlignSubstring.java deleted file mode 100644 index 0ae9376..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/AlignSubstring.java +++ /dev/null @@ -1,46 +0,0 @@ -package halign.suffixtree; - -import java.util.ArrayList; - -public class AlignSubstring { - SuffixTree suffixTree; - String sequence; - - public AlignSubstring(SuffixTree suffixTree, String sequence){ - this.suffixTree = suffixTree; - this.sequence = sequence; - } - - public int[][] findCommonSubstrings(){ - int index = 0; - //int totalMatch = 0; - ArrayList result = new ArrayList(); - while (index < sequence.length()){ - /*找到比对前缀*/ - int[] a = suffixTree.selectPrefixForAlignment(sequence, index); - if (a[1] > Math.abs(a[0] - index)) { - result.add(a[0]); - result.add(index); - result.add(a[1]); - index += a[1]; - //totalMatch += a[1]; - } else if (a[1] > 0) { - index += a[1]; - } else { - index ++; - } - } - // 数组的三个维度分别代表:匹配时S的位置、匹配时T的位置、匹配的长度 - int[][] tmp = new int[3][result.size() / 3]; - int k = 0; - while (k < result.size()) { - tmp[0][k / 3] = result.get(k); - k++; - tmp[1][k / 3] = result.get(k); - k++; - tmp[2][k / 3] = result.get(k); - k++; - } - return tmp; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/halign/suffixtree/DNAPairAlign.java b/maven-src/target/classes/java/halign/suffixtree/DNAPairAlign.java deleted file mode 100644 index b8760e6..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/DNAPairAlign.java +++ /dev/null @@ -1,155 +0,0 @@ -package halign.suffixtree; - -public class DNAPairAlign { - String center; - String si; - int[][] name; - /*spaceevery,spaceother拆开*/ - int[] Spaceevery; - int[] Spaceother; - //除中心序列以外的最大长度 - int Spaceother_len; - // ###########定义匹配,不匹配和空格的罚分############### - int spacescore = -1, matchscore = 0, mismatchscore = -1; - /*===========================================*/ - public String get_center(){ - return center; - } - public String get_si(){ - return si; - } - public int[][] get_name(){ - return name; - } - public int[] get_spaceevery(){ - return Spaceevery; - } - public int[] get_spaceother(){ - return Spaceother; - } - /*===========================================*/ - public DNAPairAlign(String center, String si, int[][] name, int Spaceother_len){ - this.center = center; - this.si = si; - this.name = name; - this.Spaceother_len = Spaceother_len; - this.Spaceevery = new int[center.length() + 1];// 存放中心序列分别与其他序列比对时增加的空格的位置 - this.Spaceother = new int[Spaceother_len + 1];// 存放其他序列与中心序列比对时增加的空格的位置 - } - - public void pwa() { - prealign(); - for (int j = 1; j < name[0].length; j++) { - midalign(j); - } - postalign(); - } - public void prealign() { - String strC = center.substring(0, name[0][0]); - String stri = si.substring(0, name[1][0]); - int M[][] = computeScoreMatrixForDynamicProgram(stri, strC);// 动态规划矩阵计算完毕 - traceBackForDynamicProgram(M, stri.length(), strC.length(), 0, 0);// 回溯,更改空格数组 - } - public void midalign(int j) { - int lamda = Math.max(name[1][j - 1] + name[2][j - 1] - name[1][j], - name[0][j - 1] + name[2][j - 1] - name[0][j]); - if (lamda > 0) { - name[0][j] += lamda; - name[1][j] += lamda; - name[2][j] -= lamda; - } - if (name[2][j] < 0 ){ - //System.out.println("此处有错误!!!!"); - name[1][j]=si.length(); - } - if (name[1][j]>si.length()){ - name[1][j]=si.length(); - } - String strC = center.substring(name[0][j - 1] + name[2][j - 1],name[0][j]);// 此处有漏洞,如果Name[centerstar][i][0][0]=0,会抱错 - String stri = si.substring(name[1][j - 1] + name[2][j - 1], name[1][j]); - int M[][] = computeScoreMatrixForDynamicProgram(stri, strC);// 动态规划矩阵计算完毕 - traceBackForDynamicProgram(M, stri.length(), strC.length(), - name[1][j - 1] + name[2][j - 1], - name[0][j - 1] + name[2][j - 1]); - } - - public void postalign() { - int j = name[0].length; - if (j > 0) { - int cstart = name[0][j - 1] + name[2][j - 1]; - if (cstart > center.length()) - cstart--;// 别忘了,建后缀树时加了个$ - int istart = name[1][j - 1] + name[2][j - 1]; - if (istart > si.length()) - istart--; - String strC = center.substring(cstart); - String stri = si.substring(name[1][j - 1] + name[2][j - 1]); - int M[][] = computeScoreMatrixForDynamicProgram(stri, strC);// 动态规划矩阵计算完毕 - traceBackForDynamicProgram(M, stri.length(), strC.length(), istart,cstart); - } else { - String strC = center; - String stri = si; - int M[][] = computeScoreMatrixForDynamicProgram(stri, strC);// 动态规划矩阵计算完毕 - traceBackForDynamicProgram(M, stri.length(), strC.length(), 0, 0); - } - } - /*功能:计算两序列比对过程中的得分矩阵 - * 输入:两个字符串 - * 输出:得分矩阵 - * */ - public int[][] computeScoreMatrixForDynamicProgram(String stri, String strC) { - int len1 = stri.length() + 1; - int len2 = strC.length() + 1; - int M[][] = new int[len1][len2]; // 定义动态规划矩阵 - // ---初始化动态规划矩阵----------- - int p, q; - for (p = 0; p < len1; p++) - M[p][0] = spacescore * p; - for (q = 0; q < len2; q++) - M[0][q] = spacescore * q; - // ---初始化结束---------- - // ----计算矩阵的值------------ - for (p = 1; p < len1; p++) - for (q = 1; q < len2; q++) {// M[p][q]=max(M[p-1][q]-1,M[p][q-1]-1,M[p-1][q-1]+h) - int h; - if (stri.charAt(p - 1) == strC.charAt(q - 1)) - h = matchscore; - else - h = mismatchscore; - M[p][q] = Math.max(M[p - 1][q - 1] + h, Math.max(M[p - 1][q] + spacescore, M[p][q - 1] + spacescore)); - } - return (M); - } - - /*函数功能:回溯得分矩阵并填写空格记录表 - * 输入:得分矩阵,两序列长度,两序列比对的开始位置 - * 输出:无输出,但填写了全局变量spaceevery,spaceother。 - * */ - public void traceBackForDynamicProgram(int[][] M, int p, int q, int k1, int k2) { - while (p > 0 && q > 0) { - if (M[p][q] == M[p][q - 1] + spacescore) { - Spaceother[p + k1]++; - //System.out.println(Spaceother[p+k1]); - q--; - } else if (M[p][q] == M[p - 1][q] + spacescore) { - Spaceevery[q + k2]++; - p--; - } else { - p--; - q--; - } - } - if (p == 0){ - while (q > 0) { - Spaceother[k1]++; - q--; - } - } - if (q == 0){ - while (p > 0) { - Spaceevery[k2]++; - p--; - } - } - } -} diff --git a/maven-src/target/classes/java/halign/suffixtree/ExtremeMSA.java b/maven-src/target/classes/java/halign/suffixtree/ExtremeMSA.java deleted file mode 100644 index a5b310e..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/ExtremeMSA.java +++ /dev/null @@ -1,413 +0,0 @@ -package halign.suffixtree; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.util.ArrayList; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.NullWritable; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; -import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; - -import utils.HDFSUtils; - -public class ExtremeMSA { - private String filePath = ""; // 文件名 - private static String[] sequence; // 序列 - private static String[] sequenceName; // 序列名 - private int[][] spaceCentre; // 中心序列增加空格的位置,最终被space数组取代 - private int[][] spaceOthers; // 其它序列增加空格的位置 - private int n; // 序列数 - private int c; // 中心序列编号 - private int spaceScore = -1; // 可以设置为final吗 - private int[][][][] name; - - public boolean start(String inputFile, String outputFile, String outputDFS) - throws IOException, ClassNotFoundException, InterruptedException { - filePath = inputFile; - n = count(); - if (n < 2) - return false; - if (outputDFS == null) - input(); - else { - sequence = new String[n]; - sequenceName = new String[n]; - System.out.println(">>Clearing HDFS Path & uploading ..."); - HDFSUtils MSAFileUtils = new HDFSUtils(); - MSAFileUtils.clear_dfs_path(outputDFS); - MSAFileUtils.local_to_dfs(inputFile, outputDFS + "/input/input.txt"); - - System.out.println(">>Map reducing ..."); - Configuration conf = new Configuration(); - conf.set("mapred.task.timeout", "0"); - Job job = Job.getInstance(conf, "msa_extreme"); - job.setJarByClass(ExtremeMSA.class); - job.setInputFormatClass(TextInputFormat.class); - job.setMapperClass(ExtremeMapper.class); - job.setMapOutputKeyClass(NullWritable.class); - job.setMapOutputValueClass(Text.class); - FileInputFormat.addInputPath(job, new Path(outputDFS + "/input/input.txt")); - FileOutputFormat.setOutputPath(job, new Path(outputDFS + "/output")); - job.setNumReduceTasks(1); - job.waitForCompletion(true); - } - c = centreAlignEachOne(); // 中心序列选择方法待改,注意在此之前centre都没有赋值 - deduplication(); - // 长度为n的字符串有n+1个位置可以插入空格 - spaceCentre = new int[n][sequence[c].length() + 1]; // 存放中心序列增加空格的位置 - spaceOthers = new int[n][computeMaxLength() + 1]; // 存放其它序列增加空格的位置 - for (int i = 0; i < n; ++i) - if (i != c) { - if (name[c][i][0].length > 0) - preAlign(i); - if (name[c][i][0].length > 1) - for (int j = 1; j < name[c][i][0].length; ++j) - midAlign(i, j); - postAlign(i); - } - output(combine(), outputFile); - return true; - } - - // 处理子串包含和重叠问题 - private void deduplication() { - for (int i = 0; i < n; i++) - if (i != c && name[c][i][0].length > 1) { - int len = name[c][i][0].length; - for (int j = 1; j < name[c][i][0].length; ++j) { - // 如果前一子串和当前子串首尾重叠,后移当前子串头指针,后移的距离为中心序列和外围序列中子串重叠字符数中的较大者 - // 如果任一序列中前一子串包含当前子串,则将当前子串长度置0 - // 如果非负,lambda是重叠字符数,没有+1, -1问题;如果非正,lambda是间隔段的长度 - int lambda = Math.max(name[c][i][1][j - 1] + name[c][i][2][j - 1] - name[c][i][1][j], - name[c][i][0][j - 1] + name[c][i][2][j - 1] - name[c][i][0][j]); // 从j = 1开始,不会越界 - if (lambda > 0) { - if (name[c][i][2][j] > lambda) { - name[c][i][0][j] += lambda; - name[c][i][1][j] += lambda; - name[c][i][2][j] -= lambda; - } else { - name[c][i][2][j] = 0; - --len; - } - } - } - int[][] tmp = new int[3][len]; - for (int j = 0, k = 0; j < len; ++j, ++k) { - while (name[c][i][2][k] == 0) - ++k; - for (int l = 0; l < 3; ++l) - tmp[l][j] = name[c][i][l][k]; - } - name[c][i] = tmp; - } - } - - // 比对其它序列与中心序列有重合的前端 - private void preAlign(int i) { - String strCentre = sequence[c].substring(0, name[c][i][0][0]); - String strOthers = sequence[i].substring(0, name[c][i][1][0]); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, 0, 0); - } - - // 比对其它序列与中心序列有重合的中间部分,j从1开始, - private void midAlign(int i, int j) { - String strCentre = sequence[c].substring(name[c][i][0][j - 1] + name[c][i][2][j - 1], name[c][i][0][j]); - String strOthers = sequence[i].substring(name[c][i][1][j - 1] + name[c][i][2][j - 1], name[c][i][1][j]); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, - name[c][i][1][j - 1] + name[c][i][2][j - 1], - name[c][i][0][j - 1] + name[c][i][2][j - 1]); - } - - // 比对其它序列与中心序列有重合的后端 - private void postAlign(int i) { - int tmp = name[c][i][0].length; - if (tmp > 0) { - int cStart = name[c][i][0][tmp - 1] + name[c][i][2][tmp - 1]; - if (cStart > sequence[c].length()) // 别忘了,建后缀树时在串尾增加了'$' - --cStart; - int iStart = name[c][i][1][tmp - 1] + name[c][i][2][tmp - 1]; - String strCentre = sequence[c].substring(cStart); - String strOthers = sequence[i].substring(iStart); - int[][] dp = scoreMatrix(strOthers, strCentre); - traceBack(dp, strOthers.length(), strCentre.length(), i, iStart, cStart); - } else { - String strCentre = sequence[c]; - String strOthers = sequence[i]; - int[][] M = scoreMatrix(strOthers, strCentre); - traceBack(M, strOthers.length(), strCentre.length(), i, 0, 0); - } - } - - // 返回序列数量 - private int count() { - int n = 0; - try { - BufferedReader br = new BufferedReader(new FileReader(filePath)); - String s; - while (br.ready()) { - s = br.readLine(); - if (s.length() > 0 && s.trim().charAt(0) == '>') // 有空行报错的bug找了两天,字符之前需要判断字符串长度 - ++n; - } - br.close(); - } catch (Exception ex) { - ex.getStackTrace(); - } - if (n == 0) { - System.out.println("no sequence found"); - System.out.println("no need to align"); - } else if (n == 1) { - System.out.println("only one sequence found"); - System.out.println("please try another file"); - } else - System.out.println(n + " sequences found"); - return n; - } - - // 将序列及对应序列名读入相应数组 - private void input() { - sequence = new String[n]; - sequenceName = new String[n]; - int i = -1; - try { - BufferedReader br = new BufferedReader(new FileReader(filePath)); - String line; - while (br.ready()) { - line = br.readLine(); - if (line.length() > 0 && line.charAt(0) == '>') { - sequenceName[++i] = line; - sequence[i] = ""; - break; - } - } - while (br.ready()) { - line = br.readLine(); - if (line.length() > 0 && line.charAt(0) == '>') { - sequenceName[++i] = line; - sequence[i] = ""; - } else - sequence[i] += format(line); - } - br.close(); - } catch (Exception ex) { - System.out.println(ex.getMessage()); - System.exit(0); - } - } - - // 格式化String,转为大写字母,保留A, G, C, T, N,替换U为T,忽略空格,其它字符为N - private String format(String s) { - s = s.toUpperCase(); - s = s.replaceAll("\\s*", ""); - s = s.replace('U', 'T'); - StringBuilder sb = new StringBuilder(s); - for (int i = 0; i < sb.length(); ++i) { - switch (sb.charAt(i)) { - case 'A': - case 'C': - case 'G': - case 'T': - case 'N': - break; - default: - sb.replace(i, i + 1, "n"); - } - } - return sb.toString(); - } - - // 总之,这个函数每一趟选出分别存在于中心序列和一个其它序列的符合某一条件的所有子串对 - // 暂时认为该函数和后缀树不存在bug - private int centreAlignEachOne() { - // name,四维分别表示:序列一;序列二;0为一号子串起始位置,1为二号子串起始位置,2为长度;子串对序号 - name = new int[1][n][3][]; // 暂时把n改为1,减少内存占用 - SuffixTree st = new SuffixTree(); - st.build(sequence[0] + "$"); // 末尾加'$'是为了不出现重复后缀,具体见后缀树 - for (int i = 0; i < n; ++i) { - if (i == 0) - continue; - int index = 0; - ArrayList result = new ArrayList<>(); - while (index < sequence[i].length()) { - // 在j序列中,将从index位置开始的序列段与中心序列进行匹配,返回中心序列中从a[0]开始的长度为a[1]的序列索引 - // 总之,a[0]为中心序列上子串的起始位置,a[1]为其长度 - int[] a = st.selectPrefixForAlignment(sequence[i], index); - // 子串长度大于等于起始位置差,且在外围序列中,当前子串起始位置必大于前一子串起始位置 - if (a[1] > Math.abs(a[0] - index)) { - result.add(a[0]); - result.add(index); - result.add(a[1]); - index += a[1]; - } else - index += a[1] > 0 ? a[1] : 1; // 可能是剪枝 - } - int[][] substrings = new int[3][result.size() / 3]; - for (int j = 0, tmp = 0; j < result.size(); ++tmp) - for (int k = 0; k < 3; ++k) - substrings[k][tmp] = result.get(j++); - name[0][i] = substrings; - } - return 0; - } - - // 动态规划矩阵 - private int[][] scoreMatrix(String strOthers, String strCentre) { - int matchScore = 0, mismatchScore = -1; - int len1 = strOthers.length() + 1, len2 = strCentre.length() + 1; - int[][] dp = new int[len1][len2]; // 定义动态规划矩阵 - // 初始化 - int p, q; - for (p = 0; p < len1; ++p) - dp[p][0] = spaceScore * p; - for (q = 1; q < len2; ++q) - dp[0][q] = spaceScore * q; - // 矩阵每一个元素依赖于其左上角元素及其对应字符是否相等,上边的元素和左边的元素 - // dp[p][q]=max(dp[p-1][q]-1,dp[p][q-1]-1,dp[p-1][q-1]+h) - for (p = 1; p < len1; ++p) - for (q = 1; q < len2; ++q) { - int h; - h = strOthers.charAt(p - 1) == strCentre.charAt(q - 1) ? matchScore : mismatchScore; - dp[p][q] = Math.max(dp[p - 1][q - 1] + h, Math.max(dp[p - 1][q] + spaceScore, dp[p][q - 1] + spaceScore)); - } - return dp; - } - - // 回溯。p, q为间隔字符串长度,k1, k2为字串起始位置 - private void traceBack(int[][] dp, int p, int q, int i, int k1, int k2) { - while (p > 0 && q > 0) - if (dp[p][q] == dp[p][q - 1] + spaceScore) { - // 可能来自上边就向上走 - ++spaceOthers[i][p + k1]; - --q; - } else if (dp[p][q] == dp[p - 1][q] + spaceScore) { - // 否则,可能来自左边就向左走 - ++spaceCentre[i][q + k2]; - --p; - } else { - // 否则,向左上走 - --p; - --q; - } - while (q > 0) { - ++spaceOthers[i][k1]; - --q; - } - while (p > 0) { - ++spaceCentre[i][k2]; - --p; - } - } - - private int[] combine() { - int[] space = new int[sequence[c].length() + 1];// 记录中心序列中空格的添加位置和数量 - int i, j, max; - for (i = 0; i < sequence[c].length() + 1; ++i) { - max = 0; - for (j = 0; j < n; ++j) - max = spaceCentre[j][i] > max ? spaceCentre[j][i] : max; - space[i] = max; - } - return space; - } - - // 计算除中心序列以外的其它序列的最大长度 - private int computeMaxLength() { - int maxLength = 0; - for (int i = 0; i < n; ++i) - if (i != c && sequence[i].length() > maxLength) - maxLength = sequence[i].length(); - return maxLength; - } - - private void output(int[] space, String outputFile) { - String[] output = new String[n]; - // 输出中心序列 - output[c] = ""; - for (int i = 0; i < sequence[c].length(); ++i) { - for (int j = 0; j < space[i]; ++j) - output[c] = output[c].concat("-"); - output[c] = output[c].concat(sequence[c].substring(i, i + 1)); - } - for (int j = 0; j < space[sequence[c].length()]; ++j) - output[c] = output[c].concat("-"); - // 输出其它序列 - for (int i = 0; i < n; ++i) - if (i != c) { - output[i] = ""; - for (int j = 0; j < sequence[i].length(); ++j) { - for (int k = 0; k < spaceOthers[i][j]; ++k) - output[i] = output[i].concat("-"); - output[i] = output[i].concat(sequence[i].substring(j, j + 1)); - } - for (int j = 0; j < spaceOthers[i][sequence[i].length()]; ++j) - output[i] = output[i].concat("-"); - // 计算差异数组 - int[] dis = new int[sequence[c].length() + 1]; - int position = 0; // 插入差异空格的位置 - for (int j = 0; j < sequence[c].length() + 1; ++j) { - int tmp1 = space[j] - spaceCentre[i][j]; - dis[j] = tmp1 > 0 ? tmp1 : 0; - position = position + spaceCentre[i][j]; - if (dis[j] > 0) { // 在位置position处插入空格 - String tmp2 = ""; - for (int k = 0; k < dis[j]; ++k) - tmp2 = tmp2.concat("-"); - output[i] = output[i].substring(0, position).concat(tmp2).concat(output[i].substring(position)); - } - position += dis[j] + 1; - } - } - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile)); - for (int i = 0; i < n; ++i) { - bw.write(sequenceName[i]); - bw.newLine(); - bw.flush(); - bw.write(output[i].toUpperCase()); - if (i != n - 1) - bw.newLine(); - bw.flush(); - } - bw.close(); - } catch (Exception ignored) { - } - } - - public static class ExtremeMapper extends Mapper { - int count = -1; - public void map(Object key, Text value, Context context) throws IOException, InterruptedException{ - if (value.charAt(0) == '>') { - count++; - sequenceName[count] = value.toString(); - } else { - sequence[count] = sequence[count] == null ? value.toString() : sequence[count] + value.toString(); - } - context.write(NullWritable.get(), value); - } - } - -// public static class ExtremeMapper extends Mapper { -// int count = 0; -// public void map(Object key, Text value, Context context) throws IOException, InterruptedException{ -// if (value.charAt(0) == '>') { -// Piname[count] = value.toString(); -// } else { -// System.out.println("value: "+value); -// Pi[count] = value.toString(); -// count++; -// } -// context.write(NullWritable.get(), value); -// } -// } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/halign/suffixtree/GenAlignOut.java b/maven-src/target/classes/java/halign/suffixtree/GenAlignOut.java deleted file mode 100644 index 4185cd3..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/GenAlignOut.java +++ /dev/null @@ -1,41 +0,0 @@ -package halign.suffixtree; - -public class GenAlignOut { - public String get_every_sequeces(String center_re,String pi,int n,String center,int center_len,int[] Space,int[] Spaceevery,int[]Spaceother){ - int j; - String tmp=""; - for (j = 0; j < pi.length(); j++) { - String kong = ""; - for (int k = 0; k < Spaceother[j]; k++) - kong = kong.concat("-"); - tmp=tmp.concat(kong).concat(pi.substring(j,j+1)); - } - String kong = ""; - int l; - if(pi.length()>(Spaceother.length-1)){ - l=Spaceother.length-1; - } - else{ - l=pi.length(); - } - for (j = 0; j < Spaceother[l]; j++) - kong = kong.concat("-"); - tmp=tmp.concat(kong); - int Cha[] = new int[center.length() + 1]; - int position = 0; // 用来记录插入差异空格的位置 - for (j = 0; j < center.length() + 1; j++) { - Cha[j] = 0; - if (Space[j] - Spaceevery[j] > 0) - Cha[j] = Space[j] - Spaceevery[j]; - position = position + Spaceevery[j]; - if (Cha[j] > 0) { // 在位置position处插入Cha[j]个空格 - kong = ""; - for (int k = 0; k < Cha[j]; k++) - kong = kong.concat("-"); - tmp=tmp.substring(0,position).concat(kong).concat(tmp.substring(position)); - } - position = position + Cha[j] + 1; - } - return tmp; - } -} diff --git a/maven-src/target/classes/java/halign/suffixtree/SparkDNAMSA.java b/maven-src/target/classes/java/halign/suffixtree/SparkDNAMSA.java deleted file mode 100644 index 723f728..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/SparkDNAMSA.java +++ /dev/null @@ -1,109 +0,0 @@ -package halign.suffixtree; - -import org.apache.spark.api.java.JavaPairRDD; -import org.apache.spark.api.java.JavaRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; -import org.apache.spark.api.java.function.Function2; -import org.apache.spark.api.java.function.PairFunction; -import org.apache.spark.broadcast.Broadcast; -import scala.Tuple2; -import utils.IOUtils; -import utils.HDFSUtils; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.util.ArrayList; -import java.util.List; - -public class SparkDNAMSA { - - public void start(JavaSparkContext jsc, String inputKVFile, String outputfile) { - - System.out.println("(Spark mode for DNA) Loading data ... " + inputKVFile); - - long start = System.currentTimeMillis(); - IOUtils formatUtils = new IOUtils(); - formatUtils.readFasta(inputKVFile, true); - int allNum = formatUtils.getAllNum(); - int maxLength = formatUtils.getMaxLength(); - List fastaKeyList = formatUtils.getS_key(); - List fastaValList = formatUtils.getS_val(); - final String firstVal = fastaValList.get(0); - - System.out.println((System.currentTimeMillis() - start) + "ms"); - System.out.println("MultiThread MSA ... "); - - SuffixTree suffixTree = new SuffixTree(); - suffixTree.build(firstVal + "$"); - List nameList = new ArrayList<>(); - for (int i = 0; i < allNum; i++) { - AlignSubstring alignSubstring = new AlignSubstring(suffixTree, fastaValList.get(i)); - nameList.add(alignSubstring.findCommonSubstrings()); - } - System.out.println((System.currentTimeMillis() - start) + "ms"); - - - JavaRDD fastaValRDD = jsc.parallelize(fastaValList).cache(); - final Broadcast firstValBC = jsc.broadcast(firstVal); - JavaPairRDD spacePairsRDD = fastaValRDD.zip(jsc.parallelize(nameList)).mapToPair( - (PairFunction, int[], int[]>) tuple2 -> { - DNAPairAlign pairAlign = new DNAPairAlign(firstValBC.value(), tuple2._1, tuple2._2, maxLength); - pairAlign.pwa(); - return new Tuple2(pairAlign.get_spaceevery(), pairAlign.get_spaceother()); - }).cache(); - - int firstSpaceArray[] = spacePairsRDD.keys().reduce( - (Function2) (int1, int2) -> { - for (int i = 0; i < int2.length; i++) - if (int1[i] < int2[i]) int1[i] = int2[i]; - return int1; - }); - StringBuilder stringBuilder = new StringBuilder(); - String firstVal0 = firstVal; - int firstValLen = firstVal0.length() + 1; - for (int i = 0; i < firstValLen; i++) { - for (int j = 0; j < firstSpaceArray[i]; j++) stringBuilder.append('-'); - if (i != firstValLen - 1) stringBuilder.append(firstVal0.charAt(i)); - } - /* bug fixed. - int lastNum = firstSpaceArray[firstSpaceArray.length - 1]; - for (int i = 0; i < lastNum; i++) - stringBuilder = stringBuilder.append('-');*/ - firstVal0 = stringBuilder.toString(); - System.out.println((System.currentTimeMillis() - start) + "ms"); - - System.out.println(">>Converting results ... "); - final Broadcast firstVal0BC = jsc.broadcast(firstVal0); - final Broadcast firstSpaceArrayBC = jsc.broadcast(firstSpaceArray); - JavaRDD fastaMSAOutJavaRDD = fastaValRDD.zip(spacePairsRDD).map( - (Function>, String>) t -> { - String pi1 = t._1().trim(); - int[] spaceEvery = t._2()._1(); - int[] spaceOther = t._2()._2(); - GenAlignOut genAlignOut = new GenAlignOut(); - return genAlignOut.get_every_sequeces(firstVal0BC.value().trim(), pi1, - allNum, firstVal, firstVal.length(), - firstSpaceArrayBC.value(), spaceEvery, spaceOther); - }); - - List fastaMSAOutList = fastaMSAOutJavaRDD.repartition(1).collect(); - System.out.println(">>" + (System.currentTimeMillis() - start) + "ms"); - - - System.out.println(">>Saving final results ... "); - new HDFSUtils().clear_local_path(new File(outputfile)); - try { - BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile)); - for (int i = 0; i < allNum; i++) { - bw.write(fastaKeyList.get(i) + "\n"); - bw.write(fastaMSAOutList.get(i) + "\n"); - } - bw.close(); - } catch (Exception ignored) { - - } - System.out.println(">>" + (System.currentTimeMillis() - start) + "ms"); - } -} diff --git a/maven-src/target/classes/java/halign/suffixtree/SuffixTree.java b/maven-src/target/classes/java/halign/suffixtree/SuffixTree.java deleted file mode 100644 index b3e5785..0000000 --- a/maven-src/target/classes/java/halign/suffixtree/SuffixTree.java +++ /dev/null @@ -1,764 +0,0 @@ -package halign.suffixtree; - -import java.util.*; - -/** - * Implementation of suffix tree with Ukkonen construction method.

- * - * From: http://www.oschina.net/translate/ukkonens-suffix-tree-algorithm-in-plain-english.
- * Edges are used to save char info in the paper, but we use nodes to save char info here. - * There is no difference. Meanwhile, the construction of tree is save in child nodes and - * brother nodes. Hence, if we want to traverse all child nodes of the node, we need to - * find its direct child nodes, then traverse their brother nodes to find all child nodes. - * - * @author ShixiangWan - */ -public class SuffixTree { - - // Root node. Root node does not have "chars", so we do "new char[0]". - private Node root = new Node(new char[0]); - - // Active point, as a triple: (active_node, active_edge, active_length), - // - active_node: active_node, as a node. - // - active_edge: active edge, but we use nodes to express edges. - // - active_length: active length. - private ActivePoint activePoint = new ActivePoint(root, null, 0); - - // Remainder, which expresses what numbers of suffixes needed to be inserted. - private int reminder = 0; - - private int minMatchLen = 15; - - /** - * Build suffix tree of a word. - * - * @param word word for building suffix tree. - */ - public void build(String word) { - int index = 0; - char[] chars = word.toCharArray(); - // create suffix circularly - while (index < chars.length) { - // record current position. Note: "int a=b++;" is equal to "int a=b;b++;", NOT "a=b+1"! - int currentIndex = index++; - // current suffix char - char w = chars[currentIndex]; - - // Find if the node who saves current suffix char exits? - if (find(w)) { - // Exits, do "reminder+1,activePoint.length+1" and "continue". - reminder++; - continue; - } - - // If no exits and "reminder==0", before the character is not left before the other - // inserted with the suffix characters, so insert the suffix characters directly. - if (reminder == 0) { - // Directly in the current active node can be inserted into a node - // Where the inserted node contains the character that is the last character of the - // string from the current character, here is an optimization, and optimization - // reference: http://blog.csdn.net/v_july_v/article/details/6897097 (3.6, induction, - // reflection, optimization) - Node node = new Node(Arrays.copyOfRange(chars, currentIndex, chars.length)); - node.label = currentIndex; - - // If there is no child node in the current activity point, the new node can be - // used as its child node, otherwise it will traverse the child node (save through - // the brother node). - Node child = activePoint.point.child; - if (null == child) { - activePoint.point.child = node; - } else { - while (null != child.brother) { - child = child.brother; - } - child.brother = node; - } - node.father=activePoint.point; - } else if(activePoint.index==null) { - // Just the former side of the reminder of those who, insert a new character, - // the direct establishment of a new side of the storage of the characters, and - // before the lack of supplement. - Node node = new Node(Arrays.copyOfRange(chars, currentIndex, chars.length)); - - node.label = currentIndex - reminder; - - // If there is no child node in the current activity point, the new node can be - // used as its child node, otherwise it will traverse the child node (save through - // the brother node). - Node child = activePoint.point.child; - if (null == child) { - activePoint.point.child = node; - } else { - while (null != child.brother) { - child = child.brother; - } - child.brother = node; - } - node.father = activePoint.point; - - // After division is completed, it is necessary to distinguish between rules 1 and 3. - // According to rule 1 for processing. - // The active node is the root node. - if (root == activePoint.point) { - // activePoint.point == root - // According to rule 3 for processing. - } - // No suffix node, the active node is root - else if (null == activePoint.point.suffixNode) { - activePoint.point = root; - } - // Otherwise the active node becomes the suffix node of the current active node - else { - activePoint.point = activePoint.point.suffixNode; - } - // Both the active and active edges are reset - activePoint.index = null; - activePoint.length = 0; - // Recursively handle the remaining suffixes to be inserted - innerSplit(chars, currentIndex, activePoint.point); - } - // This can not be reminder, but the distance between reminder active point to the root. - else if (reminder-getNodeString(activePoint.point).length() < activePoint.index.chars.length) { - // If "reminder>0",则说明该字符之前存在剩余字符,需要进行分割,然后插入新的后缀字符 - Node splitNode = activePoint.index;// 待分割的节点即为活动边(active_edge) - // 创建切分后的节点,放到当前节点的子节点 - // 该节点继承了当前节点的子节点以及后缀节点信息 - //新建一个node当作index的儿子,index变成内部节点 - Node node = new Node(Arrays.copyOfRange(splitNode.chars, activePoint.length, splitNode.chars.length));// 从活动边长度开始截取剩余字符作为子节点 - node.child = splitNode.child; - - Node child = splitNode.child; - while(null!=child){ - child.father=node; - child=child.brother; - } - - - node.suffixNode = splitNode.suffixNode; - splitNode.child = node; - node.father = splitNode; - splitNode.suffixNode = null; - //node.position = (ArrayList) splitNode.position.clone(); - if(splitNode.chars[splitNode.chars.length-1]=='$') - node.label=splitNode.label; - // 创建新插入的节点,放到当前节点的子节点(通过子节点的兄弟节点保存) - Node newNode = new Node(Arrays.copyOfRange(chars, currentIndex, chars.length));// 插入新的后缀字符 - splitNode.child.brother = newNode; - newNode.father=splitNode; - splitNode.chars = Arrays.copyOfRange(splitNode.chars, 0, activePoint.length);// 修改当前节点的字符 - //newNode.position.add(currenctIndex-reminder); - newNode.label = currentIndex-reminder; - - //Node fath = newNode.father; - /*************** - while(null!=fath && fath!=root){ - fath.position.add(currenctIndex-reminder); - fath = fath.father; - } - ****************/ - - // 分割完成之后需根据规则1和规则3进行区分对待 - // 按照规则1进行处理 - if (root == activePoint.point) {// 活动节点是根节点的情况 - // activePoint.point == root - // 按照规则3进行处理 - } else if (null == activePoint.point.suffixNode) {// 无后缀节点,则活动节点变为root - activePoint.point = root; - } else {// 否则活动节点变为当前活动节点的后缀节点 - activePoint.point = activePoint.point.suffixNode; - } - // 活动边和活动边长度都重置 - activePoint.index = null; - activePoint.length = 0; - // 递归处理剩余的待插入后缀 - innerSplit(chars, currentIndex, splitNode); - } - else if(reminder-getNodeString(activePoint.point).length()==activePoint.index.chars.length){ - //直接在活动边的结点上插入一个新的儿子,不用插入内部节点了 - Node node = new Node(Arrays.copyOfRange(chars, currentIndex, chars.length)); - //node.position.add(currenctIndex-reminder); - node.label = currentIndex-reminder; - - // 如果当前活动点无子节点,则将新建的节点作为其子节点即可,否则循环遍历子节点(通过兄弟节点进行保存) - Node child = activePoint.index.child; - if (null == child) { - activePoint.index.child = node; - } else { - while (null != child.brother) { - child = child.brother; - } - child.brother = node; - } - node.father = activePoint.index; - /*********** - Node fath = node.father; - while(null!=fath && fath!=root){ - fath.position.add(currenctIndex-reminder); - fath = fath.father; - } - ************/ - - Node ttmp=activePoint.index; - if (root == activePoint.point) {// 活动节点是根节点的情况 - // activePoint.point == root - // 按照规则3进行处理 - } else if (null == activePoint.point.suffixNode) {// 无后缀节点,则活动节点变为root - activePoint.point = root; - } else {// 否则活动节点变为当前活动节点的后缀节点 - activePoint.point = activePoint.point.suffixNode; - } - // 活动边和活动边长度都重置 - activePoint.index = null; - activePoint.length = 0; - // 递归处理剩余的待插入后缀 - innerSplit(chars, currentIndex, ttmp); - } - //*********** - if(index == chars.length&&reminder > 0){ - System.out.println("此处不应该出现!"); - index -= reminder; - reminder = 0; - activePoint.point = root; - activePoint.index = null; - activePoint.length = 0; - } - //*********** - } - - } - - /** - * 处理剩余的待插入后缀 - * @param chars 构建后缀树的全部字符 - * @param currenctIndex 当前已处理到的字符位置 - * @param prefixNode 前继节点,即已经进行分割的节点,用于标识后缀节点 - */ - private void innerSplit(char[] chars, int currenctIndex, Node prefixNode) { - // 此处计算剩余待插入的后缀的开始位置,例如我们需要插入三个后缀(abx,bx,x),已处理了abx,则还剩余bx和x,则下面计算的位置就是b的位置 - int start = currenctIndex - reminder + 1; - - //if(null!=root.child&&null!=root.child.suffixNode) - // System.out.println("活动后缀是"+root.child.suffixNode); - // System.out.println("当前插入后缀:" + String.copyValueOf(chars, start, currenctIndex - start + 1) + "========"); - // System.out.println("活动三元组"+activePoint.toString()); - // System.out.println("reminder:" + String.valueOf(reminder)); - // dealStart表示本次插入我们需要进行查找的开始字符位置,因为由于规则2,可能出现通过后缀节点直接找到活动节点的情况 - // 如通过ab节点的后缀节点,直接找到节点b,那么此时的activePoint(node[b], null, 0),我们需要从node[b]开始查找x,dealStart的位置就是x的位置 - - //这里错了,不应该是activePoint.point.chars.length,而是活动点到根的所有字符个数!!! - //int dealStart = start + activePoint.point.chars.length + activePoint.length; - //************后面要修改,每个节点到根的字符个数应该存储***** - int tmpp=0; - Node fathh= activePoint.point; - while(fathh!=root){ - tmpp+=fathh.chars.length; - fathh=fathh.father; - } - - int dealStart = start + tmpp + activePoint.length; - //********************************************************* - // 从dealStart开始查找所有后缀字符是否都存在(相对与活动点) - - - //System.out.println("注意了~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); - for (int index = dealStart; index <= currenctIndex; index++) { - char w = chars[index]; - // System.out.println(index); - // System.out.println(currenctIndex); - // System.out.print(w); - - if (find(w)) {// 存在,则查找下一个,activePoint.length+1,这里不增加reminder - // System.out.println("匹配上了"); - continue; - } - // System.out.println("没匹配上:index:"+index); - Node splitNode = null;// 被分割的节点 - - if(null==activePoint.index){// 如果activePoint.index==null,说明没有找到活动边,那么只需要在活动节点下插入一个节点即可 - splitNode=activePoint.point;//******我自己加的zouquan******* - - Node node = new Node(Arrays.copyOfRange(chars, index, chars.length)); - - //node.position.add(start); - node.label=start; - Node child = activePoint.point.child; - if(null==child){ - activePoint.point.child = node; - }else{ - while (null != child.brother) { - child = child.brother; - } - child.brother = node; - } - node.father = activePoint.point; - //修改活动点!! - //*******************************(我自己加的) - // 分割完成之后需根据规则1和规则3进行区分对待 - // 按照规则1进行处理 - if (root == activePoint.point) {// 活动节点是根节点的情况 - // activePoint.point == root - // 按照规则3进行处理 - } else if (null == activePoint.point.suffixNode) {// 无后缀节点,则活动节点变为root - activePoint.point = root; - } else {// 否则活动节点变为当前活动节点的后缀节点 - activePoint.point = activePoint.point.suffixNode; - } - // 活动边和活动边长度都重置 - activePoint.index = null; - activePoint.length = 0; - //******************************* - }else{ - - // 开始分割,分割部分同上面的分割 - splitNode = activePoint.index;//(活动边的儿子节点,不是父亲节点) - // 创建切分后的节点,放到当前节点的子节点 - // 该节点继承了当前节点的子节点以及后缀节点信息 - Node node = new Node(Arrays.copyOfRange(splitNode.chars, activePoint.length, splitNode.chars.length)); - node.child = splitNode.child; - - Node child = splitNode.child; - while(null!=child){ - child.father=node; - child=child.brother; - } - - node.suffixNode = splitNode.suffixNode; - splitNode.child = node; - node.father = splitNode; - splitNode.suffixNode = null; - //node.position = (ArrayList) splitNode.position.clone(); - if(splitNode.chars[splitNode.chars.length-1]=='$') - node.label=splitNode.label; - // 创建新插入的节点,放到当前节点的子节点(通过子节点的兄弟节点保存) - Node newNode = new Node(Arrays.copyOfRange(chars, index, chars.length)); - splitNode.child.brother = newNode; - newNode.father = splitNode; - // 修改当前节点的字符数 - splitNode.chars = Arrays.copyOfRange(splitNode.chars, 0, activePoint.length); - // 规则2,连接后缀节点 - - prefixNode.child.suffixNode = splitNode;//注意:前面原代码写的傻逼,明明应该新建一个splitNode,这样predixNode.suufixNode就应该是splitNode.可以作者傻逼,非要把原节点当成splitNode,新建一个节点node存放原来的节点(newNode是存放插入的新边的叶子),这样prefixNode就变成了splitNode! - - //****计算splitNode到root的边上的字符串长度 - int k=0; - Node tmp = splitNode; - while(tmp!=root){ - k+=tmp.chars.length; - tmp=tmp.father; - } - //*************************************** - //newNode.position.add(index-k); - newNode.label=index-k; - } - - reminder--; - - // 按照规则1进行处理 - if (root == activePoint.point) {// 活动节点是根节点的情况 - // activePoint.point == root - - // 按照规则3进行处理 - } else if (null == activePoint.point.suffixNode) {// 无后缀节点,则活动节点变为root - activePoint.point = root; - } else { - activePoint.point = activePoint.point.suffixNode; - } - - activePoint.index = null; - activePoint.length = 0; - if(reminder > 0){// 如果reminder==0则不需要继续递归插入后缀 - - innerSplit(chars, currenctIndex, splitNode); - } - } - - } - - /** - * 寻找当前活动点的子节点中是否存在包含后缀字符的节点(边) - * - * @param w - * @return - */ - private boolean find(char w) { - final Node start = activePoint.point; - final Node current = activePoint.index; - boolean exist = false; -// System.out.println("find开始"+activePoint.toString()); - if (null == current) {// current==null 无活动边,则从活动点的子节点开始查找 - // 寻找子节点 - Node child = start.child; - while (null != child) { - if (child.chars[0] == w) {// 存在 - exist = true; - if(child.chars.length>1){ - activePoint.index = child; - activePoint.length++;// activePoint.length++ - } - else if(child.chars.length==1){ //如果匹配边的字符串长度为1,活动点继续向下移动 - activePoint.point=child; - activePoint.index = null; - activePoint.length = 0; - } - break; - } else { - child = child.brother; - } - } - } - - else if (current.chars.length>activePoint.length&¤t.chars[activePoint.length] == w) {// 有活动边,则在活动边上查找 - activePoint.length++; - exist = true; - if (current.chars.length == activePoint.length) { - // 如果活动边的长度已达到活动边的最后一个字符,则将活动点置为活动边,同时活动边置为null,长度置为0 - activePoint.point = current; - activePoint.index = null; - activePoint.length = 0; - - } - - } - else { - exist = false; - } -// System.out.println("find结束"+activePoint.toString()); - return exist; - } - - /** - * 查找给定字符串是否是其子串 - * - * @param word - * @return - */ - public boolean select(String word) { - char[] chars = word.toCharArray(); - int index = 0;// 查找到的节点的匹配的位置 - // 查找从根节点开始,遍历子节点 - Node start = root; - for (int i = 0; i < chars.length; i++) { - if (start.chars.length < index + 1) {// 如果当前节点已匹配完,则从子节点开始,同时需重置index==0 - index = 0; - start = start.child; - while (null != start) { - // 比较当前节点指定位置(index)的字符是否与待查找字符一致 - // 由于是遍历子节点,所以如果不匹配换个子节点继续 - if (start.chars[index] == chars[i]) { - index++; - break; - } else { - start = start.brother; - } - } - if (null == start) {// 子节点遍历完都无匹配则返回false - return false; - } - } else if (start.chars[index] == chars[i]) { - // 如果当前查找到的节点的还有可比较字符,则进行比较,如果不同则直接返回false - index++; - } else { - return false; - } - } - return true; - } - /** - * 返回node节点的所有后代叶节点的label(position) - * @param node - * @return - */ - - public static ArrayList getNodeAllLeafSonLabel(Node node){ - ArrayList result = new ArrayList<>(); - - if(node.chars[node.chars.length-1]=='$'){ - result.add(node.label); - } - else{ - Node child = node.child; - while(null!=child){ - result.addAll(getNodeAllLeafSonLabel(child)); - child=child.brother; - } - } - return result; - } - - /** - * 查找给定字符串的最长前缀,并返回其alignment效果最好的起始位置和长度,返回(pos,len)对 - * wordstartpos是输入word在原始序列中开始的位置 - * - * @param word - * @return - */ - public int[] selectPrefixForAlignment(String word, int wordstartpos) { - int[] back = new int[2]; - back[0]=-1; - back[1]=0; - word=word.substring(wordstartpos); - - char[] chars = word.toCharArray(); - int index = 0;// 查找到的节点的匹配的位置 - // 查找从根节点开始,遍历子节点 - Node start = root; - - for (int i = 0; i < chars.length; i++) { - if (start.chars.length < index + 1) {// 如果当前节点已匹配完,则从子节点开始,同时需重置index==0 - index = 0; - start = start.child; - - while (null != start) { - // 比较当前节点指定位置(index)的字符是否与待查找字符一致 - // 由于是遍历子节点,所以如果不匹配换个子节点继续 - if (start.chars.length>index&&start.chars[index] == chars[i]) { - index++; - break; - } else if(null != start.brother){ - start = start.brother; - } - else if (null == start.brother&&i>=minMatchLen){ //断在一个结点,每一个儿子都没能继续匹配上 - - Integer[] startpos= (Integer[]) getNodeAllLeafSonLabel(start.father).toArray(new Integer[getNodeAllLeafSonLabel(start.father).size()]); - int mindis=Integer.MAX_VALUE; - int pos_j=-1; - - - for(int j=0;j=minMatchLen){ - //断在一条边的中间,或叶节点,因为叶节点是$,肯定不同,所以在这结束 - - Integer[] startpos= (Integer[]) getNodeAllLeafSonLabel(start).toArray(new Integer[getNodeAllLeafSonLabel(start).size()]); - int mindis=Integer.MAX_VALUE; - int pos_j=-1; - - for(int j=0;j - * 后缀树的节点,即边 - * 每个节点的chars是其父亲到该点的边的字符串,root节点没父亲,所以chars=“” - *

- */ - private class Node { - public char[] chars; - public Node child; - public Node brother; - public Node father; - public Node suffixNode; - //public ArrayList position; //用来记录内部节点所有后代的叶节点代表的后缀的起始位置,如果是叶节点就只有一个整数值,就是它代表的后缀的起始位置 - public int label;//记录叶节点代表的后缀的起始位置,内部结点可能也有值,要通过chars的最后是否是$来判断 - public Node(char[] chars) { - this.chars = chars; - //position = new ArrayList(); - } - - @Override - public String toString() { - //return "Node [chars=" + String.valueOf(chars) + "]"+"position:"+String.valueOf(position); - return "Node [chars=" + String.valueOf(chars) + "]"; - } - - public void print(String prefix) { - System.out.print(String.valueOf(chars)); - if(chars[chars.length-1]=='$'){ - System.out.print(label); - } - if (null != this.suffixNode) { - System.out.println("--" + String.valueOf(this.suffixNode.chars)); - } else { - System.out.println(); - } - Node child = this.child; - while (null != child) { - System.out.print(prefix + "|——"); - child.print(prefix + prefix); - child = child.brother; - } - } - } - - /** - *

- * 活动点(active point),一个三元组:(active_node,active_edge,active_length) - * 活动边的父亲是point,儿子是index;活动点应该是point,提取存储的字符串要从儿子index的chars中找(0,length) - *

- */ - private class ActivePoint { - public Node point; - public Node index; - public int length; - - public ActivePoint(Node point, Node index, int length) { - this.point = point; - this.index = index; - this.length = length; - } - - @Override - public String toString() { - return "ActivePoint [point=" + point + ", index=" + index + ", length=" + length + "]"; - } - } - /** - * 对String格式化,删除非法字符(只保留agctn,其余字符全部替换成n),全部转换成小写,u全部换成t - * @param s - * @return - */ - private static String format(String s){ - s=s.toLowerCase(); - s=s.replace('u', 't'); - StringBuffer sb = new StringBuffer(s); - - for(int i=0;i0){ - s=String.valueOf(start.chars)+s; - start=start.father; - } - s=String.valueOf(start.chars)+s; - return s; - } - - - public static void main(String[] args) { - - SuffixTree suffixTree = new SuffixTree(); - //String s1 ="ACACCGATGAGTCTGTCACGCGATAGCATGACGCTGCACCCTATGCTCGATAGCATTGCGAC"; - //String s1 ="ACACCGATGAGTCTGTCACGCGATAGCATGAC"; - //String s1 ="ACCACAACACCACAACACCACCACAACACCACCAACCACCT"; - String s1 ="ACTDGDG"; - //String s1="GGGAGCCATGCATT"; - s1 = format(s1)+"$"; - suffixTree.build(s1); - //suffixTree.print(); - - //System.out.println(String.valueOf(centerstar.root.child)); - - //System.out.println(String.valueOf(centerstar.root.child.chars)); - - /*Node start=centerstar.root.child.brother.child.child.child; - Integer[] startpos= (Integer[]) getNodeAllLeafSonLabel(start).toArray(new Integer[getNodeAllLeafSonLabel(start).size()]); - System.out.println(Arrays.toString(startpos)); - System.out.println(getNodeString(start));*/ - - //System.out.println(centerstar.select("CACAAC")); - String word = "AGTDGDG"; - word = word.toLowerCase(); - System.out.println(Arrays.toString(suffixTree.selectPrefixForAlignment(word, 0))); - - AlignSubstring alignSubstring = new AlignSubstring(suffixTree, word); - System.out.println(Arrays.toString(suffixTree.selectPrefixForAlignment(word, 0))); - int[][] findCommonSubstrings = alignSubstring.findCommonSubstrings(); - - System.out.println("OK!"); - } -} diff --git a/maven-src/target/classes/java/jaligner/Alignment.java b/maven-src/target/classes/java/jaligner/Alignment.java deleted file mode 100644 index 7592331..0000000 --- a/maven-src/target/classes/java/jaligner/Alignment.java +++ /dev/null @@ -1,442 +0,0 @@ -/* - * $Id: Alignment.java,v 1.19 2005/04/02 17:10:27 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -import jaligner.matrix.Matrix; -import jaligner.util.Commons; - -import java.text.DecimalFormat; - -/** - * Holds the output of a pairwise sequences alignment. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Alignment { - - /** - * Gap character - */ - public static final char GAP = '-'; - - /** - * Default name for sequence #1 - */ - private static final String DEFAULT_SEQUENCE1_NAME = "jaligner_1"; - - /** - * Default name for sequence #2 - */ - private static final String DEFAULT_SEQUENCE2_NAME = "jaligner_2"; - - /** - * Scoring matrix - */ - private Matrix matrix; - - /** - * Gap open cost - */ - private float open; - - /** - * Gap extend cost - */ - private float extend; - - /** - * Alignment score - */ - private float score; - - /** - * Aligned sequence #1 - */ - private char[] sequence1; - - /** - * Name of sequence #1 - */ - private String name1; - - /** - * Alignment start location in sequence #1 - */ - private int start1; - - /** - * Aligned sequence #2 - */ - private char[] sequence2; - - /** - * Name of sequence #2 - */ - private String name2; - - /** - * Alignment start location in sequence #2 - */ - private int start2; - - /** - * Markup line - */ - private char[] markupLine; - - /** - * Count of identical locations - */ - private int identity; - - /** - * Count of similar locations - */ - private int similarity; - - /** - * Count of gap locations - */ - private int gaps; - - /** - * Constructor for Alignment - */ - - public Alignment() { - super(); - } - - /** - * @return Returns the extend. - */ - public float getExtend() { - return extend; - } - - /** - * @param extend - * The extend to set. - */ - public void setExtend(float extend) { - this.extend = extend; - } - - /** - * @return Returns the matrix. - */ - public Matrix getMatrix() { - return matrix; - } - - /** - * @param matrix - * The matrix to set. - */ - public void setMatrix(Matrix matrix) { - this.matrix = matrix; - } - - /** - * @return Returns the name1. - */ - public String getName1() { - return name1 == null || name1.length() == 0 ? DEFAULT_SEQUENCE1_NAME - : name1; - } - - /** - * @param name1 - * The name1 to set. - */ - public void setName1(String name1) { - this.name1 = name1; - } - - /** - * @return Returns the name2. - */ - public String getName2() { - return name2 == null || name2.length() == 0 ? DEFAULT_SEQUENCE2_NAME - : name2; - } - - /** - * @param name2 - * The name2 to set. - */ - public void setName2(String name2) { - this.name2 = name2; - } - - /** - * @return Returns the open. - */ - public float getOpen() { - return open; - } - - /** - * @param open - * The open to set. - */ - public void setOpen(float open) { - this.open = open; - } - - /** - * @return Returns the score. - */ - public float getScore() { - return score; - } - - /** - * @param score - * The score to set. - */ - public void setScore(float score) { - this.score = score; - } - - /** - * @return Returns the sequence1. - */ - public char[] getSequence1() { - return sequence1; - } - - /** - * @param sequence1 - * The sequence1 to set. - */ - public void setSequence1(char[] sequence1) { - this.sequence1 = sequence1; - } - - /** - * @return Returns the sequence2. - */ - public char[] getSequence2() { - return sequence2; - } - - /** - * @param sequence2 - * The sequence2 to set. - */ - public void setSequence2(char[] sequence2) { - this.sequence2 = sequence2; - } - - /** - * @return Returns the start1. - */ - public int getStart1() { - return start1; - } - - /** - * @param start1 - * The start1 to set. - */ - public void setStart1(int start1) { - this.start1 = start1; - } - - /** - * @return Returns the start2. - */ - public int getStart2() { - return start2; - } - - /** - * @param start2 - * The start2 to set. - */ - public void setStart2(int start2) { - this.start2 = start2; - } - - /** - * @return Returns the gaps. - */ - public int getGaps() { - return gaps; - } - - /** - * @param gaps - * The gaps to set. - */ - public void setGaps(int gaps) { - this.gaps = gaps; - } - - /** - * @return Returns the identity. - */ - public int getIdentity() { - return identity; - } - - /** - * @param identity - * The identity to set. - */ - public void setIdentity(int identity) { - this.identity = identity; - } - - /** - * @return Returns the markupLine. - */ - public char[] getMarkupLine() { - return markupLine; - } - - /** - * @param markupLine - * The markupLine to set. - */ - public void setMarkupLine(char[] markupLine) { - this.markupLine = markupLine; - } - - /** - * @return Returns the similarity. - */ - public int getSimilarity() { - return similarity; - } - - /** - * @param similarity - * The similarity to set. - */ - public void setSimilarity(int similarity) { - this.similarity = similarity; - } - - /** - * Returns a summary for alignment - * - * @return alignment summary - */ - public String getSummary() { - StringBuffer buffer = new StringBuffer(); - DecimalFormat f1 = new DecimalFormat("0.00"); - DecimalFormat f2 = new DecimalFormat("0.00%"); - - int length = getSequence1().length; - - buffer.append("Sequence #1: " + getName1()); - buffer.append(Commons.getLineSeparator()); - buffer.append("Sequence #2: " + getName2()); - buffer.append(Commons.getLineSeparator()); - buffer.append("Length #1: " + sequence1.length); - buffer.append(Commons.getLineSeparator()); - buffer.append("Length #2: " + sequence2.length); - buffer.append(Commons.getLineSeparator()); - buffer.append("Matrix: " - + (matrix.getId() == null ? "" : matrix.getId())); - buffer.append(Commons.getLineSeparator()); - buffer.append("Gap open: " + open); - buffer.append(Commons.getLineSeparator()); - buffer.append("Gap extend: " + extend); - buffer.append(Commons.getLineSeparator()); - buffer.append("Length: " + length); - buffer.append(Commons.getLineSeparator()); - buffer.append("Identity: " + identity + "/" + length + " (" - + f2.format(identity / (float) length) + ")"); - buffer.append(Commons.getLineSeparator()); - buffer.append("Similarity: " + similarity + "/" + length + " (" - + f2.format(similarity / (float) length) + ")"); - buffer.append(Commons.getLineSeparator()); - buffer.append("Gaps: " + gaps + "/" + length + " (" - + f2.format(gaps / (float) length) + ")"); - buffer.append(Commons.getLineSeparator()); - buffer.append("Score: " + f1.format(score)); - buffer.append(Commons.getLineSeparator()); - - return buffer.toString(); - } - - /** - * Calculate the score of the alignment, not using the score field (the - * function only uses sequence1, sequence2, matrix and gap penalties). (By: - * Bram Minnaert) - * - * @return the calculated score - */ - public float calculateScore() { - float calcScore = 0; // the calculated score - boolean previous1wasGap = false; // in the previous step there was a gap - // in the first sequence - boolean previous2wasGap = false; // in the previous step there was a gap - // in the second sequence - char c1, c2; // the next character - for (int i = 0, n = sequence1.length; i < n; i++) { - c1 = sequence1[i]; - c2 = sequence2[i]; - // the next character in the first sequence is a gap - if (c1 == GAP) { - if (previous1wasGap) { - calcScore -= extend; - } else { - calcScore -= open; - } - previous1wasGap = true; - previous2wasGap = false; - } - // the next character in the second sequence is a gap - else if (c2 == GAP) { - if (previous2wasGap) { - calcScore -= extend; - } else { - calcScore -= open; - } - previous1wasGap = false; - previous2wasGap = true; - } - // the next characters in boths sequences are not gaps - else { - calcScore += matrix.getScore(c1, c2); - previous1wasGap = false; - previous2wasGap = false; - } - } - return calcScore; - } - - /** - * Check if the calculated score matches the field score. - * - * @return true if equal, else false. (By: Bram Minnaert) - */ - public boolean checkScore() { - if (calculateScore() == score) { - return true; - } else { - return false; - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/Cell.java b/maven-src/target/classes/java/jaligner/Cell.java deleted file mode 100644 index e452403..0000000 --- a/maven-src/target/classes/java/jaligner/Cell.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * $Id: Cell.java,v 1.5 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -/** - * A cell in a similarity matrix, to hold row, column and score. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Cell { - /** - * Row of the cell - */ - private int row; - /** - * Column of the cell - */ - private int col; - /** - * Alignment score at this cell - */ - private float score; - - /** - * Constructor - */ - public Cell() { - super(); - this.row = 0; - this.col = 0; - this.score = Float.NEGATIVE_INFINITY; - } - /** - * @return Returns the col. - */ - public int getCol() { - return this.col; - } - /** - * @param col The col to set. - */ - public void setCol(int col) { - this.col = col; - } - /** - * @return Returns the row. - */ - public int getRow() { - return this.row; - } - /** - * @param row The row to set. - */ - public void setRow(int row) { - this.row = row; - } - /** - * @return Returns the score. - */ - public float getScore() { - return this.score; - } - /** - * @param score The score to set. - */ - public void setScore(float score) { - this.score = score; - } - - /** - * Sets the row, column and score of the cell. - * @param row The row to set. - * @param col The col to set. - * @param score The score to set. - */ - public void set(int row, int col, float score) { - this.row = row; - this.col = col; - this.score = score; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/Directions.java b/maven-src/target/classes/java/jaligner/Directions.java deleted file mode 100644 index f876864..0000000 --- a/maven-src/target/classes/java/jaligner/Directions.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: Directions.java,v 1.10 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -/** - * Traceback directions. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class Directions { - /** - * Traceback direction stop - */ - public static final byte STOP = 0; - /** - * Traceback direction left - */ - public static final byte LEFT = 1; - /** - * Traceback direction diagonal - */ - public static final byte DIAGONAL = 2; - /** - * Traceback direction up - */ - public static final byte UP = 3; -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/Markups.java b/maven-src/target/classes/java/jaligner/Markups.java deleted file mode 100644 index 4b3b342..0000000 --- a/maven-src/target/classes/java/jaligner/Markups.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: Markups.java,v 1.2 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -/** - * Markups line characters. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class Markups { - /** - * Markup line identity character - */ - public static final char IDENTITY = '|'; - - /** - * Markup line similarity character - */ - public static final char SIMILARITY = ':'; - - /** - * Markup line gap character - */ - public static final char GAP = ' '; - - /** - * Markup line mismatch character - */ - public static final char MISMATCH = '.'; -} diff --git a/maven-src/target/classes/java/jaligner/Sequence.java b/maven-src/target/classes/java/jaligner/Sequence.java deleted file mode 100644 index c01498a..0000000 --- a/maven-src/target/classes/java/jaligner/Sequence.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * $Id: Sequence.java,v 1.12 2005/04/14 14:44:45 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -import java.io.Serializable; - -/** - * A basic (nucleic or smithwaterman) sequence. It's a wrapper to {@link String}. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Sequence implements Serializable { - /** - * - */ - private static final long serialVersionUID = 3256721801357898297L; - - /** - * Sequence type nucleic. - */ - public static final int NUCLEIC = 0; - - /** - * Sequence type smithwaterman. - */ - public static final int PROTEIN = 1; - - /** - * Sequence - */ - private String sequence; - - /** - * Sequence id. - */ - private String id = null; - - /** - * Sequence description. - */ - private String description = null; - - /** - * Sequence type. - */ - private int type = PROTEIN; - - /** - * Constructor - */ - public Sequence( ) { - super(); - } - - /** - * Constructor - * @param sequence - */ - public Sequence(String sequence) { - super(); - this.sequence = sequence; - } - - - /** - * Constructor - * @param sequence - * @param id - * @param description - * @param type - */ - public Sequence(String sequence, String id, String description, int type) { - super(); - this.sequence = sequence; - this.id = id; - this.description = description; - this.type = type; - } - - /** - * Returns the sequence string - * @return Returns the sequence - */ - public String getSequence() { - return sequence; - } - - /** - * Sets the sequence string - * @param sequence The sequence to set - */ - public void setSequence(String sequence) { - this.sequence = sequence; - } - - /** - * Returns the sequence id - * @return Returns the id - */ - public String getId() { - return id; - } - - /** - * Sets the sequence id - * @param id The id to set - */ - public void setId(String id) { - this.id = id; - } - - /** - * Returns the sequence description - * @return Returns the description - */ - public String getDescription() { - return description; - } - - /** - * Sets the sequence description - * @param description The description to set - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Returns the sequence type (nucleic or smithwaterman) - * @return Returns the type - */ - public int getType() { - return type; - } - - /** - * Sets the sequence type (nucleic or smithwaterman) - * @param type The type to set - */ - public void setType(int type) { - this.type = type; - } - - /** - * Returns the length of the sequence - * @return sequence length - */ - public int length( ) { - return this.sequence.length(); - } - - /** - * Returns a subsequence - * @param index start index - * @param length length of subsequence - * @return subsequence - */ - public String subsequence(int index, int length) { - return this.sequence.substring(index, index + length); - } - - /** - * Returns the acid at specific location in the sequence - * @param index - * @return acid at index - */ - public char acidAt(int index) { - return this.sequence.charAt(index); - } - - /** - * Returns the sequence as an array of characters. - * @return array of chars. - */ - public char[] toArray( ) { - return this.sequence.toCharArray(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/SmithWatermanGotoh.java b/maven-src/target/classes/java/jaligner/SmithWatermanGotoh.java deleted file mode 100644 index 9728bbd..0000000 --- a/maven-src/target/classes/java/jaligner/SmithWatermanGotoh.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * $Id: SmithWatermanGotoh.java,v 1.18 2005/04/03 19:38:21 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner; - -import jaligner.matrix.Matrix; - -import java.util.logging.Logger; - -/** - * An implementation of the Smith-Waterman algorithm with Gotoh's improvement - * for biological local pairwise sequence alignment. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class SmithWatermanGotoh { - /** - * Hidden constructor - */ - private SmithWatermanGotoh() { - super(); - } - - /** - * Logger - */ - private static final Logger logger = Logger - .getLogger(SmithWatermanGotoh.class.getName()); - - /** - * Aligns two sequences by Smith-Waterman algorithm - * - * @param s1 - * sequene #1 ({@link Sequence}) - * @param s2 - * sequene #2 ({@link Sequence}) - * @param matrix - * scoring matrix ({@link Matrix}) - * @param o - * open gap penalty - * @param e - * extend gap penalty - * @return alignment object contains the two aligned sequences, the - * alignment score and alignment statistics - * @see Sequence - * @see Matrix - */ - public static Alignment align(Sequence s1, Sequence s2, Matrix matrix, - float o, float e) { - //logger.info("Started..."); - long start = System.currentTimeMillis(); - float[][] scores = matrix.getScores(); - - SmithWatermanGotoh sw = new SmithWatermanGotoh(); - - int m = s1.length() + 1; - int n = s2.length() + 1; - - byte[] pointers = new byte[m * n]; - - // Initializes the boundaries of the traceback matrix to STOP. - for (int i = 0, k = 0; i < m; i++, k += n) { - pointers[k] = Directions.STOP; - } - for (int j = 1; j < n; j++) { - pointers[j] = Directions.STOP; - } - - short[] sizesOfVerticalGaps = new short[m * n]; - short[] sizesOfHorizontalGaps = new short[m * n]; - for (int i = 0, k = 0; i < m; i++, k += n) { - for (int j = 0; j < n; j++) { - sizesOfVerticalGaps[k + j] = sizesOfHorizontalGaps[k + j] = 1; - } - } - - Cell cell = sw.construct(s1, s2, scores, o, e, pointers, - sizesOfVerticalGaps, sizesOfHorizontalGaps); - Alignment alignment = sw.traceback(s1, s2, matrix, pointers, cell, - sizesOfVerticalGaps, sizesOfHorizontalGaps); - alignment.setName1(s1.getId()); - alignment.setName2(s2.getId()); - alignment.setMatrix(matrix); - alignment.setOpen(o); - alignment.setExtend(e); - //logger.info("Finished in " + (System.currentTimeMillis() - start) - // + " milliseconds"); - return alignment; - } - - /** - * Constructs directions matrix for the traceback - * - * @param s1 - * sequence #1 - * @param s2 - * sequence #2 - * @param matrix - * scoring matrix - * @param o - * open gap penalty - * @param e - * extend gap penalty - * @return The cell where the traceback starts. - */ - private Cell construct(Sequence s1, Sequence s2, float[][] matrix, float o, - float e, byte[] pointers, short[] sizesOfVerticalGaps, - short[] sizesOfHorizontalGaps) { - //logger.info("Started..."); - long start = System.currentTimeMillis(); - - char[] a1 = s1.toArray(); - char[] a2 = s2.toArray(); - - int m = s1.length() + 1; - int n = s2.length() + 1; - - float f; // score of alignment x1...xi to y1...yi if xi aligns to yi - float[] g = new float[n]; // score if xi aligns to a gap after yi - float h; // score if yi aligns to a gap after xi - float[] v = new float[n]; // best score of alignment x1...xi to y1...yi - float vDiagonal; - - g[0] = Float.NEGATIVE_INFINITY; - h = Float.NEGATIVE_INFINITY; - v[0] = 0; - - for (int j = 1; j < n; j++) { - g[j] = Float.NEGATIVE_INFINITY; - v[j] = 0; - } - - float similarityScore, g1, g2, h1, h2; - - Cell cell = new Cell(); - - for (int i = 1, k = n; i < m; i++, k += n) { - h = Float.NEGATIVE_INFINITY; - vDiagonal = v[0]; - for (int j = 1, l = k + 1; j < n; j++, l++) { - similarityScore = matrix[a1[i - 1]][a2[j - 1]]; - - // Fill the matrices - f = vDiagonal + similarityScore; - - g1 = g[j] - e; - g2 = v[j] - o; - if (g1 > g2) { - g[j] = g1; - sizesOfVerticalGaps[l] = (short) (sizesOfVerticalGaps[l - n] + 1); - } else { - g[j] = g2; - } - - h1 = h - e; - h2 = v[j - 1] - o; - if (h1 > h2) { - h = h1; - sizesOfHorizontalGaps[l] = (short) (sizesOfHorizontalGaps[l - 1] + 1); - } else { - h = h2; - } - - vDiagonal = v[j]; - v[j] = maximum(f, g[j], h, 0); - - // Determine the traceback direction - if (v[j] == 0) { - pointers[l] = Directions.STOP; - } else if (v[j] == f) { - pointers[l] = Directions.DIAGONAL; - } else if (v[j] == g[j]) { - pointers[l] = Directions.UP; - } else { - pointers[l] = Directions.LEFT; - } - - // Set the traceback start at the current cell i, j and score - if (v[j] > cell.getScore()) { - cell.set(i, j, v[j]); - } - } - } - /*logger.info("Finished in " + (System.currentTimeMillis() - start) - + " milliseconds");*/ - return cell; - } - - /** - * Returns the alignment of two sequences based on the passed array of - * pointers - * - * @param s1 - * sequence #1 - * @param s2 - * sequence #2 - * @param m - * scoring matrix - * @param cell - * The cell where the traceback starts. - * @return {@link Alignment}with the two aligned sequences and alignment - * score. - * @see Cell - * @see Alignment - */ - private Alignment traceback(Sequence s1, Sequence s2, Matrix m, - byte[] pointers, Cell cell, short[] sizesOfVerticalGaps, - short[] sizesOfHorizontalGaps) { - //logger.info("Started..."); - long start = System.currentTimeMillis(); - - char[] a1 = s1.toArray(); - char[] a2 = s2.toArray(); - - float[][] scores = m.getScores(); - - int n = s2.length() + 1; - - Alignment alignment = new Alignment(); - alignment.setScore(cell.getScore()); - - int maxlen = s1.length() + s2.length(); // maximum length after the - // aligned sequences - - char[] reversed1 = new char[maxlen]; // reversed sequence #1 - char[] reversed2 = new char[maxlen]; // reversed sequence #2 - char[] reversed3 = new char[maxlen]; // reversed markup - - int len1 = 0; // length of sequence #1 after alignment - int len2 = 0; // length of sequence #2 after alignment - int len3 = 0; // length of the markup line - - int identity = 0; // count of identitcal pairs - int similarity = 0; // count of similar pairs - int gaps = 0; // count of gaps - - char c1, c2; - - int i = cell.getRow(); // traceback start row - int j = cell.getCol(); // traceback start col - int k = i * n; - - boolean stillGoing = true; // traceback flag: true -> continue & false - // -> stop - - while (stillGoing) { - switch (pointers[k + j]) { - case Directions.UP: - for (int l = 0, len = sizesOfVerticalGaps[k + j]; l < len; l++) { - reversed1[len1++] = a1[--i]; - reversed2[len2++] = Alignment.GAP; - reversed3[len3++] = Markups.GAP; - k -= n; - gaps++; - } - break; - case Directions.DIAGONAL: - c1 = a1[--i]; - c2 = a2[--j]; - k -= n; - reversed1[len1++] = c1; - reversed2[len2++] = c2; - if (c1 == c2) { - reversed3[len3++] = Markups.IDENTITY; - identity++; - similarity++; - } else if (scores[c1][c2] > 0) { - reversed3[len3++] = Markups.SIMILARITY; - similarity++; - } else { - reversed3[len3++] = Markups.MISMATCH; - } - break; - case Directions.LEFT: - for (int l = 0, len = sizesOfHorizontalGaps[k + j]; l < len; l++) { - reversed1[len1++] = Alignment.GAP; - reversed2[len2++] = a2[--j]; - reversed3[len3++] = Markups.GAP; - gaps++; - } - break; - case Directions.STOP: - stillGoing = false; - } - } - - alignment.setSequence1(reverse(reversed1, len1)); - alignment.setStart1(i); - alignment.setSequence2(reverse(reversed2, len2)); - alignment.setStart2(j); - alignment.setMarkupLine(reverse(reversed3, len3)); - alignment.setIdentity(identity); - alignment.setGaps(gaps); - alignment.setSimilarity(similarity); - - /*logger.info("Finished in " + (System.currentTimeMillis() - start) - + " milliseconds");*/ - return alignment; - } - - /** - * Returns the maximum of 4 float numbers. - * - * @param a - * float #1 - * @param b - * float #2 - * @param c - * float #3 - * @param d - * float #4 - * @return The maximum of a, b, c and d. - */ - private static float maximum(float a, float b, float c, float d) { - if (a > b) { - if (a > c) { - return a > d ? a : d; - } else { - return c > d ? c : d; - } - } else if (b > c) { - return b > d ? b : d; - } else { - return c > d ? c : d; - } - } - - /** - * Reverses an array of chars - * - * @param a - * @param len - * @return the input array of char reserved - */ - private static char[] reverse(char[] a, int len) { - char[] b = new char[len]; - for (int i = len - 1, j = 0; i >= 0; i--, j++) { - b[j] = a[i]; - } - return b; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/example/Example.java b/maven-src/target/classes/java/jaligner/example/Example.java deleted file mode 100644 index 9ac0a4e..0000000 --- a/maven-src/target/classes/java/jaligner/example/Example.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * $Id: Example.java,v 1.3 2005/04/03 19:38:21 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.example; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.formats.Pair; -import jaligner.matrix.MatrixLoader; -import jaligner.util.SequenceParser; - -import java.io.IOException; -import java.io.InputStream; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Example of using JAligner API to align P53 human aganist - * P53 mouse using Smith-Waterman-Gotoh algorithm. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Example { - - /** - * - */ - private static final String SAMPLE_SEQUENCE_P35_HUMAN = "jaligner/example/sequences/p53_human.fasta"; - - /** - * - */ - private static final String SAMPLE_SEQUENCE_P35_MOUSE = "jaligner/example/sequences/p53_mouse.fasta"; - - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(Example.class.getName()); - - /** - * - * @param args - */ - public static void main(String[] args) { - try { - logger.info("Running example..."); - String st1 = "MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPRVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACAGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD"; - String st2 = "MTAMEESQSDISLELPLSQETFSGLWKLLPPEDILPSPHCMDDLLLPQDVEEFFEGPSEALRVSGAPAAQDPVTETPGPAAPAPATPWPLSSFVPSQKTYQGNYGFHLGFLQSGTAKSVMCTYSPPLNKLFCQLAKTCPVQLWVSATPPAGSRVRAMAIYKKSQHMTEVVRRCPHHERCSDGDGLAPPQHLIRVEGNLYPEYLEDRQTFRHSVVVPYEPPEAGSEYTTIHYKYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEVLCPELPPGSAKRALPTCTSASPPQKKKPLDGEYFTLKIRGRKRFEMFRELNEALELKDAHATEESGDSRAHSSYLKTKKGQSTSRHKKTMVKKVGPDSD"; - - /*Sequence s1 = SequenceParser.parse(loadP53Human()); - Sequence s2 = SequenceParser.parse(loadP53Mouse());*/ - Sequence s1 = SequenceParser.parse(st1); - Sequence s2 = SequenceParser.parse(st2); - - Alignment alignment = SmithWatermanGotoh.align(s1, s2, MatrixLoader.load("BLOSUM62"), 10f, 0.5f); - - System.out.println ( alignment.getSummary() ); - System.out.println ( new Pair().format(alignment) ); - System.out.println("----------------------------"); - System.out.println ( alignment.getSequence1() ); - System.out.println ( alignment.getSequence2() ); - - logger.info("Finished running example"); - } catch (Exception e) { - logger.log(Level.SEVERE, "Failed running example: " + e.getMessage(), e); - } - } - - /** - * - * @param path location of the sequence - * @return sequence string - * @throws IOException - */ - private static String loadSampleSequence(String path) throws IOException { - InputStream inputStream = Example.class.getClassLoader().getResourceAsStream(path); - StringBuffer buffer = new StringBuffer(); - int ch; - while ((ch = inputStream.read()) != -1) { - buffer.append((char)ch); - } - return buffer.toString(); - } - - /** - * - * @return sequence string - * @throws IOException - */ - public static String loadP53Human( ) throws IOException { - return loadSampleSequence(SAMPLE_SEQUENCE_P35_HUMAN); - } - - /** - * - * @return sequence string - * @throws IOException - */ - public static String loadP53Mouse( ) throws IOException { - return loadSampleSequence(SAMPLE_SEQUENCE_P35_MOUSE); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/example/package.html b/maven-src/target/classes/java/jaligner/example/package.html deleted file mode 100644 index c42043b..0000000 --- a/maven-src/target/classes/java/jaligner/example/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Example for using API of JAligner to perform pairwise sequence alignment. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/example/sequences/p53_human.fasta b/maven-src/target/classes/java/jaligner/example/sequences/p53_human.fasta deleted file mode 100644 index 1591a95..0000000 --- a/maven-src/target/classes/java/jaligner/example/sequences/p53_human.fasta +++ /dev/null @@ -1,7 +0,0 @@ ->p53_human -MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAA -PRVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKT -CPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRN -TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACAGR -DRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALEL -KDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/example/sequences/p53_mouse.fasta b/maven-src/target/classes/java/jaligner/example/sequences/p53_mouse.fasta deleted file mode 100644 index 4bb7ffb..0000000 --- a/maven-src/target/classes/java/jaligner/example/sequences/p53_mouse.fasta +++ /dev/null @@ -1,10 +0,0 @@ ->p53_mouse -MTAMEESQSDISLELPLSQETFSGLWKLLPPEDILPSPHCMDDLLLPQDVEEFFEGPSEA -LRVSGAPAAQDPVTETPGPAAPAPATPWPLSSFVPSQKTYQGNYGFHLGFLQSGTAKSVM -CTYSPPLNKLFCQLAKTCPVQLWVSATPPAGSRVRAMAIYKKSQHMTEVVRRCPHHERCS -DGDGLAPPQHLIRVEGNLYPEYLEDRQTFRHSVVVPYEPPEAGSEYTTIHYKYMCNSSCM -GGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEVLCPELPPGS -AKRALPTCTSASPPQKKKPLDGEYFTLKIRGRKRFEMFRELNEALELKDAHATEESGDSR -AHSSYLKTKKGQSTSRHKKTMVKKVGPDSD - - diff --git a/maven-src/target/classes/java/jaligner/formats/CLUSTAL.java b/maven-src/target/classes/java/jaligner/formats/CLUSTAL.java deleted file mode 100644 index 5630321..0000000 --- a/maven-src/target/classes/java/jaligner/formats/CLUSTAL.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * $Id: CLUSTAL.java,v 1.15 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.formats; - -import jaligner.Alignment; - -/** - * CLUSTAL format. - * Example: - *
- * 
- * CLUSTAL_FORMAT W(1.60) multiple sequence alignment
- *
- *
- * JC2395          NVSDVNLNK---YIWRTAEKMK---ICDAKKFARQHKIPESKIDEIEHNSPQDAAE----
- * KPEL_DROME      MAIRLLPLPVRAQLCAHLDAL-----DVWQQLATAVKLYPDQVEQISSQKQRGRS-----
- * FASA_MOUSE      NASNLSLSK---YIPRIAEDMT---IQEAKKFARENNIKEGKIDEIMHDSIQDTAE----
- *
- *
- * JC2395          -------------------------QKIQLLQCWYQSHGKT--GACQALIQGLRKANRCD
- * KPEL_DROME      -------------------------ASNEFLNIWGGQYN----HTVQTLFALFKKLKLHN
- * FASA_MOUSE      -------------------------QKVQLLLCWYQSHGKS--DAYQDLIKGLKKAECRR
- *
- *
- * JC2395          IAEEIQAM
- * KPEL_DROME      AMRLIKDY
- * FASA_MOUSE      TLDKFQDM
- * 
- * 
- * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class CLUSTAL extends Format { - - /** - * Name width - */ - private static final int NAME_WIDTH = 36; - - /** - * Sequence width - */ - private static final int SEQUENCE_WIDTH = 50; - - /** - * CLUSTAL header - */ - private static final String HEADER = "CLUSTAL_FORMAT W(1.60) multiple sequence alignment\n\n"; - - /** - * Constructor - */ - public CLUSTAL() { - super( ); - setId("CLUSTAL"); - } - - /** - * Returns CLUSTAL format - * @param names array of the names of the sequences. - * @param sequences array of the sequences - */ - public String format(String[] names, String[] sequences) { - StringBuffer buffer = new StringBuffer (HEADER); - int maxSequenceLength = 0; - for (int i = 0; i < sequences.length; i++) { - if (sequences[i].length() > maxSequenceLength) { - maxSequenceLength = sequences[i].length(); - } - } - - for (int i = 0; i * SEQUENCE_WIDTH < maxSequenceLength; i++) { - - for (int j = 0; j < sequences.length; j++) { - buffer.append( NAME_WIDTH <= names[j].length() ? names[j].substring(0, NAME_WIDTH - 1) : names[j] ); - for (int k = names[j].length(); k < NAME_WIDTH; k++) { - buffer.append(" "); - } - if (names[j].length() >= NAME_WIDTH) { - buffer.append(" "); - } - buffer.append(sequences[j].substring(i * SEQUENCE_WIDTH, ((i + 1) * SEQUENCE_WIDTH) < sequences[j].length() ? (i + 1) * SEQUENCE_WIDTH: sequences[j].length())); - if (j < sequences.length) { - buffer.append("\n"); - } - } - if ((i + 1) * SEQUENCE_WIDTH < maxSequenceLength) { - buffer.append("\n\n"); - } - } - return buffer.toString(); - } - - /** - * Returns CLUSTAL format of the alignment - * @param alignment ({@link Alignment}) - * @return CLUSTAL format of the alignment - */ - public String format (Alignment alignment) { - String[] sequences = {new String(alignment.getSequence1()), new String(alignment.getSequence2())}; - String[] names = {alignment.getName1(), alignment.getName2()}; - return format (names, sequences); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/formats/FASTA.java b/maven-src/target/classes/java/jaligner/formats/FASTA.java deleted file mode 100644 index 2a3b3f3..0000000 --- a/maven-src/target/classes/java/jaligner/formats/FASTA.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * $Id: FASTA.java,v 1.19 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.formats; - -import jaligner.Alignment; -import jaligner.Sequence; - -/** - * FASTA format. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FASTA extends Format { - - /** - * Number of characters per line - */ - private static final int LINE_WIDTH = 60; - - /** - * Constructor for FASTA. - */ - public FASTA() { - super( ); - setId("FASTA"); - } - - /** - * Returns the name, description and sequence combined in one string. - * The length of each line in the sequence is FASTA.LINE_LENGTH - * - * @return String - */ - public String format (Sequence sequence) { - StringBuffer buffer = new StringBuffer (">"); - buffer.append(sequence.getId() == null ? "" : sequence.getId()); - buffer.append("\n"); - for (int i = 0, n = sequence.length(); i * LINE_WIDTH < n; i++) { - for (int j = i * LINE_WIDTH, m = (i + 1) * LINE_WIDTH < n ? (i + 1) * LINE_WIDTH: n; j < m; j++) { - buffer.append(sequence.subsequence(j, 1)); - } - buffer.append("\n"); - } - return buffer.toString( ); - } - - /** - * - * @param alignment - * @return FASTA format of the input alignment - */ - public String format (Alignment alignment) { - StringBuffer buffer = new StringBuffer(); - StringBuffer s1 = new StringBuffer(); - StringBuffer s2 = new StringBuffer(); - s1.append(alignment.getSequence1()); - s2.append(alignment.getSequence2()); - buffer.append(format(new Sequence(s1.toString(), alignment.getName1(), "", Sequence.PROTEIN))); - buffer.append(format(new Sequence(s2.toString(), alignment.getName2(), "", Sequence.PROTEIN))); - return buffer.toString(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/formats/Format.java b/maven-src/target/classes/java/jaligner/formats/Format.java deleted file mode 100644 index f59cdae..0000000 --- a/maven-src/target/classes/java/jaligner/formats/Format.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id: Format.java,v 1.4 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.formats; - -import jaligner.Alignment; - -/** - * Abstract format - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class Format { - - /** - * Format id - */ - private String id = null; - - /** - * Formats alignment - * @param alignment - * @return formatted alignment - * @see Alignment - */ - public abstract String format(Alignment alignment); - - /** - * Sets format id - * @param id to set - */ - public void setId (String id) { - this.id = id; - } - - /** - * Returns format id - * @return id - */ - public String getId ( ) { - return this.id == null ? this.getClass().getName() : this.id; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/formats/FormatFactory.java b/maven-src/target/classes/java/jaligner/formats/FormatFactory.java deleted file mode 100644 index ba884de..0000000 --- a/maven-src/target/classes/java/jaligner/formats/FormatFactory.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * $Id: FormatFactory.java,v 1.7 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.formats; - -import java.util.Collection; -import java.util.HashMap; - -/** - * Formats factory. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FormatFactory { - /** - * Instance of {@link FormatFactory} - */ - private static FormatFactory instance = null; - - /** - * {@link HashMap} of {@link Format} - */ - private HashMap formats = new HashMap(); - - /** - * Hidden constructor - * - */ - private FormatFactory ( ) { - super(); - } - - /** - * Returns an instance for {@link FormatFactory}. - * @return {@link FormatFactory} - */ - public static FormatFactory getInstance() { - if (instance == null) { - instance = new FormatFactory(); - } - return instance; - } - - /** - * Registers format. - * @param format instance of format - */ - public void registerFormat(Format format) { - formats.put(format.getId(), format); - } - - /** - * Returns an instance of {@link Format}. - * @param id format id - * @return {@link Format} or null if id not found - */ - public Format getFormat(String id) { - return (Format) formats.get(id); - } - - /** - * Returns a list of registered formats - * @return {@link Collection} - */ - public Collection getFormats( ) { - return formats.keySet(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/formats/Pair.java b/maven-src/target/classes/java/jaligner/formats/Pair.java deleted file mode 100644 index cf707bb..0000000 --- a/maven-src/target/classes/java/jaligner/formats/Pair.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * $Id: Pair.java,v 1.18 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.formats; - -import jaligner.Alignment; -import jaligner.util.Commons; - -/** - * Pair format. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Pair extends Format { - - /** - * Name width - */ - private static final int NAME_WIDTH = 13; - - /** - * Position width - */ - private static final int POSITION_WIDTH = 6; - - /** - * Sequence width - */ - private static final int SEQUENCE_WIDTH = 50; - - /** - * Space - */ - private static final String BLANK = " "; - - /** - * Constructor - * - */ - public Pair( ) { - super(); - setId("Pair"); - } - - /** - * Formats an alignment object to the Pair_FORMAT format - * @param alignment alignment object to be formated - * @return string of the alignment pair-formatted - */ - public String format(Alignment alignment) { - char[] sequence1 = alignment.getSequence1(); - char[] sequence2 = alignment.getSequence2(); - char[] markup = alignment.getMarkupLine(); - - int length = sequence1.length > sequence2.length ? sequence2.length : sequence1.length; - - String name1 = adjustName(alignment.getName1()); - String name2 = adjustName(alignment.getName2()); - - StringBuffer buffer = new StringBuffer ( ); - - StringBuffer preMarkup = new StringBuffer ( ); - for (int j = 0; j < NAME_WIDTH + 1 + POSITION_WIDTH + 1; j++) { - preMarkup.append(BLANK); - } - - int oldPosition1, position1 = 1 + alignment.getStart1(); - int oldPosition2, position2 = 1 + alignment.getStart2(); - - char[] subsequence1; - char[] subsequence2; - char[] submarkup; - int line; - - char c1, c2; - - for (int i = 0; i * SEQUENCE_WIDTH < length; i++) { - - oldPosition1 = position1; - oldPosition2 = position2; - - line = ((i + 1) * SEQUENCE_WIDTH) < length ? (i + 1) * SEQUENCE_WIDTH: length; - - subsequence1 = new char[line - i * SEQUENCE_WIDTH]; - subsequence2 = new char[line - i * SEQUENCE_WIDTH]; - submarkup = new char[line - i * SEQUENCE_WIDTH]; - - for (int j = i * SEQUENCE_WIDTH, k = 0; j < line; j++, k++) { - subsequence1[k] = sequence1[j]; - subsequence2[k] = sequence2[j]; - submarkup[k] = markup[j]; - c1 = subsequence1[k]; - c2 = subsequence2[k]; - if (c1 == c2) { - position1++; - position2++; - } else if (c1 == Alignment.GAP) { - position2++; - } else if (c2 == Alignment.GAP) { - position1++; - } else { - position1++; - position2++; - } - } - - buffer.append(name1); - buffer.append(BLANK); - buffer.append(adjustPosition(new Integer(oldPosition1).toString())); - buffer.append(BLANK); - buffer.append(subsequence1); - buffer.append(BLANK); - buffer.append(adjustPosition(new Integer(position1 - 1).toString())); - buffer.append(Commons.getLineSeparator()); - - buffer.append(preMarkup); - buffer.append(submarkup); - buffer.append(Commons.getLineSeparator()); - - buffer.append(name2); - buffer.append(BLANK); - buffer.append(adjustPosition(new Integer(oldPosition2).toString())); - buffer.append(BLANK); - buffer.append(subsequence2); - buffer.append(BLANK); - buffer.append(adjustPosition(new Integer(position2 - 1).toString())); - buffer.append(Commons.getLineSeparator()); - - buffer.append(Commons.getLineSeparator()); - } - return buffer.toString(); - } - - /** - * - * @param name name to adjusted - * @return adjusted name - */ - private String adjustName(String name) { - StringBuffer buffer = new StringBuffer ( ); - - if (name.length() > NAME_WIDTH) { - buffer.append(name.substring(0, NAME_WIDTH)); - } else { - buffer.append(name); - for (int j = buffer.length(); j < NAME_WIDTH; j++) { - buffer.append (BLANK); - } - } - return buffer.toString(); - } - - /** - * - * @param position - * @return string - */ - private String adjustPosition(String position) { - StringBuffer buffer1 = new StringBuffer( ); - StringBuffer buffer2 = new StringBuffer( ); - - if (position.length() > POSITION_WIDTH) { - buffer1.append(position.substring(position.length() - POSITION_WIDTH, position.length())); - } else { - buffer1.append(position); - } - - for (int j = 0, n = POSITION_WIDTH - buffer1.length(); j < n; j++) { - buffer2.append(BLANK); - } - - buffer2.append(buffer1.toString()); - return buffer2.toString(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/formats/package.html b/maven-src/target/classes/java/jaligner/formats/package.html deleted file mode 100644 index 5b3633b..0000000 --- a/maven-src/target/classes/java/jaligner/formats/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Group of formats for output alignments. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/matrix/MatricesCompartor.java b/maven-src/target/classes/java/jaligner/matrix/MatricesCompartor.java deleted file mode 100644 index 6aedcdd..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/MatricesCompartor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: MatricesCompartor.java,v 1.1 2005/01/11 16:48:25 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.matrix; - -import java.util.Comparator; - -/** - * Comparator to sort the scoring matrices by their names. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class MatricesCompartor implements Comparator { - - /* (non-Javadoc) - * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) - */ - public int compare(Object o1, Object o2) { - String s1 = (String) o1; - String s2 = (String) o2; - - int index1 = firstDigitIndex(s1); - int index2 = firstDigitIndex(s2); - - if (index1 == -1 || index2 == -1) { - return s1.compareToIgnoreCase(s2); - } else { - String s3 = s1.substring(0, index1); - String s4 = s2.substring(0, index2); - if (s3.equalsIgnoreCase(s4)) { - return new Integer(s1.substring(index1)).compareTo(new Integer(s2.substring(index2))); - } else { - return s1.compareToIgnoreCase(s2); - } - } - } - - /** - * Returns the index of the first digit in a String. - * If there are no digits, returns -1. - * @param s String to be searched for the digits in - * @return int - */ - private int firstDigitIndex (String s) { - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) >= '0' && s.charAt(i) <= '9') { - return i; - } - } - return -1; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/matrix/Matrix.java b/maven-src/target/classes/java/jaligner/matrix/Matrix.java deleted file mode 100644 index 79ae0e3..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/Matrix.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * $Id: Matrix.java,v 1.2 2005/04/14 14:44:42 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.matrix; - -import java.io.Serializable; - -/** - * Scoring matrix. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class Matrix implements Serializable { - /** - * - */ - private static final long serialVersionUID = 3833742170619524400L; - - /** - * Matrix id (or name) - */ - private String id = null; - - /** - * Scores - */ - private float[][] scores = null; - - public Matrix(String id, float[][] scores) { - this.id = id; - this.scores = scores; - } - - /** - * @return Returns the id. - */ - public String getId() { - return this.id; - } - - /** - * @return Returns the scores. - */ - public float[][] getScores() { - return this.scores; - } - - /** - * - * @param a - * @param b - * @return score - */ - public float getScore(char a, char b) { - return this.scores[a][b]; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/matrix/MatrixLoader.java b/maven-src/target/classes/java/jaligner/matrix/MatrixLoader.java deleted file mode 100644 index 2ba5039..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/MatrixLoader.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * $Id: MatrixLoader.java,v 1.2 2005/01/25 11:54:30 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.matrix; - -import jaligner.ui.filechooser.NamedInputStream; -import jaligner.util.Commons; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.JarURLConnection; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.StringTokenizer; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Scoring matrices loader from a jar file or a file system. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class MatrixLoader { - /** - * The starter character of a comment line. - */ - private static final char COMMENT_STARTER = '#'; - - /** - * The size of the scoring matrix. It is the number of the characters in the ASCII table. - * It is more than the 20 amino acids just to save the processing time of the mapping. - */ - private static final int SIZE = 127; - - /** - * The path to the matrices within the package. - */ - //private static final String MATRICES_HOME = "jaligner/matrix/matrices/"; - private static final String MATRICES_HOME = ""; - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(MatrixLoader.class.getName()); - - /** - * Loads scoring matrix from Jar file or file system. - * @param matrix to load - * @return loaded matrix - * @throws MatrixLoaderException - * @see Matrix - */ - public static Matrix load (String matrix) throws MatrixLoaderException { - InputStream is = null; - - if (new StringTokenizer(matrix, Commons.getFileSeparator()).countTokens() == 1) { - // Matrix does not include the path - // Load the matrix from matrices.jar - is = MatrixLoader.class.getClassLoader().getResourceAsStream(MATRICES_HOME + matrix); - } else { - // Matrix includes the path information - // Load the matrix from the file system - try { - is = new FileInputStream(matrix); - } catch (Exception e) { - String message = "Failed opening input stream: " + e.getMessage(); - //logger.log(Level.SEVERE, message, e); - throw new MatrixLoaderException (message); - } - } - - return load(new NamedInputStream(matrix, is)); - } - - /** - * Loads scoring matrix from {@link InputStream} - * @param nis named input stream - * @return loaded matrix - * @throws MatrixLoaderException - * @see Matrix - * @see NamedInputStream - */ - public static Matrix load (NamedInputStream nis) throws MatrixLoaderException { - //logger.info("Loading scoring matrix..."); - char[] acids = new char[SIZE]; - - // Initialize the acids array to null values (ascii = 0) - for (int i = 0; i < SIZE; i++) { - acids[i] = 0; - } - - float[][] scores = new float[SIZE][SIZE]; - - BufferedReader reader = new BufferedReader(new InputStreamReader(nis.getInputStream())); - - String line; - - try { - // Skip the comment lines - while ((line = reader.readLine()) != null && line.trim().charAt(0) == COMMENT_STARTER); - } catch (Exception e) { - String message = "Failed reading from input stream: " + e.getMessage(); - //logger.log(Level.SEVERE, message, e); - throw new MatrixLoaderException (message); - } - - // Read the headers line (the letters of the acids) - StringTokenizer tokenizer; - tokenizer = new StringTokenizer ( line.trim( ) ); - for (int j = 0; tokenizer.hasMoreTokens(); j++) { - acids[j] = tokenizer.nextToken().charAt(0); - } - - try { - // Read the scores - while ((line = reader.readLine()) != null) { - tokenizer = new StringTokenizer ( line.trim( ) ); - char acid = tokenizer.nextToken().charAt(0); - for (int i = 0; i < SIZE; i++) { - if (acids[i] != 0) { - scores[acid][acids[i]] = Float.parseFloat(tokenizer.nextToken()); - } - } - } - } catch (Exception e) { - String message = "Failed reading from input stream: " + e.getMessage(); - //logger.log(Level.SEVERE, message, e); - throw new MatrixLoaderException (message); - } - //logger.info("Finished loading scoring matrix"); - return new Matrix(nis.getName(), scores); - } - - /** - * Returns a list of the scoring matrices in the matrices home directory - * @param sort flag to sort the list or not - * @return sorted array of scoring matrices - * @throws MatrixLoaderException - */ - public static Collection list (boolean sort ) throws MatrixLoaderException { - //logger.info("Loading list of scoring matrices..."); - ArrayList matrices = new ArrayList(); - URL url = MatrixLoader.class.getClassLoader().getResource(MATRICES_HOME); - if (url.getFile().toString().indexOf("!") != -1) { - // Load from Jar - JarURLConnection connection = null; - JarFile jar = null; - try { - connection = (JarURLConnection) url.openConnection(); - jar = connection.getJarFile(); - } catch (Exception e) { - String message = "Failed opening a connection to jar: " + e.getMessage(); - //logger.log(Level.SEVERE, message, e); - throw new MatrixLoaderException (message); - } - Enumeration entries = jar.entries(); - JarEntry entry; - String entryName; - int length = MATRICES_HOME.length(); - while (entries.hasMoreElements()) { - entry = (JarEntry) entries.nextElement(); - if (!entry.isDirectory()) { - entryName = entry.getName(); - if (entryName.startsWith(MATRICES_HOME)) { - matrices.add(entryName.substring(length)); - } - } - } - } else { - // Load from file system - String home = url.getFile( ); - File dir = new File (home); - String files[] = dir.list( ); - File file; - for (int i = 0, n = files.length; i < n; i++) { - file = new File (home + files[i]); - if (file.isFile() && file.canRead()) { - matrices.add(file.getName()); - } - } - } - if (sort) { - Collections.sort(matrices, new MatricesCompartor()); - } - //logger.info("Finished loading list of scoring matrices"); - return matrices; - } - - /** - * Returns a list of the scoring matrices in the matrices home directory - * @return sorted array of scoring matrices - * @throws MatrixLoaderException - */ - public static Collection list ( ) throws MatrixLoaderException { - return list(false); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/matrix/MatrixLoaderException.java b/maven-src/target/classes/java/jaligner/matrix/MatrixLoaderException.java deleted file mode 100644 index a62783b..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/MatrixLoaderException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * @author Ahmed Moustafa (ahmed at users.sourceforge.net) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.matrix; - -/** - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class MatrixLoaderException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 3906364935142586680L; - - /** - * @param message - */ - public MatrixLoaderException(String message) { - super(message); - } -} diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM100 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM100 deleted file mode 100644 index 46e9e85..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM100 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum100_3.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 100 -# Entropy = 1.4516, Expected = -1.0948 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 8 -3 -4 -5 -2 -2 -3 -1 -4 -4 -4 -2 -3 -5 -2 1 -1 -6 -5 -2 -4 -2 -2 -10 -R -3 10 -2 -5 -8 0 -2 -6 -1 -7 -6 3 -4 -6 -5 -3 -3 -7 -5 -6 -4 -1 -3 -10 -N -4 -2 11 1 -5 -1 -2 -2 0 -7 -7 -1 -5 -7 -5 0 -1 -8 -5 -7 5 -2 -3 -10 -D -5 -5 1 10 -8 -2 2 -4 -3 -8 -8 -3 -8 -8 -5 -2 -4 -10 -7 -8 6 0 -4 -10 -C -2 -8 -5 -8 14 -7 -9 -7 -8 -3 -5 -8 -4 -4 -8 -3 -3 -7 -6 -3 -7 -8 -5 -10 -Q -2 0 -1 -2 -7 11 2 -5 1 -6 -5 2 -2 -6 -4 -2 -3 -5 -4 -5 -2 5 -2 -10 -E -3 -2 -2 2 -9 2 10 -6 -2 -7 -7 0 -5 -8 -4 -2 -3 -8 -7 -5 0 7 -3 -10 -G -1 -6 -2 -4 -7 -5 -6 9 -6 -9 -8 -5 -7 -8 -6 -2 -5 -7 -8 -8 -3 -5 -4 -10 -H -4 -1 0 -3 -8 1 -2 -6 13 -7 -6 -3 -5 -4 -5 -3 -4 -5 1 -7 -2 -1 -4 -10 -I -4 -7 -7 -8 -3 -6 -7 -9 -7 8 2 -6 1 -2 -7 -5 -3 -6 -4 4 -8 -7 -3 -10 -L -4 -6 -7 -8 -5 -5 -7 -8 -6 2 8 -6 3 0 -7 -6 -4 -5 -4 0 -8 -6 -3 -10 -K -2 3 -1 -3 -8 2 0 -5 -3 -6 -6 10 -4 -6 -3 -2 -3 -8 -5 -5 -2 0 -3 -10 -M -3 -4 -5 -8 -4 -2 -5 -7 -5 1 3 -4 12 -1 -5 -4 -2 -4 -5 0 -7 -4 -3 -10 -F -5 -6 -7 -8 -4 -6 -8 -8 -4 -2 0 -6 -1 11 -7 -5 -5 0 4 -3 -7 -7 -4 -10 -P -2 -5 -5 -5 -8 -4 -4 -6 -5 -7 -7 -3 -5 -7 12 -3 -4 -8 -7 -6 -5 -4 -4 -10 -S 1 -3 0 -2 -3 -2 -2 -2 -3 -5 -6 -2 -4 -5 -3 9 2 -7 -5 -4 -1 -2 -2 -10 -T -1 -3 -1 -4 -3 -3 -3 -5 -4 -3 -4 -3 -2 -5 -4 2 9 -7 -5 -1 -2 -3 -2 -10 -W -6 -7 -8 -10 -7 -5 -8 -7 -5 -6 -5 -8 -4 0 -8 -7 -7 17 2 -5 -9 -7 -6 -10 -Y -5 -5 -5 -7 -6 -4 -7 -8 1 -4 -4 -5 -5 4 -7 -5 -5 2 12 -5 -6 -6 -4 -10 -V -2 -6 -7 -8 -3 -5 -5 -8 -7 4 0 -5 0 -3 -6 -4 -1 -5 -5 8 -7 -5 -3 -10 -B -4 -4 5 6 -7 -2 0 -3 -2 -8 -8 -2 -7 -7 -5 -1 -2 -9 -6 -7 6 0 -4 -10 -Z -2 -1 -2 0 -8 5 7 -5 -1 -7 -6 0 -4 -7 -4 -2 -3 -7 -6 -5 0 6 -2 -10 -X -2 -3 -3 -4 -5 -2 -3 -4 -4 -3 -3 -3 -3 -4 -4 -2 -2 -6 -4 -3 -4 -2 -3 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM30 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM30 deleted file mode 100644 index 81ebd98..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM30 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum30.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/5 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 30 -# Entropy = 0.1424, Expected = -0.1074 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 0 0 -3 1 0 0 -2 0 -1 0 1 -2 -1 1 1 -5 -4 1 0 0 0 -7 -R -1 8 -2 -1 -2 3 -1 -2 -1 -3 -2 1 0 -1 -1 -1 -3 0 0 -1 -2 0 -1 -7 -N 0 -2 8 1 -1 -1 -1 0 -1 0 -2 0 0 -1 -3 0 1 -7 -4 -2 4 -1 0 -7 -D 0 -1 1 9 -3 -1 1 -1 -2 -4 -1 0 -3 -5 -1 0 -1 -4 -1 -2 5 0 -1 -7 -C -3 -2 -1 -3 17 -2 1 -4 -5 -2 0 -3 -2 -3 -3 -2 -2 -2 -6 -2 -2 0 -2 -7 -Q 1 3 -1 -1 -2 8 2 -2 0 -2 -2 0 -1 -3 0 -1 0 -1 -1 -3 -1 4 0 -7 -E 0 -1 -1 1 1 2 6 -2 0 -3 -1 2 -1 -4 1 0 -2 -1 -2 -3 0 5 -1 -7 -G 0 -2 0 -1 -4 -2 -2 8 -3 -1 -2 -1 -2 -3 -1 0 -2 1 -3 -3 0 -2 -1 -7 -H -2 -1 -1 -2 -5 0 0 -3 14 -2 -1 -2 2 -3 1 -1 -2 -5 0 -3 -2 0 -1 -7 -I 0 -3 0 -4 -2 -2 -3 -1 -2 6 2 -2 1 0 -3 -1 0 -3 -1 4 -2 -3 0 -7 -L -1 -2 -2 -1 0 -2 -1 -2 -1 2 4 -2 2 2 -3 -2 0 -2 3 1 -1 -1 0 -7 -K 0 1 0 0 -3 0 2 -1 -2 -2 -2 4 2 -1 1 0 -1 -2 -1 -2 0 1 0 -7 -M 1 0 0 -3 -2 -1 -1 -2 2 1 2 2 6 -2 -4 -2 0 -3 -1 0 -2 -1 0 -7 -F -2 -1 -1 -5 -3 -3 -4 -3 -3 0 2 -1 -2 10 -4 -1 -2 1 3 1 -3 -4 -1 -7 -P -1 -1 -3 -1 -3 0 1 -1 1 -3 -3 1 -4 -4 11 -1 0 -3 -2 -4 -2 0 -1 -7 -S 1 -1 0 0 -2 -1 0 0 -1 -1 -2 0 -2 -1 -1 4 2 -3 -2 -1 0 -1 0 -7 -T 1 -3 1 -1 -2 0 -2 -2 -2 0 0 -1 0 -2 0 2 5 -5 -1 1 0 -1 0 -7 -W -5 0 -7 -4 -2 -1 -1 1 -5 -3 -2 -2 -3 1 -3 -3 -5 20 5 -3 -5 -1 -2 -7 -Y -4 0 -4 -1 -6 -1 -2 -3 0 -1 3 -1 -1 3 -2 -2 -1 5 9 1 -3 -2 -1 -7 -V 1 -1 -2 -2 -2 -3 -3 -3 -3 4 1 -2 0 1 -4 -1 1 -3 1 5 -2 -3 0 -7 -B 0 -2 4 5 -2 -1 0 0 -2 -2 -1 0 -2 -3 -2 0 0 -5 -3 -2 5 0 -1 -7 -Z 0 0 -1 0 0 4 5 -2 0 -3 -1 1 -1 -4 0 -1 -1 -1 -2 -3 0 4 0 -7 -X 0 -1 0 -1 -2 0 -1 -1 -1 0 0 0 0 -1 -1 0 0 -2 -1 0 -1 0 -1 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM35 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM35 deleted file mode 100644 index a6d99f5..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM35 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum35.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/4 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 35 -# Entropy = 0.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 -1 0 -1 -5 -S 1 -1 0 -1 -3 0 0 1 -1 -2 -2 0 -1 -1 -2 4 2 -2 -1 -1 0 0 0 -5 -T 0 -2 0 -1 -1 0 -1 -2 -2 -1 0 0 0 -1 0 2 5 -2 -2 1 -1 -1 0 -5 -W -2 0 -2 -3 -5 -1 -1 -1 -4 -1 0 0 1 1 -4 -2 -2 16 3 -2 -3 -1 -1 -5 -Y -1 0 -2 -2 -5 0 -1 -2 0 0 0 -1 0 3 -3 -1 -2 3 8 0 -2 -1 -1 -5 -V 0 -1 -2 -2 -2 -3 -2 -3 -4 4 2 -2 1 1 -3 -1 1 -2 0 5 -2 -2 0 -5 -B -1 -1 4 5 -2 0 0 0 0 -2 -2 0 -2 -2 -1 0 -1 -3 -2 -2 5 0 -1 -5 -Z -1 0 0 1 -2 4 5 -2 -1 -3 -2 1 -2 -3 0 0 -1 -1 -1 -2 0 4 0 -5 -X 0 -1 0 -1 -2 -1 -1 -1 -1 0 0 0 0 -1 -1 0 0 -1 -1 0 -1 0 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM40 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM40 deleted file mode 100644 index 1a4baa2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM40 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum40.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/4 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 40 -# Entropy = 0.2851, Expected = -0.2090 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -1 -2 0 -1 1 -2 -1 -2 -1 -1 -3 -2 1 0 -3 -2 0 -1 -1 0 -6 -R -2 9 0 -1 -3 2 -1 -3 0 -3 -2 3 -1 -2 -3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 -6 -W -3 -2 -4 -5 -6 -1 -2 -2 -5 -3 -1 -2 -2 1 -4 -5 -4 19 3 -3 -4 -2 -2 -6 -Y -2 -1 -2 -3 -4 -1 -2 -3 2 0 0 -1 1 4 -3 -2 -1 3 9 -1 -3 -2 -1 -6 -V 0 -2 -3 -3 -2 -3 -3 -4 -4 4 2 -2 1 0 -3 -1 1 -3 -1 5 -3 -3 -1 -6 -B -1 -1 4 6 -2 0 1 -1 0 -3 -3 0 -3 -3 -2 0 0 -4 -3 -3 5 2 -1 -6 -Z -1 0 0 1 -3 4 5 -2 0 -4 -2 1 -2 -4 -1 0 -1 -2 -2 -3 2 5 -1 -6 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 0 -1 -2 0 0 -2 -1 -1 -1 -1 -1 -6 -* -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM45 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM45 deleted file mode 100644 index 18c3323..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM45 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum45.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 45 -# Entropy = 0.3795, Expected = -0.2789 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -2 -2 0 -1 -1 0 -5 -R -2 7 0 -1 -3 1 0 -2 0 -3 -2 3 -1 -2 -2 -1 -1 -2 -1 -2 -1 0 -1 -5 -N -1 0 6 2 -2 0 0 0 1 -2 -3 0 -2 -2 -2 1 0 -4 -2 -3 4 0 -1 -5 -D -2 -1 2 7 -3 0 2 -1 0 -4 -3 0 -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1 3 8 -1 -2 -2 -1 -5 -V 0 -2 -3 -3 -1 -3 -3 -3 -3 3 1 -2 1 0 -3 -1 0 -3 -1 5 -3 -3 -1 -5 -B -1 -1 4 5 -2 0 1 -1 0 -3 -3 0 -2 -3 -2 0 0 -4 -2 -3 4 2 -1 -5 -Z -1 0 0 1 -3 4 4 -2 0 -3 -2 1 -1 -3 -1 0 -1 -2 -2 -3 2 4 -1 -5 -X 0 -1 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -2 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM50 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM50 deleted file mode 100644 index 3f62e3c..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM50 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum50.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 50 -# Entropy = 0.4808, Expected = -0.3573 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -1 -2 -1 -1 -1 0 -2 -1 -2 -1 -1 -3 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -2 7 -1 -2 -4 1 0 -3 0 -4 -3 3 -2 -3 -3 -1 -1 -3 -1 -3 -1 0 -1 -5 -N -1 -1 7 2 -2 0 0 0 1 -3 -4 0 -2 -4 -2 1 0 -4 -2 -3 4 0 -1 -5 -D -2 -2 2 8 -4 0 2 -1 -1 -4 -4 -1 -4 -5 -1 0 -1 -5 -3 -4 5 1 -1 -5 -C -1 -4 -2 -4 13 -3 -3 -3 -3 -2 -2 -3 -2 -2 -4 -1 -1 -5 -3 -1 -3 -3 -2 -5 -Q -1 1 0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 0 1 -1 0 -4 -4 0 -3 -4 -2 0 0 -5 -3 -4 5 2 -1 -5 -Z -1 0 0 1 -3 4 5 -2 0 -3 -3 1 -1 -4 -1 0 -1 -2 -2 -3 2 5 -1 -5 -X -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 0 -3 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM55 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM55 deleted file mode 100644 index c0cf3ff..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM55 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum55.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 55 -# Entropy = 0.5637, Expected = -0.4179 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -2 0 -1 -1 0 -2 -2 -2 -1 -1 -3 -1 2 0 -4 -2 0 -2 -1 -1 -5 -R -2 8 -1 -2 -4 1 0 -3 0 -4 -3 3 -2 -3 -3 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 -1 8 2 -3 0 0 0 1 -4 -4 0 -3 -4 -2 1 0 -5 -2 -4 4 0 -1 -5 -D -2 -2 2 8 -4 0 2 -2 -1 -4 -5 -1 -4 -5 -2 0 -1 -5 -3 -4 5 1 -2 -5 -C 0 -4 -3 -4 13 -4 -4 -3 -4 -2 -2 -4 -2 -3 -3 -1 -1 -4 -3 -1 -4 -4 -2 -5 -Q -1 1 0 0 -4 7 2 -2 1 -4 -3 2 0 -4 -1 0 -1 -2 -1 -3 0 4 -1 -5 -E -1 0 0 2 -4 2 7 -3 -1 -4 -4 1 -3 -4 -1 0 -1 -3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 -2 -3 2 5 -1 -5 -X -1 -1 -1 -2 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 -1 -3 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM60 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM60 deleted file mode 100644 index 4fd1943..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM60 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum60.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 60 -# Entropy = 0.6603, Expected = -0.4917 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -1 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0 -4 -R -1 5 0 -1 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -2 -1 0 -1 -4 -N -1 0 6 1 -2 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -4 -D -2 -1 1 6 -3 0 2 -1 -1 -3 -3 -1 -3 -3 -1 0 -1 -4 -3 -3 4 1 -1 -4 -C 0 -3 -2 -3 9 -3 -3 -2 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1 -3 -3 -2 -4 -Q -1 1 0 0 -3 5 2 -2 1 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2 0 3 -1 -4 -E -1 0 0 2 -3 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -4 -G 0 -2 0 -1 -2 -2 -2 6 -2 -3 -4 -1 -2 -3 -2 0 -2 -2 -3 -3 -1 -2 -1 -4 -H -2 0 1 -1 -3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 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM62 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM62 deleted file mode 100644 index 205f139..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM62 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum62.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 62 -# Entropy = 0.6979, Expected = -0.5209 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0 -4 -R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -4 -N -2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -4 -D -2 -2 1 6 -3 0 2 -1 -1 -3 -4 -1 -3 -3 -1 0 -1 -4 -3 -3 4 1 -1 -4 -C 0 -3 -3 -3 9 -3 -4 -3 -3 -1 -1 -3 -1 -2 -3 -1 -1 -2 -2 -1 -3 -3 -2 -4 -Q -1 1 0 0 -3 5 2 -2 0 -3 -2 1 0 -3 -1 0 -1 -2 -1 -2 0 3 -1 -4 -E -1 0 0 2 -4 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -4 -G 0 -2 0 -1 -3 -2 -2 6 -2 -4 -4 -2 -3 -3 -2 0 -2 -2 -3 -3 -1 -2 -1 -4 -H -2 0 1 -1 -3 0 0 -2 8 -3 -3 -1 -2 -1 -2 -1 -2 -2 2 -3 0 0 -1 -4 -I -1 -3 -3 -3 -1 -3 -3 -4 -3 4 2 -3 1 0 -3 -2 -1 -3 -1 3 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/java/jaligner/matrix/matrices/BLOSUM65 deleted file mode 100644 index 1eacd14..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM65 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum65.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 65 -# Entropy = 0.7576, Expected = -0.5675 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -2 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -1 6 0 -2 -4 1 0 -2 0 -3 -2 2 -2 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 0 6 1 -3 0 0 -1 1 -3 -4 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -5 -D -2 -2 1 6 -4 0 2 -1 -1 -3 -4 -1 -3 -4 -2 0 -1 -5 -3 -3 4 1 -1 -5 -C 0 -4 -3 -4 9 -3 -4 -3 -3 -1 -1 -3 -2 -2 -3 -1 -1 -2 -2 -1 -3 -4 -2 -5 -Q -1 1 0 0 -3 6 2 -2 1 -3 -2 1 0 -3 -1 0 -1 -2 -2 -2 0 3 -1 -5 -E -1 0 0 2 -4 2 5 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -3 1 4 -1 -5 -G 0 -2 -1 -1 -3 -2 -2 6 -2 -4 -4 -2 -3 -3 -2 0 -2 -3 -3 -3 -1 -2 -2 -5 -H -2 0 1 -1 -3 1 0 -2 8 -3 -3 -1 -2 -1 -2 -1 -2 -2 2 -3 0 0 -1 -5 -I -1 -3 -3 -3 -1 -3 -3 -4 -3 4 2 -3 1 0 -3 -2 -1 -2 -1 3 -3 -3 -1 -5 -L -2 -2 -4 -4 -1 -2 -3 -4 -3 2 4 -3 2 0 -3 -3 -1 -2 -1 1 -4 -3 -1 -5 -K -1 2 0 -1 -3 1 1 -2 -1 -3 -3 5 -2 -3 -1 0 -1 -3 -2 -2 0 1 -1 -5 -M -1 -2 -2 -3 -2 0 -2 -3 -2 1 2 -2 6 0 -3 -2 -1 -2 -1 1 -3 -2 -1 -5 -F -2 -3 -3 -4 -2 -3 -3 -3 -1 0 0 -3 0 6 -4 -2 -2 1 3 -1 -3 -3 -2 -5 -P -1 -2 -2 -2 -3 -1 -1 -2 -2 -3 -3 -1 -3 -4 8 -1 -1 -4 -3 -2 -2 -1 -2 -5 -S 1 -1 1 0 -1 0 0 0 -1 -2 -3 0 -2 -2 -1 4 1 -3 -2 -2 0 0 -1 -5 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -1 -1 -1 -2 -1 1 5 -3 -2 0 -1 -1 -1 -5 -W -3 -3 -4 -5 -2 -2 -3 -3 -2 -2 -2 -3 -2 1 -4 -3 -3 10 2 -3 -4 -3 -2 -5 -Y -2 -2 -2 -3 -2 -2 -2 -3 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -1 -3 -2 -1 -5 -V 0 -3 -3 -3 -1 -2 -3 -3 -3 3 1 -2 1 -1 -2 -2 0 -3 -1 4 -3 -2 -1 -5 -B -2 -1 3 4 -3 0 1 -1 0 -3 -4 0 -3 -3 -2 0 -1 -4 -3 -3 4 1 -1 -5 -Z -1 0 0 1 -4 3 4 -2 0 -3 -3 1 -2 -3 -1 0 -1 -3 -2 -2 1 4 -1 -5 -X -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 -1 -2 -1 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM70 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM70 deleted file mode 100644 index 3e4093f..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM70 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum70.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 70 -# Entropy = 0.8391, Expected = -0.6313 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -2 -2 -2 -1 -1 -1 0 -2 -2 -2 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 -1 -5 -R -2 6 -1 -2 -4 1 0 -3 0 -3 -3 2 -2 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -5 -N -2 -1 6 1 -3 0 0 -1 0 -4 -4 0 -2 -3 -2 0 0 -4 -2 -3 3 0 -1 -5 -D -2 -2 1 6 -4 -1 1 -2 -1 -4 -4 -1 -3 -4 -2 0 -1 -5 -4 -4 4 1 -2 -5 -C -1 -4 -3 -4 9 -3 -4 -3 -4 -1 -2 -4 -2 -2 -3 -1 -1 -3 -3 -1 -4 -4 -2 -5 -Q -1 1 0 -1 -3 6 2 -2 1 -3 -2 1 0 -3 -2 0 -1 -2 -2 -2 0 3 -1 -5 -E -1 0 0 1 -4 2 5 -2 0 -4 -3 1 -2 -4 -1 0 -1 -4 -3 -3 1 4 -1 -5 -G 0 -3 -1 -2 -3 -2 -2 6 -2 -4 -4 -2 -3 -4 -3 -1 -2 -3 -4 -4 -1 -2 -2 -5 -H -2 0 0 -1 -4 1 0 -2 8 -4 -3 -1 -2 -1 -2 -1 -2 -2 2 -3 -1 0 -1 -5 -I -2 -3 -4 -4 -1 -3 -4 -4 -4 4 2 -3 1 0 -3 -3 -1 -3 -1 3 -4 -3 -1 -5 -L -2 -3 -4 -4 -2 -2 -3 -4 -3 2 4 -3 2 0 -3 -3 -2 -2 -1 1 -4 -3 -1 -5 -K -1 2 0 -1 -4 1 1 -2 -1 -3 -3 5 -2 -3 -1 0 -1 -3 -2 -3 -1 1 -1 -5 -M -1 -2 -2 -3 -2 0 -2 -3 -2 1 2 -2 6 0 -3 -2 -1 -2 -1 1 -3 -2 -1 -5 -F -2 -3 -3 -4 -2 -3 -4 -4 -1 0 0 -3 0 6 -4 -3 -2 1 3 -1 -4 -4 -2 -5 -P -1 -2 -2 -2 -3 -2 -1 -3 -2 -3 -3 -1 -3 -4 8 -1 -1 -4 -3 -3 -2 -1 -2 -5 -S 1 -1 0 0 -1 0 0 -1 -1 -3 -3 0 -2 -3 -1 4 1 -3 -2 -2 0 0 -1 -5 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -2 -1 -1 -2 -1 1 5 -3 -2 0 -1 -1 -1 -5 -W -3 -3 -4 -5 -3 -2 -4 -3 -2 -3 -2 -3 -2 1 -4 -3 -3 11 2 -3 -4 -3 -3 -5 -Y -2 -2 -2 -4 -3 -2 -3 -4 2 -1 -1 -2 -1 3 -3 -2 -2 2 7 -2 -3 -2 -2 -5 -V 0 -3 -3 -4 -1 -2 -3 -4 -3 3 1 -3 1 -1 -3 -2 0 -3 -2 4 -3 -3 -1 -5 -B -2 -1 3 4 -4 0 1 -1 -1 -4 -4 -1 -3 -4 -2 0 -1 -4 -3 -3 4 0 -1 -5 -Z -1 0 0 1 -4 3 4 -2 0 -3 -3 1 -2 -4 -1 0 -1 -3 -2 -3 0 4 -1 -5 -X -1 -1 -1 -2 -2 -1 -1 -2 -1 -1 -1 -1 -1 -2 -2 -1 -1 -3 -2 -1 -1 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM75 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM75 deleted file mode 100644 index 98964be..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM75 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum75.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/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2 -5 -P -1 -2 -3 -2 -4 -2 -1 -3 -2 -3 -3 -1 -3 -4 8 -1 -1 -5 -4 -3 -2 -2 -2 -5 -S 1 -1 0 -1 -1 0 0 -1 -1 -3 -3 0 -2 -3 -1 5 1 -3 -2 -2 0 0 -1 -5 -T 0 -1 0 -1 -1 -1 -1 -2 -2 -1 -2 -1 -1 -2 -1 1 5 -3 -2 0 -1 -1 -1 -5 -W -3 -3 -4 -5 -3 -2 -4 -3 -2 -3 -2 -4 -2 1 -5 -3 -3 11 2 -3 -5 -3 -3 -5 -Y -2 -2 -3 -4 -3 -2 -3 -4 2 -2 -1 -2 -2 3 -4 -2 -2 2 7 -2 -3 -3 -2 -5 -V 0 -3 -3 -4 -1 -2 -3 -4 -4 3 1 -3 1 -1 -3 -2 0 -3 -2 4 -4 -3 -1 -5 -B -2 -1 3 4 -4 0 1 -1 -1 -4 -4 -1 -3 -4 -2 0 -1 -5 -3 -4 4 0 -2 -5 -Z -1 0 0 1 -4 3 4 -2 0 -4 -3 1 -2 -4 -2 0 -1 -3 -3 -3 0 4 -1 -5 -X -1 -1 -1 -2 -2 -1 -1 -2 -1 -2 -1 -1 -1 -2 -2 -1 -1 -3 -2 -1 -2 -1 -1 -5 -* -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM80 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM80 deleted file mode 100644 index 78172a3..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM80 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum80_3.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/3 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 80 -# Entropy = 0.9868, Expected = -0.7442 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 7 -3 -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2 -3 -8 -S 2 -2 1 -1 -2 -1 -1 -1 -2 -4 -4 -1 -3 -4 -2 7 2 -6 -3 -3 0 -1 -1 -8 -T 0 -2 0 -2 -2 -1 -2 -3 -3 -2 -3 -1 -1 -4 -3 2 8 -5 -3 0 -1 -2 -1 -8 -W -5 -5 -7 -8 -5 -4 -6 -6 -4 -5 -4 -6 -3 0 -7 -6 -5 16 3 -5 -8 -5 -5 -8 -Y -4 -4 -4 -6 -5 -3 -5 -6 3 -3 -2 -4 -3 4 -6 -3 -3 3 11 -3 -5 -4 -3 -8 -V -1 -4 -5 -6 -2 -4 -4 -6 -5 4 1 -4 1 -2 -4 -3 0 -5 -3 7 -6 -4 -2 -8 -B -3 -2 5 6 -6 -1 1 -2 -1 -6 -7 -1 -5 -6 -4 0 -1 -8 -5 -6 6 0 -3 -8 -Z -2 0 -1 1 -7 5 6 -4 0 -6 -5 1 -3 -6 -2 -1 -2 -5 -4 -4 0 6 -1 -8 -X -1 -2 -2 -3 -4 -2 -2 -3 -2 -2 -2 -2 -2 -3 -3 -1 -1 -5 -3 -2 -3 -1 -2 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM85 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM85 deleted file mode 100644 index cb47fd2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM85 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum85.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 85 -# Entropy = 1.0805, Expected = -0.8153 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -2 -1 -1 -1 0 -2 -2 -2 -1 -2 -3 -1 1 0 -3 -3 -1 -2 -1 -1 -6 -R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2 -2 0 -1 -1 -6 -T 0 -2 0 -2 -2 -1 -1 -2 -2 -1 -2 -1 -1 -3 -2 1 5 -4 -2 0 -1 -1 -1 -6 -W -3 -4 -5 -6 -4 -3 -4 -4 -3 -3 -3 -5 -2 0 -5 -4 -4 11 2 -3 -5 -4 -3 -6 -Y -3 -3 -3 -4 -3 -2 -4 -5 2 -2 -2 -3 -2 3 -4 -2 -2 2 7 -2 -4 -3 -2 -6 -V -1 -3 -4 -4 -1 -3 -3 -4 -4 3 0 -3 0 -1 -3 -2 0 -3 -2 5 -4 -3 -1 -6 -B -2 -2 4 4 -4 -1 0 -1 -1 -5 -5 -1 -4 -4 -3 0 -1 -5 -4 -4 4 0 -2 -6 -Z -1 0 -1 1 -5 4 4 -3 0 -4 -4 1 -2 -4 -2 -1 -1 -4 -3 -3 0 4 -1 -6 -X -1 -2 -2 -2 -3 -1 -1 -2 -2 -2 -2 -1 -1 -2 -2 -1 -1 -3 -2 -1 -2 -1 -2 -6 -* -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM90 b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM90 deleted file mode 100644 index 71441b5..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUM90 +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosum90.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= 90 -# Entropy = 1.1806, Expected = -0.8887 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -2 -2 -3 -1 -1 -1 0 -2 -2 -2 -1 -2 -3 -1 1 0 -4 -3 -1 -2 -1 -1 -6 -R -2 6 -1 -3 -5 1 -1 -3 0 -4 -3 2 -2 -4 -3 -1 -2 -4 -3 -3 -2 0 -2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 6 -4 -2 -1 -1 -1 -1 -6 -W -4 -4 -5 -6 -4 -3 -5 -4 -3 -4 -3 -5 -2 0 -5 -4 -4 11 2 -3 -6 -4 -3 -6 -Y -3 -3 -3 -4 -4 -3 -4 -5 1 -2 -2 -3 -2 3 -4 -3 -2 2 8 -3 -4 -3 -2 -6 -V -1 -3 -4 -5 -2 -3 -3 -5 -4 3 0 -3 0 -2 -3 -2 -1 -3 -3 5 -4 -3 -2 -6 -B -2 -2 4 4 -4 -1 0 -2 -1 -5 -5 -1 -4 -4 -3 0 -1 -6 -4 -4 4 0 -2 -6 -Z -1 0 -1 0 -5 4 4 -3 0 -4 -4 1 -2 -4 -2 -1 -1 -4 -3 -3 0 4 -1 -6 -X -1 -2 -2 -2 -3 -1 -2 -2 -2 -2 -2 -1 -1 -2 -2 -1 -1 -3 -2 -2 -2 -1 -2 -6 -* -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUMN b/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUMN deleted file mode 100644 index df064c8..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/BLOSUMN +++ /dev/null @@ -1,31 +0,0 @@ -# Matrix made by matblas from blosumn.iij -# * column uses minimum score -# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units -# Blocks Database = /data/blocks_5.0/blocks.dat -# Cluster Percentage: >= -2 -# Entropy = 1.5172, Expected = -1.1484 - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 6 -2 -2 -3 -2 -1 -2 -1 -3 -3 -3 -2 -2 -4 -1 1 -1 -4 -4 -1 -3 -2 -1 -7 -R -2 7 -1 -3 -6 0 -2 -4 -1 -5 -4 2 -3 -4 -3 -2 -2 -5 -4 -4 -2 -1 -2 -7 -N -2 -1 7 1 -4 -1 -1 -2 0 -5 -5 -1 -4 -5 -4 0 -1 -6 -4 -4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-4 -4 -4 -6 -2 0 -5 -4 -5 11 1 -3 -6 -4 -4 -7 -Y -4 -4 -4 -5 -4 -3 -4 -6 1 -3 -3 -4 -3 3 -5 -3 -3 1 8 -3 -4 -4 -3 -7 -V -1 -4 -4 -5 -2 -4 -4 -5 -5 2 0 -4 0 -2 -4 -3 -1 -3 -3 5 -5 -4 -2 -7 -B -3 -2 4 4 -5 -1 0 -2 -1 -5 -5 -1 -5 -5 -4 -1 -2 -6 -4 -5 4 1 -2 -7 -Z -2 -1 -1 0 -6 4 5 -4 -1 -5 -4 0 -3 -5 -3 -1 -2 -4 -4 -4 1 4 -2 -7 -X -1 -2 -2 -3 -4 -2 -2 -3 -3 -2 -2 -2 -2 -3 -3 -1 -1 -4 -3 -2 -2 -2 -2 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/DAYHOFF b/maven-src/target/classes/java/jaligner/matrix/matrices/DAYHOFF deleted file mode 100644 index e287ed0..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/DAYHOFF +++ /dev/null @@ -1,32 +0,0 @@ -#Date: Wed, 18 Sep 91 17:36:51 EDT -#From: altschul@ray.nlm.nih.gov (Stephen Altschul) -#To: gish@ray.nlm.nih.gov -#Subject: Vanilla-flavored PAM-250 -# -# substitution scores for B, Z, X, and * were obtained with "pam" version 1.0.5 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 0 0 1 -1 -1 -2 -1 -1 -4 1 1 1 -6 -3 0 0 0 0 -8 -R -2 6 0 -1 -4 1 -1 -3 2 -2 -3 3 0 -4 0 0 -1 2 -4 -2 -1 0 -1 -8 -N 0 0 2 2 -4 1 1 0 2 -2 -3 1 -2 -4 -1 1 0 -4 -2 -2 2 1 0 -8 -D 0 -1 2 4 -5 2 3 1 1 -2 -4 0 -3 -6 -1 0 0 -7 -4 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 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 -2 -2 -1 -8 -B 0 -1 2 3 -4 1 3 0 1 -2 -3 1 -2 -4 -1 0 0 -5 -3 -2 3 2 -1 -8 -Z 0 0 1 3 -5 3 3 0 2 -2 -3 0 -2 -5 0 0 -1 -6 -4 -2 2 3 -1 -8 -X 0 -1 0 -1 -3 -1 -1 -1 -1 -1 -1 -1 -1 -2 -1 0 0 -4 -2 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/EDNAFULL b/maven-src/target/classes/java/jaligner/matrix/matrices/EDNAFULL deleted file mode 100644 index bfec6d9..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/EDNAFULL +++ /dev/null @@ -1,25 +0,0 @@ -# -# This matrix was created by Todd Lowe 12/10/92 -# -# Uses ambiguous nucleotide codes, probabilities rounded to -# nearest integer -# -# Lowest score = -4, Highest score = 5 -# - A T G C S W R Y K M B V H D N U -A 5 -4 -4 -4 -4 1 1 -4 -4 1 -4 -1 -1 -1 -2 -4 -T -4 5 -4 -4 -4 1 -4 1 1 -4 -1 -4 -1 -1 -2 5 -G -4 -4 5 -4 1 -4 1 -4 1 -4 -1 -1 -4 -1 -2 -4 -C -4 -4 -4 5 1 -4 -4 1 -4 1 -1 -1 -1 -4 -2 -4 -S -4 -4 1 1 -1 -4 -2 -2 -2 -2 -1 -1 -3 -3 -1 -4 -W 1 1 -4 -4 -4 -1 -2 -2 -2 -2 -3 -3 -1 -1 -1 1 -R 1 -4 1 -4 -2 -2 -1 -4 -2 -2 -3 -1 -3 -1 -1 -4 -Y -4 1 -4 1 -2 -2 -4 -1 -2 -2 -1 -3 -1 -3 -1 1 -K -4 1 1 -4 -2 -2 -2 -2 -1 -4 -1 -3 -3 -1 -1 1 -M 1 -4 -4 1 -2 -2 -2 -2 -4 -1 -3 -1 -1 -3 -1 -4 -B -4 -1 -1 -1 -1 -3 -3 -1 -1 -3 -1 -2 -2 -2 -1 -1 -V -1 -4 -1 -1 -1 -3 -1 -3 -3 -1 -2 -1 -2 -2 -1 -4 -H -1 -1 -4 -1 -3 -1 -3 -1 -3 -1 -2 -2 -1 -2 -1 -1 -D -1 -1 -1 -4 -3 -1 -1 -3 -1 -3 -2 -2 -2 -1 -1 -1 -N -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -U -4 5 -4 -4 -4 1 -4 1 1 -4 -1 -4 -1 -1 -2 5 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/GONNET b/maven-src/target/classes/java/jaligner/matrix/matrices/GONNET deleted file mode 100644 index d7bd4f4..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/GONNET +++ /dev/null @@ -1,26 +0,0 @@ -# PAM 250 matrix recommended by Gonnet, Cohen & Benner -# Science June 5, 1992. -# Values rounded to nearest integer - C S T P A G N D E Q H R K M I L V F Y W X * -C 12 0 0 -3 0 -2 -2 -3 -3 -2 -1 -2 -3 -1 -1 -2 0 -1 0 -1 -3 -8 -S 0 2 2 0 1 0 1 0 0 0 0 0 0 -1 -2 -2 -1 -3 -2 -3 0 -8 -T 0 2 2 0 1 -1 0 0 0 0 0 0 0 -1 -1 -1 0 -2 -2 -4 0 -8 -P -3 0 0 8 0 -2 -1 -1 0 0 -1 -1 -1 -2 -3 -2 -2 -4 -3 -5 -1 -8 -A 0 1 1 0 2 0 0 0 0 0 -1 -1 0 -1 -1 -1 0 -2 -2 -4 0 -8 -G -2 0 -1 -2 0 7 0 0 -1 -1 -1 -1 -1 -4 -4 -4 -3 -5 -4 -4 -1 -8 -N -2 1 0 -1 0 0 4 2 1 1 1 0 1 -2 -3 -3 -2 -3 -1 -4 0 -8 -D -3 0 0 -1 0 0 2 5 3 1 0 0 0 -3 -4 -4 -3 -4 -3 -5 -1 -8 -E -3 0 0 0 0 -1 1 3 4 2 0 0 1 -2 -3 -3 -2 -4 -3 -4 -1 -8 -Q -2 0 0 0 0 -1 1 1 2 3 1 2 2 -1 -2 -2 -2 -3 -2 -3 -1 -8 -H -1 0 0 -1 -1 -1 1 0 0 1 6 1 1 -1 -2 -2 -2 0 2 -1 -1 -8 -R -2 0 0 -1 -1 -1 0 0 0 2 1 5 3 -2 -2 -2 -2 -3 -2 -2 -1 -8 -K -3 0 0 -1 0 -1 1 0 1 2 1 3 3 -1 -2 -2 -2 -3 -2 -4 -1 -8 -M -1 -1 -1 -2 -1 -4 -2 -3 -2 -1 -1 -2 -1 4 2 3 2 2 0 -1 -1 -8 -I -1 -2 -1 -3 -1 -4 -3 -4 -3 -2 -2 -2 -2 2 4 3 3 1 -1 -2 -1 -8 -L -2 -2 -1 -2 -1 -4 -3 -4 -3 -2 -2 -2 -2 3 3 4 2 2 0 -1 -1 -8 -V 0 -1 0 -2 0 -3 -2 -3 -2 -2 -2 -2 -2 2 3 2 3 0 -1 -3 -1 -8 -F -1 -3 -2 -4 -2 -5 -3 -4 -4 -3 0 -3 -3 2 1 2 0 7 5 4 -2 -8 -Y 0 -2 -2 -3 -2 -4 -1 -3 -3 -2 2 -2 -2 0 -1 0 -1 5 8 4 -2 -8 -W -1 -3 -4 -5 -4 -4 -4 -5 -4 -3 -1 -2 -4 -1 -2 -1 -3 4 4 14 -4 -8 -X -3 0 0 -1 0 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -2 -2 -4 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/IDENTITY b/maven-src/target/classes/java/jaligner/matrix/matrices/IDENTITY deleted file mode 100644 index 63913d5..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/IDENTITY +++ /dev/null @@ -1,25 +0,0 @@ - A R N B D C Q Z E G H I L K M F P S T W Y V X * -A 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -R -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -N -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -B -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -D -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -C -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -Q -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -Z -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -E -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -G -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -H -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -I -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -L -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -K -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -M -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -F -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -P -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -S -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -10000 -T -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -10000 -W -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -10000 -Y -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -10000 -V -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 1 -10000 -10000 -X -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 0 -10000 -* -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 -10000 0 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/MATCH b/maven-src/target/classes/java/jaligner/matrix/matrices/MATCH deleted file mode 100644 index cda9e49..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/MATCH +++ /dev/null @@ -1,25 +0,0 @@ - A R N B D C Q Z E G H I L K M F P S T W Y V X * -A 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -R -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -N -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -B -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -D -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -C -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -Q -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -Z -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -E -1 -1 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1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 -1 -* -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM10 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM10 deleted file mode 100644 index c164b06..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM10 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 10 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -8.27, Entropy = 3.43 bits -# -# Lowest score = -23, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 7 -10 -7 -6 -10 -7 -5 -4 -11 -8 -9 -10 -8 -12 -4 -3 -3 -20 -11 -5 -6 -6 -6 -23 -R -10 9 -9 -17 -11 -4 -15 -13 -4 -8 -12 -2 -7 -12 -7 -6 -10 -5 -14 -11 -11 -7 -9 -23 -N -7 -9 9 -1 -17 -7 -5 -6 -2 -8 -10 -4 -15 -12 -9 -2 -5 -11 -7 -12 7 -6 -6 -23 -D -6 -17 -1 8 -21 -6 0 -6 -7 -11 -19 -8 -17 -21 -12 -7 -8 -21 -17 -11 7 -1 -9 -23 -C -10 -11 -17 -21 10 -20 -20 -13 -10 -9 -21 -20 -20 -19 -11 -6 -11 -22 -7 -9 -18 -20 -13 -23 -Q -7 -4 -7 -6 -20 9 -1 -10 -2 -11 -8 -6 -7 -19 -6 -8 -9 -19 -18 -10 -6 7 -8 -23 -E -5 -15 -5 0 -20 -1 8 -7 -9 -8 -13 -7 -10 -20 -9 -7 -9 -23 -11 -10 -1 7 -8 -23 -G -4 -13 -6 -6 -13 -10 -7 7 -13 -17 -14 -10 -12 -12 -10 -4 -10 -21 -20 -9 -6 -8 -8 -23 -H -11 -4 -2 -7 -10 -2 -9 -13 10 -13 -9 -10 -17 -9 -7 -9 -11 -10 -6 -9 -4 -4 -8 -23 -I -8 -8 -8 -11 -9 -11 -8 -17 -13 9 -4 -9 -3 -5 -12 -10 -5 -20 -9 -1 -9 -9 -8 -23 -L -9 -12 -10 -19 -21 -8 -13 -14 -9 -4 7 -11 -2 -5 -10 -12 -10 -9 -10 -5 -12 -10 -9 -23 -K -10 -2 -4 -8 -20 -6 -7 -10 -10 -9 -11 7 -4 -20 -10 -7 -6 -18 -12 -13 -5 -6 -8 -23 -M -8 -7 -15 -17 -20 -7 -10 -12 -17 -3 -2 -4 12 -7 -11 -8 -7 -19 -17 -4 -16 -8 -9 -23 -F -12 -12 -12 -21 -19 -19 -20 -12 -9 -5 -5 -20 -7 9 -13 -9 -12 -7 -1 -12 -14 -20 -12 -23 -P -4 -7 -9 -12 -11 -6 -9 -10 -7 -12 -10 -10 -11 -13 8 -4 -7 -20 -20 -9 -10 -7 -8 -23 -S -3 -6 -2 -7 -6 -8 -7 -4 -9 -10 -12 -7 -8 -9 -4 7 -2 -8 -10 -10 -4 -8 -6 -23 -T -3 -10 -5 -8 -11 -9 -9 -10 -11 -5 -10 -6 -7 -12 -7 -2 8 -19 -9 -6 -6 -9 -7 -23 -W -20 -5 -11 -21 -22 -19 -23 -21 -10 -20 -9 -18 -19 -7 -20 -8 -19 13 -8 -22 -13 -21 -16 -23 -Y -11 -14 -7 -17 -7 -18 -11 -20 -6 -9 -10 -12 -17 -1 -20 -10 -9 -8 10 -10 -9 -13 -11 -23 -V -5 -11 -12 -11 -9 -10 -10 -9 -9 -1 -5 -13 -4 -12 -9 -10 -6 -22 -10 8 -11 -10 -8 -23 -B -6 -11 7 7 -18 -6 -1 -6 -4 -9 -12 -5 -16 -14 -10 -4 -6 -13 -9 -11 7 -3 -8 -23 -Z -6 -7 -6 -1 -20 7 7 -8 -4 -9 -10 -6 -8 -20 -7 -8 -9 -21 -13 -10 -3 7 -8 -23 -X -6 -9 -6 -9 -13 -8 -8 -8 -8 -8 -9 -8 -9 -12 -8 -6 -7 -16 -11 -8 -8 -8 -8 -23 -* -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 -23 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM100 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM100 deleted file mode 100644 index 2e33dd3..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM100 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 100 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.99, Entropy = 1.18 bits -# -# Lowest score = -9, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -3 -1 -1 -3 -2 0 1 -3 -2 -3 -3 -2 -5 1 1 1 -7 -4 0 -1 -1 -1 -9 -R -3 7 -2 -4 -5 1 -3 -5 1 -3 -5 2 -1 -6 -1 -1 -3 1 -6 -4 -3 -1 -2 -9 -N -1 -2 5 3 -5 -1 1 -1 2 -3 -4 1 -4 -5 -2 1 0 -5 -2 -3 4 0 -1 -9 -D -1 -4 3 5 -7 0 4 -1 -1 -4 -6 -1 -5 -8 -3 -1 -2 -9 -6 -4 4 3 -2 -9 -C -3 -5 -5 -7 9 -8 -8 -5 -4 -3 -8 -8 -7 -7 -4 -1 -4 -9 -1 -3 -6 -8 -5 -9 -Q -2 1 -1 0 -8 6 2 -3 3 -4 -2 0 -2 -7 -1 -2 -2 -7 -6 -3 0 5 -2 -9 -E 0 -3 1 4 -8 2 5 -1 -1 -3 -5 -1 -4 -8 -2 -1 -2 -9 -5 -3 3 4 -2 -9 -G 1 -5 -1 -1 -5 -3 -1 5 -4 -5 -6 -3 -4 -6 -2 0 -2 -9 -7 -3 -1 -2 -2 -9 -H -3 1 2 -1 -4 3 -1 -4 7 -4 -3 -2 -4 -3 -1 -2 -3 -4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9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM110 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM110 deleted file mode 100644 index 25b2c01..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM110 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 110 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.81, Entropy = 1.07 bits -# -# Lowest score = -9, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -3 -1 -1 -3 -1 0 1 -3 -1 -3 -3 -2 -4 1 1 1 -7 -4 0 -1 -1 -1 -9 -R -3 7 -1 -4 -4 1 -3 -4 1 -3 -4 2 -1 -5 -1 -1 -2 1 -5 -4 -2 -1 -2 -9 -N -1 -1 4 2 -5 0 1 0 2 -2 -4 1 -3 -4 -2 1 0 -5 -2 -3 3 0 -1 -9 -D -1 -4 2 5 -7 1 4 0 0 -3 -6 -1 -5 -7 -3 -1 -1 -8 -5 -4 4 3 -2 -9 -C -3 -4 -5 -7 9 -7 -7 -5 -4 -3 -8 -7 -7 -6 -4 -1 -3 -9 -1 -3 -6 -7 -4 -9 -Q -1 1 0 1 -7 6 2 -3 3 -3 -2 0 -1 -6 0 -2 -2 -6 -6 -3 0 4 -1 -9 -E 0 -3 1 4 -7 2 5 -1 -1 -3 -5 -1 -3 -7 -2 -1 -2 -9 -5 -3 3 4 -2 -9 -G 1 -4 0 0 -5 -3 -1 5 -4 -4 -6 -3 -4 -5 -2 0 -2 -8 -7 -2 0 -2 -2 -9 -H -3 1 2 0 -4 3 -1 -4 7 -4 -3 -2 -4 -3 -1 -2 -3 -4 -1 -3 1 1 -2 -9 -I -1 -3 -2 -3 -3 -3 -3 -4 -4 6 1 -3 1 0 -4 -3 0 -7 -2 3 -3 -3 -2 -9 -L -3 -4 -4 -6 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ices/PAM120 deleted file mode 100644 index 3cbb04b..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM120 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 120 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.64, Entropy = 0.979 bits -# -# Lowest score = -8, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -3 -1 0 -3 -1 0 1 -3 -1 -3 -2 -2 -4 1 1 1 -7 -4 0 0 -1 -1 -8 -R -3 6 -1 -3 -4 1 -3 -4 1 -2 -4 2 -1 -5 -1 -1 -2 1 -5 -3 -2 -1 -2 -8 -N -1 -1 4 2 -5 0 1 0 2 -2 -4 1 -3 -4 -2 1 0 -4 -2 -3 3 0 -1 -8 -D 0 -3 2 5 -7 1 3 0 0 -3 -5 -1 -4 -7 -3 0 -1 -8 -5 -3 4 3 -2 -8 -C -3 -4 -5 -7 9 -7 -7 -4 -4 -3 -7 -7 -6 -6 -4 0 -3 -8 -1 -3 -6 -7 -4 -8 -Q -1 1 0 1 -7 6 2 -3 3 -3 -2 0 -1 -6 0 -2 -2 -6 -5 -3 0 4 -1 -8 -E 0 -3 1 3 -7 2 5 -1 -1 -3 -4 -1 -3 -7 -2 -1 -2 -8 -5 -3 3 4 -1 -8 -G 1 -4 0 0 -4 -3 -1 5 -4 -4 -5 -3 -4 -5 -2 1 -1 -8 -6 -2 0 -2 -2 -8 -H -3 1 2 0 -4 3 -1 -4 7 -4 -3 -2 -4 -3 -1 -2 -3 -3 -1 -3 1 1 -2 -8 -I -1 -2 -2 -3 -3 -3 -3 -4 -4 6 1 -3 1 0 -3 -2 0 -6 -2 3 -3 -3 -1 -8 -L -3 -4 -4 -5 -7 -2 -4 -5 -3 1 5 -4 3 0 -3 -4 -3 -3 -2 1 -4 -3 -2 -8 -K -2 2 1 -1 -7 0 -1 -3 -2 -3 -4 5 0 -7 -2 -1 -1 -5 -5 -4 0 -1 -2 -8 -M -2 -1 -3 -4 -6 -1 -3 -4 -4 1 3 0 8 -1 -3 -2 -1 -6 -4 1 -4 -2 -2 -8 -F -4 -5 -4 -7 -6 -6 -7 -5 -3 0 0 -7 -1 8 -5 -3 -4 -1 4 -3 -5 -6 -3 -8 -P 1 -1 -2 -3 -4 0 -2 -2 -1 -3 -3 -2 -3 -5 6 1 -1 -7 -6 -2 -2 -1 -2 -8 -S 1 -1 1 0 0 -2 -1 1 -2 -2 -4 -1 -2 -3 1 3 2 -2 -3 -2 0 -1 -1 -8 -T 1 -2 0 -1 -3 -2 -2 -1 -3 0 -3 -1 -1 -4 -1 2 4 -6 -3 0 0 -2 -1 -8 -W -7 1 -4 -8 -8 -6 -8 -8 -3 -6 -3 -5 -6 -1 -7 -2 -6 12 -2 -8 -6 -7 -5 -8 -Y -4 -5 -2 -5 -1 -5 -5 -6 -1 -2 -2 -5 -4 4 -6 -3 -3 -2 8 -3 -3 -5 -3 -8 -V 0 -3 -3 -3 -3 -3 -3 -2 -3 3 1 -4 1 -3 -2 -2 0 -8 -3 5 -3 -3 -1 -8 -B 0 -2 3 4 -6 0 3 0 1 -3 -4 0 -4 -5 -2 0 0 -6 -3 -3 4 2 -1 -8 -Z -1 -1 0 3 -7 4 4 -2 1 -3 -3 -1 -2 -6 -1 -1 -2 -7 -5 -3 2 4 -1 -8 -X -1 -2 -1 -2 -4 -1 -1 -2 -2 -1 -2 -2 -2 -3 -2 -1 -1 -5 -3 -1 -1 -1 -2 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM130 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM130 deleted file mode 100644 index 0b47a5d..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM130 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 130 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.48, Entropy = 0.895 bits -# -# Lowest score = -8, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -3 0 0 -3 -1 0 1 -2 -1 -3 -2 -2 -4 1 1 1 -6 -4 0 0 0 -1 -8 -R -3 6 -1 -3 -4 1 -3 -4 1 -2 -4 2 -1 -5 -1 -1 -2 1 -5 -3 -2 -1 -2 -8 -N 0 -1 4 2 -4 0 1 0 2 -2 -3 1 -3 -4 -1 1 0 -4 -2 -3 3 0 -1 -8 -D 0 -3 2 5 -6 1 3 0 0 -3 -5 -1 -4 -7 -2 0 -1 -7 -5 -3 4 3 -1 -8 -C -3 -4 -4 -6 9 -6 -6 -4 -4 -3 -7 -6 -6 -5 -3 0 -3 -8 -1 -2 -5 -6 -4 -8 -Q -1 1 0 1 -6 5 2 -2 3 -3 -2 0 -1 -6 0 -1 -2 -6 -5 -3 0 4 -1 -8 -E 0 -3 1 3 -6 2 5 -1 0 -2 -4 -1 -3 -6 -2 -1 -1 -8 -5 -3 2 4 -1 -8 -G 1 -4 0 0 -4 -2 -1 5 -3 -4 -5 -3 -4 -5 -2 1 -1 -7 -6 -2 0 -1 -2 -8 -H -2 1 2 0 -4 3 0 -3 7 -3 -3 -1 -3 -2 -1 -2 -2 -3 0 -3 1 1 -1 -8 -I -1 -2 -2 -3 -3 -3 -2 -4 -3 5 1 -2 2 0 -3 -2 0 -6 -2 3 -3 -3 -1 -8 -L -3 -4 -3 -5 -7 -2 -4 -5 -3 1 5 -4 3 1 -3 -4 -2 -2 -2 1 -4 -3 -2 -8 -K -2 2 1 -1 -6 0 -1 -3 -1 -2 -4 5 0 -6 -2 -1 0 -5 -5 -4 0 0 -1 -8 -M -2 -1 -3 -4 -6 -1 -3 -4 -3 2 3 0 8 -1 -3 -2 -1 -5 -4 1 -3 -2 -1 -8 -F -4 -5 -4 -7 -5 -6 -6 -5 -2 0 1 -6 -1 7 -5 -3 -4 -1 4 -2 -5 -6 -3 -8 -P 1 -1 -1 -2 -3 0 -2 -2 -1 -3 -3 -2 -3 -5 6 1 -1 -6 -6 -2 -2 -1 -1 -8 -S 1 -1 1 0 0 -1 -1 1 -2 -2 -4 -1 -2 -3 1 3 2 -2 -3 -2 0 -1 -1 -8 -T 1 -2 0 -1 -3 -2 -1 -1 -2 0 -2 0 -1 -4 -1 2 4 -6 -3 0 0 -2 -1 -8 -W -6 1 -4 -7 -8 -6 -8 -7 -3 -6 -2 -5 -5 -1 -6 -2 -6 12 -1 -7 -5 -7 -5 -8 -Y -4 -5 -2 -5 -1 -5 -5 -6 0 -2 -2 -5 -4 4 -6 -3 -3 -1 8 -3 -3 -5 -3 -8 -V 0 -3 -3 -3 -2 -3 -3 -2 -3 3 1 -4 1 -2 -2 -2 0 -7 -3 5 -3 -3 -1 -8 -B 0 -2 3 4 -5 0 2 0 1 -3 -4 0 -3 -5 -2 0 0 -5 -3 -3 3 2 -1 -8 -Z 0 -1 0 3 -6 4 4 -1 1 -3 -3 0 -2 -6 -1 -1 -2 -7 -5 -3 2 4 -1 -8 -X -1 -2 -1 -1 -4 -1 -1 -2 -1 -1 -2 -1 -1 -3 -1 -1 -1 -5 -3 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM140 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM140 deleted file mode 100644 index 022c61b..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM140 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 140 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.35, Entropy = 0.820 bits -# -# Lowest score = -8, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y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 1 0 0 -1 -1 1 -1 -2 -3 -1 -2 -3 1 3 2 -2 -3 -2 0 -1 0 -8 -T 1 -2 0 -1 -3 -2 -1 -1 -2 0 -2 0 -1 -4 0 2 4 -5 -3 0 0 -1 -1 -8 -W -6 1 -4 -7 -8 -5 -8 -7 -3 -6 -2 -4 -5 -1 -6 -2 -5 12 -1 -7 -5 -6 -5 -8 -Y -4 -5 -2 -5 -1 -5 -4 -6 0 -2 -2 -5 -4 4 -6 -3 -3 -1 8 -3 -3 -4 -3 -8 -V 0 -3 -2 -3 -2 -2 -2 -2 -3 3 1 -3 1 -2 -2 -2 0 -7 -3 5 -3 -2 -1 -8 -B 0 -2 3 4 -5 1 2 0 1 -2 -4 0 -3 -5 -2 0 0 -5 -3 -3 3 2 -1 -8 -Z 0 -1 1 3 -6 4 4 -1 1 -2 -3 0 -2 -6 -1 -1 -1 -6 -4 -2 2 4 -1 -8 -X -1 -1 -1 -1 -4 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 -1 -5 -3 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM150 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM150 deleted file mode 100644 index c010eef..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM150 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 150 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.25, Entropy = 0.754 bits -# -# Lowest score = -7, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -2 0 0 -2 -1 0 1 -2 -1 -2 -2 -1 -4 1 1 1 -6 -3 0 0 0 -1 -7 -R -2 6 -1 -2 -4 1 -2 -3 1 -2 -3 3 -1 -4 -1 -1 -2 1 -4 -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6 1 -4 -7 -7 -5 -7 -7 -3 -5 -2 -4 -5 -1 -6 -2 -5 12 -1 -6 -5 -6 -4 -7 -Y -3 -4 -2 -4 0 -4 -4 -5 0 -2 -2 -4 -3 5 -5 -3 -3 -1 8 -3 -3 -4 -3 -7 -V 0 -3 -2 -3 -2 -2 -2 -2 -3 3 1 -3 1 -2 -2 -1 0 -6 -3 4 -2 -2 -1 -7 -B 0 -2 3 3 -5 1 2 0 1 -2 -4 0 -3 -5 -2 0 0 -5 -3 -2 3 2 -1 -7 -Z 0 0 1 2 -6 4 4 -1 1 -2 -3 0 -2 -5 -1 -1 -1 -6 -4 -2 2 4 -1 -7 -X -1 -1 -1 -1 -3 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 -1 -4 -3 -1 -1 -1 -1 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM160 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM160 deleted file mode 100644 index f30d717..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM160 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 160 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -1.14, Entropy = 0.694 bits -# -# Lowest score = -7, Highest score = 12 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 -1 0 1 -2 -1 -2 -2 -1 -3 1 1 1 -5 -3 0 0 0 0 -7 -R -2 6 -1 -2 -3 1 -2 -3 1 -2 -3 3 -1 -4 -1 -1 -1 1 -4 -3 -1 0 -1 -7 -N 0 -1 3 2 -4 0 1 0 2 -2 -3 1 -2 -3 -1 1 0 -4 -2 -2 2 1 0 -7 -D 0 -2 2 4 -5 1 3 0 0 -3 -4 0 -3 -6 -2 0 -1 -6 -4 -3 3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-V 0 -3 -2 -3 -2 -2 -2 -2 -2 3 1 -3 1 -2 -2 -1 0 -6 -3 4 -2 -2 -1 -7 -B 0 -1 2 3 -4 1 2 0 1 -2 -4 0 -3 -4 -1 0 0 -5 -3 -2 3 2 -1 -7 -Z 0 0 1 2 -5 3 3 -1 1 -2 -3 0 -2 -5 -1 -1 -1 -6 -4 -2 2 3 -1 -7 -X 0 -1 0 -1 -3 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -4 -3 -1 -1 -1 -1 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM170 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM170 deleted file mode 100644 index ca090d6..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM170 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 170 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.57, Entropy = 0.640 bits -# -# Lowest score = -10, Highest score = 18 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -3 0 0 -3 -1 0 1 -3 -1 -3 -2 -2 -5 1 2 2 -8 -5 0 0 0 -1 -10 -R -3 8 -1 -3 -5 1 -2 -4 2 -3 -4 4 -1 -6 -1 -1 -2 2 -6 -4 -2 0 -2 -10 -N 0 -1 4 3 -5 0 2 0 2 -3 -4 1 -3 -5 -1 1 0 -5 -3 -3 3 1 -1 -10 -D 0 -3 3 6 -7 2 5 0 0 -4 -6 -1 -4 -8 -2 0 -1 -9 -6 -4 5 4 -1 -10 -C -3 -5 -5 -7 13 -8 -8 -5 -5 -3 -9 -8 -7 -6 -4 0 -3 -10 0 -3 -6 -8 -4 -10 -Q -1 1 0 2 -8 6 3 -2 4 -3 -2 0 -1 -7 0 -1 -2 -7 -6 -3 1 5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z 0 0 1 4 -8 5 5 -1 2 -3 -4 0 -2 -7 -1 -1 -1 -8 -6 -3 3 5 -1 -10 -X -1 -2 -1 -1 -4 -1 -1 -2 -1 -1 -2 -2 -1 -4 -1 0 -1 -6 -4 -1 -1 -1 -2 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM180 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM180 deleted file mode 100644 index 84addeb..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM180 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 180 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.51, Entropy = 0.591 bits -# -# Lowest score = -10, Highest score = 18 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -3 0 0 -3 -1 0 1 -2 -1 -3 -2 -2 -5 1 1 2 -8 -5 0 0 0 -1 -10 -R -3 8 -1 -3 -5 1 -2 -4 2 -3 -4 4 -1 -6 -1 -1 -2 2 -6 -4 -2 0 -2 -10 -N 0 -1 4 3 -5 0 2 0 2 -3 -4 1 -3 -5 -1 1 0 -5 -2 -3 3 1 -1 -10 -D 0 -3 3 5 -7 2 4 0 0 -3 -6 0 -4 -8 -2 0 -1 -9 -6 -3 4 3 -1 -10 -C -3 -5 -5 -7 13 -7 -7 -5 -4 -3 -8 -7 -7 -6 -4 0 -3 -10 0 -3 -6 -7 -4 -10 -Q -1 1 0 2 -7 6 3 -2 4 -3 -2 0 -1 -6 0 -1 -2 -6 -6 -3 1 5 -1 -10 -E 0 -2 2 4 -7 3 5 0 0 -3 -5 -1 -3 -7 -1 -1 -1 -9 -6 -3 3 5 -1 -10 -G 1 -4 0 0 -5 -2 0 6 -3 -4 -6 -3 -4 -6 -1 1 -1 -9 -7 -2 0 -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 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM190 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM190 deleted file mode 100644 index 6840cc4..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM190 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 190 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.35, Entropy = 0.547 bits -# -# Lowest score = -9, Highest score = 18 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -2 0 0 -3 -1 0 1 -2 -1 -3 -2 -2 -5 1 1 2 -7 -4 0 0 0 0 -9 -R -2 8 -1 -2 -5 1 -2 -4 2 -3 -4 4 -1 -6 0 -1 -2 2 -5 -3 -1 0 -1 -9 -N 0 -1 3 3 -5 1 2 0 2 -2 -4 1 -3 -4 -1 1 0 -5 -2 -3 3 1 -1 -9 -D 0 -2 3 5 -7 2 4 0 0 -3 -5 0 -4 -7 -2 0 -1 -8 -5 -3 4 3 -1 -9 -C -3 -5 -5 -7 13 -7 -7 -4 -4 -3 -8 -7 -7 -6 -4 0 -3 -9 0 -3 -6 -7 -4 -9 -Q -1 1 1 2 -7 6 3 -2 3 -3 -2 1 -1 -6 0 -1 -1 -6 -5 -3 1 4 -1 -9 -E 0 -2 2 4 -7 3 5 0 0 -3 -4 -1 -3 -7 -1 0 -1 -9 -5 -3 3 4 -1 -9 -G 1 -4 0 0 -4 -2 0 6 -3 -4 -5 -3 -4 -6 -1 1 -1 -9 -7 -2 0 -1 -1 -9 -H -2 2 2 0 -4 3 0 -3 8 -3 -3 -1 -3 -2 -1 -1 -2 -3 0 -3 1 2 -1 -9 -I -1 -3 -2 -3 -3 -3 -3 -4 -3 6 2 -3 2 1 -3 -2 0 -7 -2 4 -3 -3 -1 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ted file mode 100644 index 58cc98c..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM20 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 20 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -6.18, Entropy = 2.95 bits -# -# Lowest score = -19, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 6 -8 -5 -4 -8 -5 -3 -3 -8 -6 -7 -8 -6 -9 -2 -1 -1 -16 -9 -3 -5 -4 -4 -19 -R -8 9 -7 -12 -9 -2 -11 -11 -3 -6 -10 -1 -5 -10 -5 -4 -8 -3 -11 -9 -9 -5 -7 -19 -N -5 -7 8 1 -13 -5 -3 -4 -1 -6 -8 -2 -11 -10 -7 -1 -3 -9 -5 -9 6 -4 -4 -19 -D -4 -12 1 8 -16 -4 2 -4 -5 -9 -15 -6 -13 -17 -9 -5 -6 -17 -13 -9 6 0 -7 -19 -C -8 -9 -13 -16 10 -16 -16 -11 -8 -7 -17 -16 -16 -15 -9 -4 -9 -18 -5 -7 -14 -16 -11 -19 -Q -5 -2 -5 -4 -16 9 0 -8 0 -9 -6 -4 -5 -15 -4 -6 -7 -15 -14 -8 -4 7 -6 -19 -E -3 -11 -3 2 -16 0 8 -5 -6 -6 -10 -5 -8 -16 -7 -5 -7 -19 -9 -8 0 6 -6 -19 -G -3 -11 -4 -4 -11 -8 -5 7 -10 -13 -12 -8 -10 -10 -7 -3 -7 -17 -16 -7 -4 -6 -6 -19 -H -8 -3 -1 -5 -8 0 -6 -10 9 -11 -7 -8 -13 -7 -5 -7 -8 -8 -4 -7 -2 -2 -6 -19 -I -6 -6 -6 -9 -7 -9 -6 -13 -11 9 -2 -7 -2 -3 -10 -8 -3 -16 -7 1 -7 -7 -6 -19 -L -7 -10 -8 -15 -17 -6 -10 -12 -7 -2 7 -9 0 -4 -8 -9 -8 -7 -8 -3 -10 -8 -7 -19 -K -8 -1 -2 -6 -16 -4 -5 -8 -8 -7 -9 7 -3 -16 -8 -5 -4 -14 -10 -10 -3 -5 -6 -19 -M -6 -5 -11 -13 -16 -5 -8 -10 -13 -2 0 -3 11 -5 -9 -6 -5 -15 -13 -2 -12 -6 -6 -19 -F -9 -10 -10 -17 -15 -15 -16 -10 -7 -3 -4 -16 -5 9 -11 -7 -10 -6 1 -9 -12 -16 -9 -19 -P -2 -5 -7 -9 -9 -4 -7 -7 -5 -10 -8 -8 -9 -11 8 -3 -5 -16 -16 -7 -8 -5 -6 -19 -S -1 -4 -1 -5 -4 -6 -5 -3 -7 -8 -9 -5 -6 -7 -3 7 0 -6 -8 -8 -2 -6 -4 -19 -T -1 -8 -3 -6 -9 -7 -7 -7 -8 -3 -8 -4 -5 -10 -5 0 7 -15 -7 -4 -4 -7 -5 -19 -W -16 -3 -9 -17 -18 -15 -19 -17 -8 -16 -7 -14 -15 -6 -16 -6 -15 13 -6 -18 -11 -17 -13 -19 -Y -9 -11 -5 -13 -5 -14 -9 -16 -4 -7 -8 -10 -13 1 -16 -8 -7 -6 10 -8 -7 -11 -9 -19 -V -3 -9 -9 -9 -7 -8 -8 -7 -7 1 -3 -10 -2 -9 -7 -8 -4 -18 -8 7 -9 -8 -6 -19 -B -5 -9 6 6 -14 -4 0 -4 -2 -7 -10 -3 -12 -12 -8 -2 -4 -11 -7 -9 6 -1 -6 -19 -Z -4 -5 -4 0 -16 7 6 -6 -2 -7 -8 -5 -6 -16 -5 -6 -7 -17 -11 -8 -1 6 -6 -19 -X -4 -7 -4 -7 -11 -6 -6 -6 -6 -6 -7 -6 -6 -9 -6 -4 -5 -13 -9 -6 -6 -6 -6 -19 -* -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 -19 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM200 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM200 deleted file mode 100644 index d4edff2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM200 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 200 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.23, Entropy = 0.507 bits -# -# Lowest score = -9, Highest score = 18 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 3 -2 0 0 -3 -1 0 1 -2 -1 -2 -2 -2 -4 1 1 1 -7 -4 0 0 0 0 -9 -R -2 7 0 -2 -4 1 -2 -4 2 -2 -4 4 -1 -5 0 -1 -1 2 -5 -3 -1 0 -1 -9 -N 0 0 3 3 -5 1 2 0 2 -2 -4 1 -2 -4 -1 1 0 -5 -2 -2 3 1 0 -9 -D 0 -2 3 5 -6 2 4 0 0 -3 -5 0 -4 -7 -2 0 0 -8 -5 -3 4 3 -1 -9 -C -3 -4 -5 -6 12 -7 -7 -4 -4 -3 -7 -7 -6 -6 -4 0 -3 -9 0 -2 -5 -7 -4 -9 -Q -1 1 1 2 -7 5 3 -2 3 -3 -2 1 -1 -6 0 -1 -1 -6 -5 -3 1 4 -1 -9 -E 0 -2 2 4 -7 3 5 0 0 -3 -4 0 -3 -7 -1 0 -1 -9 -5 -2 3 4 -1 -9 -G 1 -4 0 0 -4 -2 0 6 -3 -3 -5 -2 -4 -6 -1 1 0 -8 -6 -2 0 -1 -1 -9 -H -2 2 2 0 -4 3 0 -3 8 -3 -3 -1 -3 -2 -1 -1 -2 -3 0 -3 1 2 -1 -9 -I -1 -2 -2 -3 -3 -3 -3 -3 -3 6 2 -2 2 1 -3 -2 0 -6 -2 4 -3 -3 -1 -9 -L -2 -4 -4 -5 -7 -2 -4 -5 -3 2 7 -4 4 2 -3 -4 -2 -2 -2 2 -4 -3 -2 -9 -K -2 4 1 0 -7 1 0 -2 -1 -2 -4 6 1 -7 -2 0 0 -4 -5 -3 0 0 -1 -9 -M -2 -1 -2 -4 -6 -1 -3 -4 -3 2 4 1 8 0 -3 -2 -1 -5 -3 2 -3 -2 -1 -9 -F -4 -5 -4 -7 -6 -6 -7 -6 -2 1 2 -7 0 10 -6 -4 -4 0 7 -2 -6 -6 -3 -9 -P 1 0 -1 -2 -4 0 -1 -1 -1 -3 -3 -2 -3 -6 7 1 0 -7 -6 -2 -1 -1 -1 -9 -S 1 -1 1 0 0 -1 0 1 -1 -2 -4 0 -2 -4 1 2 2 -3 -3 -1 1 -1 0 -9 -T 1 -1 0 0 -3 -1 -1 0 -2 0 -2 0 -1 -4 0 2 4 -6 -3 0 0 -1 0 -9 -W -7 2 -5 -8 -9 -6 -9 -8 -3 -6 -2 -4 -5 0 -7 -3 -6 18 -1 -8 -6 -7 -5 -9 -Y -4 -5 -2 -5 0 -5 -5 -6 0 -2 -2 -5 -3 7 -6 -3 -3 -1 11 -3 -4 -5 -3 -9 -V 0 -3 -2 -3 -2 -3 -2 -2 -3 4 2 -3 2 -2 -2 -1 0 -8 -3 5 -3 -2 -1 -9 -B 0 -1 3 4 -5 1 3 0 1 -3 -4 0 -3 -6 -1 1 0 -6 -4 -3 3 2 -1 -9 -Z 0 0 1 3 -7 4 4 -1 2 -3 -3 0 -2 -6 -1 -1 -1 -7 -5 -2 2 4 -1 -9 -X 0 -1 0 -1 -4 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -5 -3 -1 -1 -1 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM210 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM210 deleted file mode 100644 index 0b49af5..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM210 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 210 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.12, Entropy = 0.470 bits -# -# Low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 -9 -S 1 0 1 0 0 -1 0 1 -1 -2 -3 0 -2 -4 1 2 2 -3 -3 -1 1 0 0 -9 -T 1 -1 0 0 -3 -1 -1 0 -2 0 -2 0 -1 -4 0 2 3 -6 -3 0 0 -1 0 -9 -W -7 2 -5 -8 -9 -6 -8 -8 -3 -6 -2 -4 -5 0 -7 -3 -6 18 -1 -7 -6 -7 -5 -9 -Y -4 -5 -2 -5 0 -5 -5 -6 0 -1 -1 -5 -3 7 -6 -3 -3 -1 11 -3 -4 -5 -3 -9 -V 0 -3 -2 -3 -2 -2 -2 -2 -3 4 2 -3 2 -2 -2 -1 0 -7 -3 5 -2 -2 -1 -9 -B 0 -1 3 4 -5 1 3 0 1 -3 -4 0 -3 -5 -1 1 0 -6 -4 -2 3 2 -1 -9 -Z 0 0 1 3 -6 4 4 -1 2 -3 -3 0 -2 -6 0 0 -1 -7 -5 -2 2 4 -1 -9 -X 0 -1 0 -1 -4 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -5 -3 -1 -1 -1 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM220 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM220 deleted file mode 100644 index 0834a92..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM220 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 220 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -1.06, Entropy = 0.437 bits -# -# Lowest score = -8, Highest score = 17 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 -1 0 1 -2 -1 -2 -1 -1 -4 1 1 1 -6 -4 0 0 0 0 -8 -R -2 7 0 -2 -4 1 -1 -3 2 -2 -3 4 -1 -5 0 0 -1 2 -5 -3 -1 0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-5 0 -6 -3 -6 17 0 -7 -6 -7 -5 -8 -Y -4 -5 -2 -5 0 -5 -5 -6 0 -1 -1 -5 -3 7 -6 -3 -3 0 11 -3 -3 -5 -3 -8 -V 0 -3 -2 -3 -2 -2 -2 -2 -3 4 2 -3 2 -2 -1 -1 0 -7 -3 5 -2 -2 -1 -8 -B 0 -1 2 4 -5 1 3 0 1 -2 -4 0 -3 -5 -1 0 0 -6 -3 -2 3 2 -1 -8 -Z 0 0 1 3 -6 4 4 -1 2 -2 -3 0 -2 -6 0 0 -1 -7 -5 -2 2 4 -1 -8 -X 0 -1 0 -1 -3 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -5 -3 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM230 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM230 deleted file mode 100644 index c9ff6db..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM230 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 230 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -0.991, Entropy = 0.407 bits -# -# Lowest score = -8, Highest score = 17 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 -1 0 1 -2 -1 -2 -1 -1 -4 1 1 1 -6 -4 0 0 0 0 -8 -R -2 7 0 -2 -4 1 -1 -3 2 -2 -3 4 -1 -5 0 0 -1 2 -5 -3 -1 0 -1 -8 -N 0 0 2 2 -4 1 1 0 2 -2 -3 1 -2 -4 -1 1 0 -4 -2 -2 2 1 0 -8 -D 0 -2 2 4 -6 2 4 1 1 -3 -4 0 -3 -6 -1 0 0 -7 -5 -2 3 3 -1 -8 -C -2 -4 -4 -6 12 -6 -6 -4 -4 -2 -7 -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-1 -8 -B 0 -1 2 3 -5 1 3 0 1 -2 -4 1 -2 -5 -1 0 0 -6 -3 -2 3 2 -1 -8 -Z 0 0 1 3 -6 4 4 -1 2 -2 -3 0 -2 -6 0 0 -1 -6 -5 -2 2 4 -1 -8 -X 0 -1 0 -1 -3 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -4 -3 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM240 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM240 deleted file mode 100644 index c17cdf8..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM240 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 240 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -0.923, Entropy = 0.379 bits -# -# Lowest score = -8, Highest score = 17 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 0 0 1 -1 -1 -2 -1 -1 -4 1 1 1 -6 -4 0 0 0 0 -8 -R -2 6 0 -1 -4 1 -1 -3 2 -2 -3 3 0 -5 0 0 -1 2 -4 -3 -1 0 -1 -8 -N 0 0 2 2 -4 1 1 0 2 -2 -3 1 -2 -4 -1 1 0 -4 -2 -2 2 1 0 -8 -D 0 -1 2 4 -5 2 4 1 1 -2 -4 0 -3 -6 -1 0 0 -7 -4 -2 3 3 -1 -8 -C -2 -4 -4 -5 12 -6 -6 -4 -4 -2 -6 -6 -5 -5 -3 0 -2 -8 0 -2 -5 -6 -3 -8 -Q 0 1 1 2 -6 4 3 -1 3 -2 -2 1 -1 -5 0 -1 -1 -5 -4 -2 1 3 -1 -8 -E 0 -1 1 4 -6 3 4 0 1 -2 -3 0 -2 -6 -1 0 0 -7 -4 -2 3 3 -1 -8 -G 1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-2 -1 0 0 -4 -2 -1 -1 -1 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM250 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM250 deleted file mode 100644 index 17e9e60..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM250 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 250 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -0.844, Entropy = 0.354 bits -# -# Lowest score = -8, Highest score = 17 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 0 0 1 -1 -1 -2 -1 -1 -3 1 1 1 -6 -3 0 0 0 0 -8 -R -2 6 0 -1 -4 1 -1 -3 2 -2 -3 3 0 -4 0 0 -1 2 -4 -2 -1 0 -1 -8 -N 0 0 2 2 -4 1 1 0 2 -2 -3 1 -2 -3 0 1 0 -4 -2 -2 2 1 0 -8 -D 0 -1 2 4 -5 2 3 1 1 -2 -4 0 -3 -6 -1 0 0 -7 -4 -2 3 3 -1 -8 -C -2 -4 -4 -5 12 -5 -5 -3 -3 -2 -6 -5 -5 -4 -3 0 -2 -8 0 -2 -4 -5 -3 -8 -Q 0 1 1 2 -5 4 2 -1 3 -2 -2 1 -1 -5 0 -1 -1 -5 -4 -2 1 3 -1 -8 -E 0 -1 1 3 -5 2 4 0 1 -2 -3 0 -2 -5 -1 0 0 -7 -4 -2 3 3 -1 -8 -G 1 -3 0 1 -3 -1 0 5 -2 -3 -4 -2 -3 -5 0 1 0 -7 -5 -1 0 0 -1 -8 -H -1 2 2 1 -3 3 1 -2 6 -2 -2 0 -2 -2 0 -1 -1 -3 0 -2 1 2 -1 -8 -I -1 -2 -2 -2 -2 -2 -2 -3 -2 5 2 -2 2 1 -2 -1 0 -5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ode 100644 index 5098eb4..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM260 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 260 substitution matrix, scale = ln(2)/3 = 0.231049 -# -# Expected score = -0.794, Entropy = 0.330 bits -# -# Lowest score = -7, Highest score = 17 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -1 0 0 -2 0 0 1 -1 0 -2 -1 -1 -3 1 1 1 -6 -3 0 0 0 0 -7 -R -1 6 0 -1 -4 1 -1 -2 2 -2 -3 3 0 -4 0 0 -1 2 -4 -2 -1 0 -1 -7 -N 0 0 2 2 -3 1 1 0 2 -2 -3 1 -2 -3 0 1 0 -4 -2 -2 2 1 0 -7 -D 0 -1 2 4 -5 2 3 1 1 -2 -4 0 -2 -5 -1 0 0 -6 -4 -2 3 3 -1 -7 -C -2 -4 -3 -5 12 -5 -5 -3 -3 -2 -6 -5 -5 -4 -3 0 -2 -7 0 -2 -4 -5 -3 -7 -Q 0 1 1 2 -5 4 2 -1 3 -2 -2 1 -1 -4 0 0 -1 -5 -4 -2 1 3 0 -7 -E 0 -1 1 3 -5 2 4 0 1 -2 -3 0 -2 -5 0 0 0 -7 -4 -2 3 3 -1 -7 -G 1 -2 0 1 -3 -1 0 5 -2 -2 -4 -2 -3 -5 0 1 0 -7 -5 -1 1 0 -1 -7 -H -1 2 2 1 -3 3 1 -2 6 -2 -2 0 -2 -2 0 -1 -1 -3 0 -2 1 2 -1 -7 -I 0 -2 -2 -2 -2 -2 -2 -2 -2 4 2 -2 2 1 -2 -1 0 -5 -1 4 -2 -2 -1 -7 -L -2 -3 -3 -4 -6 -2 -3 -4 -2 2 6 -3 4 2 -2 -3 -2 -2 -1 2 -3 -2 -1 -7 -K -1 3 1 0 -5 1 0 -2 0 -2 -3 4 0 -5 -1 0 0 -3 -4 -2 1 0 -1 -7 -M -1 0 -2 -2 -5 -1 -2 -3 -2 2 4 0 6 0 -2 -1 -1 -4 -2 2 -2 -2 -1 -7 -F -3 -4 -3 -5 -4 -4 -5 -5 -2 1 2 -5 0 9 -4 -3 -3 0 7 -1 -4 -5 -2 -7 -P 1 0 0 -1 -3 0 0 0 0 -2 -2 -1 -2 -4 6 1 0 -5 -5 -1 -1 0 -1 -7 -S 1 0 1 0 0 0 0 1 -1 -1 -3 0 -1 -3 1 1 1 -2 -3 -1 0 0 0 -7 -T 1 -1 0 0 -2 -1 0 0 -1 0 -2 0 -1 -3 0 1 2 -5 -3 0 0 0 0 -7 -W -6 2 -4 -6 -7 -5 -7 -7 -3 -5 -2 -3 -4 0 -5 -2 -5 17 0 -6 -5 -6 -4 -7 -Y -3 -4 -2 -4 0 -4 -4 -5 0 -1 -1 -4 -2 7 -5 -3 -3 0 10 -2 -3 -4 -2 -7 -V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 -2 -2 -1 -7 -B 0 -1 2 3 -4 1 3 1 1 -2 -3 1 -2 -4 -1 0 0 -5 -3 -2 3 2 0 -7 -Z 0 0 1 3 -5 3 3 0 2 -2 -2 0 -2 -5 0 0 0 -6 -4 -2 2 3 -1 -7 -X 0 -1 0 -1 -3 0 -1 -1 -1 -1 -1 -1 -1 -2 -1 0 0 -4 -2 -1 0 -1 -1 -7 -* -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 -7 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM270 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM270 deleted file mode 100644 index 322fcdb..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM270 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 270 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.969, Entropy = 0.309 bits -# -# Lowest score = -10, Highest score =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1 0 1 -1 -2 -3 0 -2 -4 1 2 2 -3 -4 -1 1 0 0 -10 -T 1 -1 1 0 -3 -1 0 0 -1 0 -2 0 -1 -4 0 2 3 -6 -3 0 0 -1 0 -10 -W -7 3 -5 -8 -10 -6 -9 -9 -3 -6 -2 -4 -5 1 -7 -3 -6 23 0 -8 -7 -7 -5 -10 -Y -4 -5 -3 -5 1 -5 -5 -6 0 -1 -1 -5 -3 9 -6 -4 -3 0 13 -3 -4 -5 -3 -10 -V 0 -3 -2 -3 -2 -2 -2 -2 -3 5 2 -3 2 -1 -1 -1 0 -8 -3 5 -2 -2 -1 -10 -B 0 -1 2 4 -5 2 3 1 1 -3 -4 1 -3 -6 -1 1 0 -7 -4 -2 3 3 -1 -10 -Z 0 0 2 3 -7 4 4 0 2 -2 -3 0 -2 -6 0 0 -1 -7 -5 -2 3 4 -1 -10 -X 0 -1 0 -1 -4 -1 -1 -1 -1 -1 -2 -1 -1 -3 -1 0 0 -5 -3 -1 -1 -1 -1 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM280 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM280 deleted file mode 100644 index 2b09bca..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM280 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 280 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.916, Entropy = 0.289 bits -# -# Lowest score = -9, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 0 0 2 -1 -1 -2 -1 -1 -4 1 1 1 -7 -4 0 0 0 0 -9 -R -2 7 0 -1 -4 2 -1 -3 2 -2 -3 4 0 -5 0 0 -1 3 -5 -3 -1 0 -1 -9 -N 0 0 2 2 -4 1 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-4 -5 -3 -5 1 -5 -5 -6 0 -1 -1 -5 -3 9 -6 -3 -3 0 13 -3 -4 -5 -3 -9 -V 0 -3 -2 -2 -2 -2 -2 -1 -3 4 2 -3 2 -1 -1 -1 0 -7 -3 5 -2 -2 -1 -9 -B 0 -1 2 4 -5 2 3 1 1 -2 -4 1 -2 -5 -1 1 0 -6 -4 -2 3 2 -1 -9 -Z 0 0 1 3 -6 4 4 0 2 -2 -3 1 -2 -6 0 0 0 -7 -5 -2 2 4 -1 -9 -X 0 -1 0 -1 -3 -1 -1 -1 -1 -1 -1 -1 -1 -3 -1 0 0 -5 -3 -1 -1 -1 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM290 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM290 deleted file mode 100644 index 6852c6a..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM290 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 290 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.877, Entropy = 0.271 bits -# -# Lowest score = -9, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -2 0 0 -2 0 0 2 -1 -1 -2 -1 -1 -4 1 1 1 -7 -4 0 0 0 0 -9 -R -2 7 0 -1 -4 2 -1 -3 2 -2 -3 4 0 -5 0 0 -1 3 -5 -3 0 0 -1 -9 -N 0 0 2 2 -4 1 2 1 2 -2 -3 1 -2 -4 0 1 1 -5 -3 -2 2 1 0 -9 -D 0 -1 2 4 -6 2 4 1 1 -3 -4 0 -3 -6 -1 0 0 -8 -5 -2 3 3 -1 -9 -C -2 -4 -4 -6 15 -6 -6 -4 -4 -3 -7 -6 -6 -5 -3 0 -2 -9 1 -2 -5 -6 -3 -9 -Q 0 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-2 3 2 0 -9 -Z 0 0 1 3 -6 3 4 0 2 -2 -3 1 -2 -6 0 0 0 -7 -5 -2 2 4 -1 -9 -X 0 -1 0 -1 -3 0 -1 -1 -1 -1 -1 -1 -1 -3 -1 0 0 -5 -2 -1 0 -1 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM30 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM30 deleted file mode 100644 index 8a01c88..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM30 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 30 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -5.06, Entropy = 2.57 bits -# -# Lowest score = -17, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 6 -7 -4 -3 -6 -4 -2 -2 -7 -5 -6 -7 -5 -8 -2 0 -1 -13 -8 -2 -3 -3 -3 -17 -R -7 8 -6 -10 -8 -2 -9 -9 -2 -5 -8 0 -4 -9 -4 -3 -6 -2 -10 -8 -7 -4 -6 -17 -N -4 -6 8 2 -11 -3 -2 -3 0 -5 -7 -1 -9 -9 -6 0 -2 -8 -4 -8 6 -3 -3 -17 -D -3 -10 2 8 -14 -2 2 -3 -4 -7 -12 -4 -11 -15 -8 -4 -5 -15 -11 -8 6 1 -5 -17 -C -6 -8 -11 -14 10 -14 -14 -9 -7 -6 -15 -14 -13 -13 -8 -3 -8 -15 -4 -6 -12 -14 -9 -17 -Q -4 -2 -3 -2 -14 8 1 -7 1 -8 -5 -3 -4 -13 -3 -5 -5 -13 -12 -7 -3 6 -5 -17 -E -2 -9 -2 2 -14 1 8 -4 -5 -5 -9 -4 -7 -14 -5 -4 -6 -17 -8 -6 1 6 -5 -17 -G -2 -9 -3 -3 -9 -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 -5 -13 -4 -5 -6 -14 -9 -6 0 6 -5 -17 -X -3 -6 -3 -5 -9 -5 -5 -5 -5 -5 -6 -5 -5 -8 -5 -3 -4 -11 -7 -5 -5 -5 -5 -17 -* -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 -17 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM300 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM300 deleted file mode 100644 index 5d1a5a8..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM300 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 300 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.835, Entropy = 0.254 bits -# -# Lowest score = -9, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -1 0 0 -2 0 0 2 -1 0 -2 -1 -1 -4 1 1 1 -6 -4 0 0 0 0 -9 -R -1 7 0 -1 -4 2 -1 -2 2 -2 -3 4 0 -5 0 0 -1 3 -5 -3 0 0 -1 -9 -N 0 0 2 2 -4 1 2 1 2 -2 -3 1 -2 -4 0 1 0 -5 -2 -2 2 1 0 -9 -D 0 -1 2 4 -6 2 4 1 1 -2 -4 0 -3 -6 -1 0 0 -7 -5 -2 3 3 -1 -9 -C -2 -4 -4 -6 15 -6 -6 -4 -4 -3 -7 -6 -6 -5 -3 0 -2 -9 1 -2 -5 -6 -3 -9 -Q 0 2 1 2 -6 4 3 -1 3 -2 -2 1 -1 -5 0 0 -1 -5 -4 -2 2 3 0 -9 -E 0 -1 2 4 -6 3 4 0 1 -2 -4 0 -2 -6 0 0 0 -8 -5 -2 3 3 -1 -9 -G 2 -2 1 1 -4 -1 0 5 -2 -3 -4 -2 -3 -5 0 1 0 -8 -6 -1 1 0 -1 -9 -H -1 2 2 1 -4 3 1 -2 7 -2 -2 0 -2 -2 0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es/java/jaligner/matrix/matrices/PAM310 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM310 deleted file mode 100644 index cd0e5b0..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM310 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 310 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.779, Entropy = 0.238 bits -# -# Lowest score = -9, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -1 0 0 -2 0 0 1 -1 0 -2 -1 -1 -4 1 1 1 -6 -4 0 0 0 0 -9 -R -1 6 0 -1 -4 1 -1 -2 2 -2 -3 4 0 -5 0 0 -1 3 -4 -2 0 0 -1 -9 -N 0 0 2 2 -4 1 2 1 2 -2 -3 1 -2 -4 0 1 0 -4 -2 -2 2 1 0 -9 -D 0 -1 2 4 -5 2 4 1 1 -2 -4 0 -2 -6 -1 0 0 -7 -5 -2 3 3 -1 -9 -C -2 -4 -4 -5 15 -6 -6 -3 -4 -2 -6 -6 -6 -4 -3 0 -2 -9 1 -2 -5 -6 -3 -9 -Q 0 1 1 2 -6 4 3 -1 3 -2 -2 1 -1 -5 0 0 -1 -5 -4 -2 2 3 0 -9 -E 0 -1 2 4 -6 3 4 1 1 -2 -3 0 -2 -6 0 0 0 -7 -5 -2 3 3 -1 -9 -G 1 -2 1 1 -3 -1 1 5 -2 -2 -4 -1 -3 -5 0 1 0 -8 -6 -1 1 0 -1 -9 -H -1 2 2 1 -4 3 1 -2 7 -2 -2 0 -2 -2 0 -1 -1 -3 0 -2 1 2 0 -9 -I 0 -2 -2 -2 -2 -2 -2 -2 -2 4 3 -2 3 1 -2 -1 0 -5 -1 4 -2 -2 -1 -9 -L -2 -3 -3 -4 -6 -2 -3 -4 -2 3 7 -3 4 3 -3 -3 -2 -2 0 2 -3 -3 -1 -9 -K -1 4 1 0 -6 1 0 -1 0 -2 -3 5 0 -5 -1 0 0 -3 -5 -2 1 1 -1 -9 -M -1 0 -2 -2 -6 -1 -2 -3 -2 3 4 0 6 1 -2 -2 -1 -4 -2 2 -2 -2 -1 -9 -F -4 -5 -4 -6 -4 -5 -6 -5 -2 1 3 -5 1 11 -5 -4 -3 1 9 -1 -5 -5 -2 -9 -P 1 0 0 -1 -3 0 0 0 0 -2 -3 -1 -2 -5 6 1 1 -6 -5 -1 0 0 0 -9 -S 1 0 1 0 0 0 0 1 -1 -1 -3 0 -2 -4 1 1 1 -3 -3 -1 1 0 0 -9 -T 1 -1 0 0 -2 -1 0 0 -1 0 -2 0 -1 -3 1 1 2 -6 -3 0 0 0 0 -9 -W -6 3 -4 -7 -9 -5 -7 -8 -3 -5 -2 -3 -4 1 -6 -3 -6 22 0 -7 -6 -6 -4 -9 -Y -4 -4 -2 -5 1 -4 -5 -6 0 -1 0 -5 -2 9 -5 -3 -3 0 12 -2 -4 -4 -2 -9 -V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -7 -2 4 -2 -2 0 -9 -B 0 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -2 3 2 0 -9 -Z 0 0 1 3 -6 3 3 0 2 -2 -3 1 -2 -5 0 0 0 -6 -4 -2 2 3 0 -9 -X 0 -1 0 -1 -3 0 -1 -1 0 -1 -1 -1 -1 -2 0 0 0 -4 -2 0 0 0 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM320 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM320 deleted file mode 100644 index d7fbbd2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM320 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 320 substitution matrix, scale = ln(2)/4 = 0.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-5 -1 0 0 0 -8 -S 1 0 1 0 0 0 0 1 -1 -1 -3 0 -1 -3 1 1 1 -3 -3 -1 1 0 0 -8 -T 1 -1 0 0 -2 0 0 0 -1 0 -2 0 -1 -3 1 1 2 -5 -3 0 0 0 0 -8 -W -6 3 -4 -7 -8 -5 -7 -7 -3 -5 -2 -3 -4 1 -6 -3 -5 22 1 -6 -6 -6 -4 -8 -Y -4 -4 -2 -5 1 -4 -5 -5 0 -1 0 -5 -2 9 -5 -3 -3 1 12 -2 -3 -4 -2 -8 -V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 -2 -2 0 -8 -B 0 0 2 3 -4 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -3 -2 2 2 0 -8 -Z 0 0 1 3 -5 3 3 0 2 -2 -3 1 -2 -5 0 0 0 -6 -4 -2 2 3 0 -8 -X 0 -1 0 -1 -3 0 0 -1 0 0 -1 -1 0 -2 0 0 0 -4 -2 0 0 0 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM330 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM330 deleted file mode 100644 index 77db35e..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM330 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 330 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.693, Entropy = 0.210 bits -# -# Lowest score = -8, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 0 1 -1 0 -2 -1 -1 -3 1 1 1 -6 -3 0 0 0 0 -8 -R -1 6 0 -1 -4 1 -1 -2 2 -2 -3 4 0 -4 0 0 -1 3 -4 -2 0 0 -1 -8 -N 0 0 2 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-4 1 -4 -4 -5 0 0 0 -4 -2 9 -5 -3 -3 1 12 -2 -3 -4 -2 -8 -V 0 -2 -1 -2 -2 -2 -2 -1 -2 4 2 -2 2 -1 -1 -1 0 -6 -2 4 -2 -2 0 -8 -B 0 0 2 3 -4 1 2 1 1 -2 -3 1 -2 -4 0 1 0 -5 -3 -2 2 2 0 -8 -Z 0 0 1 3 -5 3 3 0 2 -2 -2 1 -1 -5 0 0 0 -6 -4 -2 2 3 0 -8 -X 0 -1 0 0 -3 0 0 -1 0 0 -1 -1 0 -2 0 0 0 -4 -2 0 0 0 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM340 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM340 deleted file mode 100644 index 02c8540..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM340 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 340 substitution matrix, scale = ln(2)/4 = 0.173287 -# -# Expected score = -0.680, Entropy = 0.198 bits -# -# Lowest score = -8, Highest score = 22 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 0 1 -1 0 -2 -1 -1 -3 1 1 1 -6 -3 0 0 0 0 -8 -R -1 6 0 -1 -4 1 0 -2 2 -2 -3 4 0 -4 0 0 0 3 -4 -2 0 0 -1 -8 -N 0 0 1 2 -3 1 1 1 1 -2 -3 1 -1 -3 0 1 0 -4 -2 -1 2 1 0 -8 -D 1 -1 2 3 -5 2 3 1 1 -2 -4 0 -2 -5 0 0 0 -7 -4 -2 3 3 0 -8 -C -2 -4 -3 -5 15 -5 -5 -3 -3 -2 -6 -5 -5 -4 -3 0 -2 -8 1 -2 -4 -5 -3 -8 -Q 0 1 1 2 -5 3 2 -1 3 -2 -2 1 -1 -4 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 -6 -4 -2 2 3 0 -8 -X 0 -1 0 0 -3 0 0 -1 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM350 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM350 deleted file mode 100644 index 140a6f2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM350 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 350 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.701, Entropy = 0.186 bits -# -# Lowest score = -10, Highest score = 27 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 2 -1 0 1 -2 0 1 2 -1 0 -2 -1 -1 -4 1 1 1 -7 -4 0 1 0 0 -10 -R -1 7 1 -1 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 -1 4 -5 -3 0 1 -1 -10 -N 0 1 2 2 -4 1 2 1 2 -2 -3 1 -2 -4 0 1 1 -5 -3 -2 2 2 0 -10 -D 1 -1 2 4 -6 2 4 1 1 -2 -4 1 -3 -6 0 1 0 -8 -5 -2 3 3 -1 -10 -C -2 -4 -4 -6 18 -6 -6 -4 -4 -3 -7 -6 -6 -5 -3 0 -2 -10 1 -2 -5 -6 -3 -10 -Q 0 2 1 2 -6 4 3 -1 3 -2 -2 1 -1 -5 1 0 0 -5 -5 -2 2 3 0 -10 -E 1 0 2 4 -6 3 4 1 1 -2 -4 0 -2 -6 0 0 0 -8 -5 -2 3 3 0 -10 -G 2 -2 1 1 -4 -1 1 5 -2 -2 -4 -1 -3 -6 0 1 1 -8 -6 -1 1 0 -1 -10 -H -1 2 2 1 -4 3 1 -2 7 -2 -2 1 -2 -2 0 -1 -1 -3 0 -2 1 2 0 -10 -I 0 -2 -2 -2 -3 -2 -2 -2 -2 5 4 -2 3 2 -2 -1 0 -6 0 4 -2 -2 0 -10 -L -2 -3 -3 -4 -7 -2 -4 -4 -2 4 8 -3 5 3 -3 -3 -2 -2 0 3 -4 -3 -1 -10 -K -1 4 1 1 -6 1 0 -1 1 -2 -3 5 0 -6 -1 0 0 -4 -5 -2 1 1 -1 -10 -M -1 0 -2 -3 -6 -1 -2 -3 -2 3 5 0 6 1 -2 -2 -1 -5 -2 2 -2 -2 0 -10 -F -4 -5 -4 -6 -5 -5 -6 -6 -2 2 3 -6 1 13 -5 -4 -3 1 11 -1 -5 -6 -2 -10 -P 1 0 0 0 -3 1 0 0 0 -2 -3 -1 -2 -5 6 1 1 -7 -6 -1 0 0 0 -10 -S 1 0 1 1 0 0 0 1 -1 -1 -3 0 -2 -4 1 1 1 -3 -3 -1 1 0 0 -10 -T 1 -1 1 0 -2 0 0 1 -1 0 -2 0 -1 -3 1 1 2 -6 -3 0 0 0 0 -10 -W -7 4 -5 -8 -10 -5 -8 -8 -3 -6 -2 -4 -5 1 -7 -3 -6 27 1 -7 -6 -7 -5 -10 -Y -4 -5 -3 -5 1 -5 -5 -6 0 0 0 -5 -2 11 -6 -3 -3 1 14 -2 -4 -5 -2 -10 -V 0 -3 -2 -2 -2 -2 -2 -1 -2 4 3 -2 2 -1 -1 -1 0 -7 -2 5 -2 -2 0 -10 -B 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -5 0 1 0 -6 -4 -2 3 2 0 -10 -Z 0 1 2 3 -6 3 3 0 2 -2 -3 1 -2 -6 0 0 0 -7 -5 -2 2 3 0 -10 -X 0 -1 0 -1 -3 0 0 -1 0 0 -1 -1 0 -2 0 0 0 -5 -2 0 0 0 -1 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM360 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM360 deleted file mode 100644 index 5f6cd46..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM360 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 360 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.697, Entropy = 0.175 bits -# -# Lowest score = -9, Highest score = 27 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 -1 0 -2 -1 -1 -4 1 1 1 -7 -4 0 1 0 0 -9 -R -1 6 1 -1 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 0 4 -5 -2 0 1 -1 -9 -N 0 1 2 2 -4 1 2 1 2 -2 -3 1 -2 -4 0 1 1 -5 -3 -2 2 2 0 -9 -D 1 -1 2 4 -6 2 4 1 1 -2 -4 1 -2 -6 0 1 0 -8 -5 -2 3 3 0 -9 -C -2 -4 -4 -6 18 -6 -6 -4 -4 -3 -7 -6 -6 -4 -3 0 -2 -9 1 -2 -5 -6 -3 -9 -Q 0 2 1 2 -6 3 3 -1 3 -2 -2 1 -1 -5 1 0 0 -5 -4 -2 2 3 0 -9 -E 1 0 2 4 -6 3 4 1 1 -2 -3 0 -2 -6 0 0 0 -8 -5 -2 3 3 0 -9 -G 2 -2 1 1 -4 -1 1 5 -2 -2 -4 -1 -3 -6 0 1 1 -8 -6 -1 1 0 -1 -9 -H -1 2 2 1 -4 3 1 -2 7 -2 -2 1 -2 -2 0 0 -1 -3 0 -2 1 2 0 -9 -I 0 -2 -2 -2 -3 -2 -2 -2 -2 4 3 -2 3 2 -2 -1 0 -6 0 4 -2 -2 0 -9 -L -2 -3 -3 -4 -7 -2 -3 -4 -2 3 7 -3 5 3 -3 -3 -2 -2 0 3 -4 -3 -1 -9 -K -1 4 1 1 -6 1 0 -1 1 -2 -3 5 0 -6 -1 0 0 -4 -5 -2 1 1 -1 -9 -M -1 0 -2 -2 -6 -1 -2 -3 -2 3 5 0 6 1 -2 -2 -1 -4 -2 2 -2 -2 0 -9 -F -4 -5 -4 -6 -4 -5 -6 -6 -2 2 3 -6 1 12 -5 -4 -3 2 11 -1 -5 -5 -2 -9 -P 1 0 0 0 -3 1 0 0 0 -2 -3 -1 -2 -5 6 1 1 -6 -5 -1 0 0 0 -9 -S 1 0 1 1 0 0 0 1 0 -1 -3 0 -2 -4 1 1 1 -3 -3 -1 1 0 0 -9 -T 1 0 1 0 -2 0 0 1 -1 0 -2 0 -1 -3 1 1 2 -6 -3 0 0 0 0 -9 -W -7 4 -5 -8 -9 -5 -8 -8 -3 -6 -2 -4 -4 2 -6 -3 -6 27 1 -7 -6 -7 -4 -9 -Y -4 -5 -3 -5 1 -4 -5 -6 0 0 0 -5 -2 11 -5 -3 -3 1 14 -2 -4 -5 -2 -9 -V 0 -2 -2 -2 -2 -2 -2 -1 -2 4 3 -2 2 -1 -1 -1 0 -7 -2 4 -2 -2 0 -9 -B 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -5 0 1 0 -6 -4 -2 2 2 0 -9 -Z 0 1 2 3 -6 3 3 0 2 -2 -3 1 -2 -5 0 0 0 -7 -5 -2 2 3 0 -9 -X 0 -1 0 0 -3 0 0 -1 0 0 -1 -1 0 -2 0 0 0 -4 -2 0 0 0 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM370 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM370 deleted file mode 100644 index f72261f..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM370 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 370 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.649, Entropy = 0.165 bits -# -# Lowest score = -9, Highest score = 27 -# - A R N D C Q E G H I L K M F P S T W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 -2 0 0 1 -1 0 -1 0 0 -3 1 1 2 -6 -3 0 0 0 0 -9 -W -7 3 -5 -7 -9 -5 -8 -8 -3 -5 -2 -3 -4 2 -6 -3 -6 27 1 -7 -6 -6 -4 -9 -Y -4 -4 -3 -5 1 -4 -5 -6 0 0 0 -5 -2 11 -5 -3 -3 1 14 -2 -4 -5 -2 -9 -V 0 -2 -1 -2 -2 -2 -2 -1 -2 4 3 -2 2 0 -1 -1 0 -7 -2 4 -2 -2 0 -9 -B 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -2 2 2 0 -9 -Z 0 1 1 3 -6 3 3 0 2 -2 -3 1 -2 -5 0 0 0 -6 -5 -2 2 3 0 -9 -X 0 -1 0 0 -3 0 0 -1 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM380 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM380 deleted file mode 100644 index cbcf063..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM380 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 380 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.612, Entropy = 0.156 bits -# -# Lowest score = -9, Highest score = 26 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 -1 0 -2 -1 -1 -4 1 1 1 -6 -4 0 1 0 0 -9 -R -1 6 1 0 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 0 3 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -5 -3 -1 2 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -6 0 1 0 -7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6 -2 4 -2 -2 0 -9 -B 1 0 2 3 -4 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -2 2 2 0 -9 -Z 0 1 1 3 -5 3 3 0 2 -2 -3 1 -1 -5 0 0 0 -6 -4 -2 2 3 0 -9 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM390 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM390 deleted file mode 100644 index 8206530..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM390 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 390 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.581, Entropy = 0.147 bits -# -# Lowest score = -9, Highest score = 26 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 1 -1 0 -2 -1 -1 -3 1 1 1 -6 -4 0 1 0 0 -9 -R -1 6 1 0 -4 1 0 -2 2 -2 -3 4 0 -5 0 0 0 3 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -4 -3 -1 2 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -5 0 1 0 -7 -5 -2 3 3 0 -9 -C -2 -4 -4 -5 17 -5 -5 -3 -4 -2 -6 -5 -5 -4 -3 0 -2 -9 1 -2 -4 -5 -3 -9 -Q 0 1 1 2 -5 3 2 0 3 -2 -2 1 -1 -4 0 0 0 -5 -4 -1 2 3 0 -9 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 0 0 -7 -5 -1 2 3 0 -9 -G 1 -2 1 1 -3 0 1 5 -1 -2 -4 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 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM40 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM40 deleted file mode 100644 index e0df4f6..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM40 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 40 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -4.27, Entropy = 2.26 bits -# -# Lowest score = -15, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 6 -6 -3 -3 -6 -3 -2 -1 -6 -4 -5 -6 -4 -7 -1 0 0 -12 -7 -2 -3 -2 -3 -15 -R -6 8 -5 -9 -7 -1 -8 -8 -1 -5 -8 1 -3 -8 -3 -2 -5 -1 -9 -7 -6 -3 -5 -15 -N -3 -5 7 2 -9 -3 -1 -2 1 -4 -6 0 -7 -8 -5 0 -1 -7 -4 -7 6 -2 -3 -15 -D -3 -9 2 7 -12 -2 3 -3 -3 -6 -11 -4 -9 -13 -7 -3 -4 -13 -10 -7 6 2 -5 -15 -C -6 -7 -9 -12 9 -12 -12 -8 -7 -5 -13 -12 -12 -11 -7 -2 -7 -14 -3 -5 -11 -12 -8 -15 -Q -3 -1 -3 -2 -12 8 2 -6 1 -7 -4 -2 -3 -11 -2 -4 -5 -11 -10 -6 -2 6 -4 -15 -E -2 -8 -1 3 -12 2 7 -3 -4 -5 -8 -4 -6 -12 -5 -4 -5 -15 -8 -6 2 6 -4 -15 -G -1 -8 -2 -3 -8 -6 -3 6 -8 -9 -9 -6 -7 -8 -5 -1 -5 -13 -12 -5 -2 -4 -4 -15 -H -6 -1 1 -3 -7 1 -4 -8 9 -8 -5 -5 -9 -5 -3 -5 -6 -6 -3 -6 -1 0 -4 -15 -I -4 -5 -4 -6 -5 -7 -5 -9 -8 8 -1 -5 0 -2 -7 -6 -2 -12 -5 2 -5 -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target/classes/java/jaligner/matrix/matrices/PAM400 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM400 deleted file mode 100644 index 4d99c84..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM400 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 400 substitution matrix, scale = ln(2)/5 = 0.138629 -# -# Expected score = -0.521, Entropy = 0.139 bits -# -# Lowest score = -8, Highest score = 26 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 1 -1 0 -2 -1 -1 -3 1 1 1 -6 -3 0 1 0 0 -8 -R -1 5 1 0 -4 1 0 -2 2 -2 -3 4 0 -4 0 0 0 3 -4 -2 0 1 0 -8 -N 0 1 1 2 -3 1 2 1 1 -1 -3 1 -1 -3 0 1 0 -4 -3 -1 2 1 0 -8 -D 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -4 -2 2 2 0 -8 -C -2 -4 -3 -5 17 -5 -5 -3 -3 -2 -6 -5 -5 -4 -2 0 -2 -8 1 -2 -4 -5 -3 -8 -Q 0 1 1 2 -5 3 2 0 3 -2 -2 1 -1 -4 0 0 0 -5 -4 -1 2 2 0 -8 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 0 0 -7 -4 -1 2 3 0 -8 -G 1 -2 1 1 -3 0 1 4 -1 -2 -3 -1 -2 -5 0 1 1 -7 -5 -1 1 0 0 -8 -H -1 2 1 1 -3 3 1 -1 5 -2 -2 1 -1 -2 0 0 -1 -2 0 -2 1 2 0 -8 -I 0 -2 -1 -2 -2 -2 -2 -2 -2 4 3 -2 2 2 -1 -1 0 -5 0 3 -2 -2 0 -8 -L -2 -3 -3 -3 -6 -2 -3 -3 -2 3 7 -2 4 3 -2 -2 -1 -2 0 3 -3 -2 -1 -8 -K -1 4 1 1 -5 1 1 -1 1 -2 -2 4 0 -5 0 0 0 -3 -4 -2 1 1 0 -8 -M -1 0 -1 -2 -5 -1 -2 -2 -1 2 4 0 5 1 -1 -1 0 -4 -1 2 -2 -1 0 -8 -F -3 -4 -3 -5 -4 -4 -5 -5 -2 2 3 -5 1 11 -4 -3 -3 2 10 0 -4 -5 -2 -8 -P 1 0 0 0 -2 0 0 0 0 -1 -2 0 -1 -4 5 1 1 -6 -5 -1 0 0 0 -8 -S 1 0 1 1 0 0 0 1 0 -1 -2 0 -1 -3 1 1 1 -3 -3 -1 1 0 0 -8 -T 1 0 0 0 -2 0 0 1 -1 0 -1 0 0 -3 1 1 1 -5 -3 0 0 0 0 -8 -W -6 3 -4 -7 -8 -5 -7 -7 -2 -5 -2 -3 -4 2 -6 -3 -5 26 1 -6 -5 -6 -4 -8 -Y -3 -4 -3 -4 1 -4 -4 -5 0 0 0 -4 -1 10 -5 -3 -3 1 13 -2 -3 -4 -2 -8 -V 0 -2 -1 -2 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -2 4 -1 -1 0 -8 -B 1 0 2 2 -4 2 2 1 1 -2 -3 1 -2 -4 0 1 0 -5 -3 -1 2 2 0 -8 -Z 0 1 1 2 -5 2 3 0 2 -2 -2 1 -1 -5 0 0 0 -6 -4 -1 2 3 0 -8 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -8 -* -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM410 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM410 deleted file mode 100644 index b7c9bfd..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM410 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 410 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.617, Entropy = 0.131 bits -# -#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 1 1 -3 -3 -1 1 0 0 -10 -T 1 0 1 0 -2 0 0 1 -1 0 -1 0 0 -3 1 1 2 -6 -3 0 0 0 0 -10 -W -7 4 -5 -8 -10 -5 -8 -8 -3 -6 -2 -3 -4 2 -7 -3 -6 31 2 -7 -6 -7 -4 -10 -Y -4 -5 -3 -5 1 -4 -5 -6 0 0 1 -5 -2 12 -5 -3 -3 2 15 -2 -4 -5 -2 -10 -V 0 -2 -1 -2 -2 -2 -2 -1 -2 4 3 -2 2 0 -1 -1 0 -7 -2 4 -2 -2 0 -10 -B 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -2 2 2 0 -10 -Z 0 1 2 3 -6 3 3 0 2 -2 -3 1 -2 -5 0 0 0 -7 -5 -2 2 3 0 -10 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM420 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM420 deleted file mode 100644 index 53e0caf..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM420 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 420 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.599, Entropy = 0.124 bits -# -# Lowest score = -10, Highest score = 31 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 -1 0 -2 0 -1 -4 1 1 1 -7 -4 0 1 0 0 -10 -R -1 6 1 0 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 0 4 -5 -2 0 1 0 -10 -N 0 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -5 -3 -1 2 2 0 -10 -D 1 0 2 3 -5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-2 -1 -2 4 3 -2 2 0 -1 -1 0 -7 -2 4 -2 -2 0 -10 -B 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -2 2 2 0 -10 -Z 0 1 2 3 -6 3 3 0 2 -2 -3 1 -1 -5 0 0 0 -7 -5 -2 2 3 0 -10 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM430 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM430 deleted file mode 100644 index 2450215..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM430 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 430 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.543, Entropy = 0.117 bits -# -# Lowest score = -9, Highest score = 31 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 -1 0 -2 0 -1 -4 1 1 1 -7 -4 0 1 0 0 -9 -R -1 6 1 0 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 0 4 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -5 -3 -1 2 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -6 0 1 0 -7 -5 -2 3 3 0 -9 -C -2 -4 -4 -5 20 -6 -5 -3 -4 -2 -6 -6 -5 -4 -3 0 -2 -9 1 -2 -4 -5 -3 -9 -Q 0 2 1 2 -6 3 2 0 3 -2 -2 1 -1 -5 1 0 0 -5 -4 -1 2 3 0 -9 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -6 0 1 0 -8 -5 -1 2 3 0 -9 -G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9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM440 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM440 deleted file mode 100644 index 0429e87..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM440 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 440 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.529, Entropy = 0.111 bits -# -# Lowest score = -9, Highest score = 30 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 -1 0 -2 0 -1 -4 1 1 1 -6 -4 0 1 0 0 -9 -R -1 5 1 0 -4 2 0 -2 2 -2 -3 4 0 -5 0 0 0 4 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -5 -3 -1 2 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -6 0 1 0 -7 -5 -2 2 2 0 -9 -C -2 -4 -4 -5 20 -5 -5 -3 -4 -2 -6 -5 -5 -4 -3 0 -2 -9 1 -2 -4 -5 -3 -9 -Q 0 2 1 2 -5 3 2 0 3 -2 -2 1 -1 -4 1 0 0 -5 -4 -1 2 2 0 -9 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -5 -1 2 3 0 -9 -G 2 -2 1 1 -3 0 1 4 -1 -2 -4 -1 -2 -5 0 1 1 -8 -5 -1 1 0 0 -9 -H -1 2 1 1 -4 3 1 -1 5 -2 -2 1 -1 -2 0 0 -1 -3 0 -2 1 2 0 -9 -I 0 -2 -2 -2 -2 -2 -2 -2 -2 4 4 -2 3 2 -1 -1 0 -5 0 3 -2 -2 0 -9 -L -2 -3 -3 -3 -6 -2 -3 -4 -2 4 7 -3 5 4 -2 -2 -1 -2 1 3 -3 -2 -1 -9 -K 0 4 1 1 -5 1 1 -1 1 -2 -3 4 0 -5 0 0 0 -3 -5 -2 1 1 0 -9 -M -1 0 -1 -2 -5 -1 -2 -2 -1 3 5 0 4 1 -1 -1 0 -4 -1 2 -2 -1 0 -9 -F -4 -5 -4 -6 -4 -4 -5 -5 -2 2 4 -5 1 13 -5 -4 -3 2 12 0 -5 -5 -2 -9 -P 1 0 0 0 -3 1 0 0 0 -1 -2 0 -1 -5 5 1 1 -6 -5 -1 0 0 0 -9 -S 1 0 1 1 0 0 1 1 0 -1 -2 0 -1 -4 1 1 1 -3 -3 -1 1 0 0 -9 -T 1 0 0 0 -2 0 0 1 -1 0 -1 0 0 -3 1 1 1 -6 -3 0 0 0 0 -9 -W -6 4 -5 -7 -9 -5 -7 -8 -3 -5 -2 -3 -4 2 -6 -3 -6 30 2 -6 -6 -6 -4 -9 -Y -4 -4 -3 -5 1 -4 -5 -5 0 0 1 -5 -1 12 -5 -3 -3 2 15 -2 -4 -4 -2 -9 -V 0 -2 -1 -2 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -2 4 -1 -1 0 -9 -B 1 0 2 2 -4 2 2 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -1 2 2 0 -9 -Z 0 1 1 2 -5 2 3 0 2 -2 -2 1 -1 -5 0 0 0 -6 -4 -1 2 3 0 -9 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 -1 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM450 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM450 deleted file mode 100644 index 30cc7a2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM450 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 450 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.476, Entropy = 0.105 bits -# -# Lowest score = -9, Highest score = 30 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 1 -1 0 -2 0 -1 -3 1 1 1 -6 -4 0 1 0 0 -9 -R -1 5 1 0 -4 2 0 -1 2 -2 -3 4 0 -4 0 0 0 4 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -1 -2 1 -1 -4 0 1 0 -4 -3 -1 1 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -5 -1 2 2 0 -9 -C -2 -4 -4 -5 20 -5 -5 -3 -4 -2 -6 -5 -5 -4 -2 0 -2 -9 1 -2 -4 -5 -2 -9 -Q 0 2 1 2 -5 3 2 0 3 -1 -2 1 -1 -4 1 0 0 -5 -4 -1 2 2 0 -9 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -5 -1 2 3 0 -9 -G 1 -1 1 1 -3 0 1 4 -1 -2 -3 -1 -2 -5 0 1 1 -8 -5 -1 1 0 0 -9 -H -1 2 1 1 -4 3 1 -1 5 -2 -2 1 -1 -2 0 0 -1 -2 0 -2 1 2 0 -9 -I 0 -2 -1 -2 -2 -1 -2 -2 -2 4 3 -2 3 2 -1 -1 0 -5 0 3 -2 -2 0 -9 -L -2 -3 -2 -3 -6 -2 -3 -3 -2 3 7 -2 4 4 -2 -2 -1 -1 1 3 -3 -2 -1 -9 -K 0 4 1 1 -5 1 1 -1 1 -2 -2 4 0 -5 0 0 0 -3 -5 -2 1 1 0 -9 -M -1 0 -1 -2 -5 -1 -2 -2 -1 3 4 0 4 1 -1 -1 0 -4 -1 2 -2 -1 0 -9 -F -3 -4 -4 -5 -4 -4 -5 -5 -2 2 4 -5 1 13 -5 -3 -3 2 12 0 -4 -5 -2 -9 -P 1 0 0 0 -2 1 0 0 0 -1 -2 0 -1 -5 5 1 1 -6 -5 -1 0 0 0 -9 -S 1 0 1 1 0 0 1 1 0 -1 -2 0 -1 -3 1 1 1 -3 -3 -1 1 0 0 -9 -T 1 0 0 0 -2 0 0 1 -1 0 -1 0 0 -3 1 1 1 -5 -3 0 0 0 0 -9 -W -6 4 -4 -7 -9 -5 -7 -8 -2 -5 -1 -3 -4 2 -6 -3 -5 30 2 -6 -6 -6 -4 -9 -Y -4 -4 -3 -5 1 -4 -5 -5 0 0 1 -5 -1 12 -5 -3 -3 2 14 -2 -4 -4 -2 -9 -V 0 -2 -1 -1 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -2 3 -1 -1 0 -9 -B 1 0 1 2 -4 2 2 1 1 -2 -3 1 -2 -4 0 1 0 -6 -4 -1 2 2 0 -9 -Z 0 1 1 2 -5 2 3 0 2 -2 -2 1 -1 -5 0 0 0 -6 -4 -1 2 2 0 -9 -X 0 0 0 0 -2 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM460 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM460 deleted file mode 100644 index 7491d6c..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM460 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 460 substitution matrix, scale = ln(2)/6 = 0.115525 -# -# Expected score = -0.429, Entropy = 0.0994 bits -# -# Lowest score = -9, Highest score = 30 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 1 0 0 -1 0 -1 -3 1 1 1 -6 -3 0 1 0 0 -9 -R -1 5 1 0 -4 1 0 -1 2 -2 -2 4 0 -4 0 0 0 4 -4 -2 0 1 0 -9 -N 0 1 1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 0 0 1 -4 -1 11 -5 -3 -3 2 14 -2 -4 -4 -2 -9 -V 0 -2 -1 -1 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -2 3 -1 -1 0 -9 -B 1 0 1 2 -4 1 2 1 1 -2 -3 1 -2 -4 0 1 0 -6 -4 -1 2 2 0 -9 -Z 0 1 1 2 -5 2 2 0 2 -2 -2 1 -1 -5 0 0 0 -6 -4 -1 2 2 0 -9 -X 0 0 0 0 -2 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM470 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM470 deleted file mode 100644 index 9d5e333..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM470 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 470 substitution matrix, scale = ln(2)/7 = 0.0990210 -# -# Expected score = -0.520, Entropy = 0.0942 bits -# -# Lowest score = -10, Highest score = 35 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 1 1 -2 0 1 2 -1 0 -2 0 -1 -4 1 1 1 -7 -4 0 1 0 0 -10 -R -1 6 1 0 -4 2 0 -1 2 -2 -3 4 0 -5 0 0 0 4 -5 -2 0 1 0 -10 -N 1 1 1 2 -4 1 2 1 1 -2 -3 1 -1 -4 0 1 0 -5 -3 -1 2 1 0 -10 -D 1 0 2 3 -5 2 3 1 1 -2 -4 1 -2 -6 0 1 0 -8 -5 -2 3 3 0 -10 -C -2 -4 -4 -5 22 -6 -5 -3 -4 -2 -6 -6 -6 -4 -3 0 -2 -10 2 -2 -5 -6 -3 -10 -Q 0 2 1 2 -6 3 2 0 3 -2 -2 1 -1 -5 1 0 0 -5 -4 -1 2 2 0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0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM480 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM480 deleted file mode 100644 index c777c62..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM480 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 480 substitution matrix, scale = ln(2)/7 = 0.0990210 -# -# Expected score = -0.494, Entropy = 0.0893 bits -# -# Lowest score = -10, Highest score = 35 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 1 1 -2 0 1 2 0 0 -2 0 -1 -4 1 1 1 -7 -4 0 1 0 0 -10 -R -1 5 1 0 -4 2 0 -1 2 -2 -3 4 0 -5 0 0 0 4 -4 -2 0 1 0 -10 -N 1 1 1 2 -4 1 2 1 1 -1 -3 1 -1 -4 0 1 0 -5 -3 -1 2 1 0 -10 -D 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -6 0 1 0 -7 -5 -1 2 2 0 -10 -C -2 -4 -4 -5 22 -5 -5 -3 -4 -2 -6 -6 -5 -4 -3 0 -2 -10 2 -2 -4 -5 -3 -10 -Q 0 2 1 2 -5 3 2 0 3 -2 -2 1 -1 -5 1 0 0 -5 -4 -1 2 2 0 -10 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -8 -5 -1 2 3 0 -10 -G 2 -1 1 1 -3 0 1 4 -1 -2 -4 -1 -2 -5 1 1 1 -8 -5 -1 1 1 0 -10 -H 0 2 1 1 -4 3 1 -1 5 -2 -2 1 -1 -2 0 0 0 -3 0 -2 1 2 0 -10 -I 0 -2 -1 -2 -2 -2 -2 -2 -2 4 4 -2 3 2 -1 -1 0 -5 0 3 -2 -2 0 -10 -L -2 -3 -3 -3 -6 -2 -3 -4 -2 4 7 -3 5 4 -2 -2 -1 -2 1 3 -3 -3 -1 -10 -K 0 4 1 1 -6 1 1 -1 1 -2 -3 4 0 -5 0 0 0 -3 -5 -2 1 1 0 -10 -M -1 0 -1 -2 -5 -1 -2 -2 -1 3 5 0 4 1 -1 -1 0 -4 -1 2 -2 -1 0 -10 -F -4 -5 -4 -6 -4 -5 -5 -5 -2 2 4 -5 1 14 -5 -4 -3 3 13 0 -5 -5 -2 -10 -P 1 0 0 0 -3 1 0 1 0 -1 -2 0 -1 -5 5 1 1 -6 -5 -1 0 1 0 -10 -S 1 0 1 1 0 0 1 1 0 -1 -2 0 -1 -4 1 1 1 -3 -3 -1 1 0 0 -10 -T 1 0 0 0 -2 0 0 1 0 0 -1 0 0 -3 1 1 1 -6 -3 0 0 0 0 -10 -W -7 4 -5 -7 -10 -5 -8 -8 -3 -5 -2 -3 -4 3 -6 -3 -6 35 2 -7 -6 -6 -4 -10 -Y -4 -4 -3 -5 2 -4 -5 -5 0 0 1 -5 -1 13 -5 -3 -3 2 16 -2 -4 -5 -2 -10 -V 0 -2 -1 -1 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -7 -2 3 -1 -1 0 -10 -B 1 0 2 2 -4 2 2 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -1 2 2 0 -10 -Z 0 1 1 2 -5 2 3 1 2 -2 -3 1 -1 -5 1 0 0 -6 -5 -1 2 2 0 -10 -X 0 0 0 0 -3 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -10 -* -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM490 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM490 deleted file mode 100644 index 107a0c8..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM490 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 490 substitution matrix, scale = ln(2)/7 = 0.0990210 -# -# Expected score = -0.431, Entropy = 0.0847 bits -# -# Lowest score = -9, Highest score = 34 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 2 0 0 -1 0 -1 -3 1 1 1 -6 -4 0 1 0 0 -9 -R -1 5 1 0 -4 2 0 -1 2 -2 -3 4 0 -5 0 0 0 4 -4 -2 0 1 0 -9 -N 0 1 1 2 -4 1 2 1 1 -1 -2 1 -1 -4 0 1 0 -5 -3 -1 1 1 0 -9 -D 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -5 -1 2 2 0 -9 -C -2 -4 -4 -5 22 -5 -5 -3 -4 -2 -6 -5 -5 -4 -3 0 -2 -9 2 -2 -4 -5 -2 -9 -Q 0 2 1 2 -5 2 2 0 2 -1 -2 1 -1 -4 1 0 0 -5 -4 -1 2 2 0 -9 -E 1 0 2 3 -5 2 3 1 1 -2 -3 1 -2 -5 0 1 0 -7 -5 -1 2 2 0 -9 -G 2 -1 1 1 -3 0 1 4 -1 -2 -3 -1 -2 -5 1 1 1 -8 -5 -1 1 1 0 -9 -H 0 2 1 1 -4 2 1 -1 5 -2 -2 1 -1 -2 0 0 0 -3 0 -2 1 2 0 -9 -I 0 -2 -1 -2 -2 -1 -2 -2 -2 3 4 -2 3 2 -1 -1 0 -5 0 3 -2 -2 0 -9 -L -1 -3 -2 -3 -6 -2 -3 -3 -2 4 7 -2 5 4 -2 -2 -1 -1 1 3 -3 -2 -1 -9 -K 0 4 1 1 -5 1 1 -1 1 -2 -2 4 0 -5 0 0 0 -3 -5 -2 1 1 0 -9 -M -1 0 -1 -2 -5 -1 -2 -2 -1 3 5 0 4 1 -1 -1 0 -4 -1 2 -2 -1 0 -9 -F -3 -5 -4 -5 -4 -4 -5 -5 -2 2 4 -5 1 14 -5 -4 -3 3 13 0 -5 -5 -2 -9 -P 1 0 0 0 -3 1 0 1 0 -1 -2 0 -1 -5 4 1 1 -6 -5 -1 0 1 0 -9 -S 1 0 1 1 0 0 1 1 0 -1 -2 0 -1 -4 1 1 1 -3 -3 -1 1 0 0 -9 -T 1 0 0 0 -2 0 0 1 0 0 -1 0 0 -3 1 1 1 -6 -3 0 0 0 0 -9 -W -6 4 -5 -7 -9 -5 -7 -8 -3 -5 -1 -3 -4 3 -6 -3 -6 34 2 -6 -6 -6 -4 -9 -Y -4 -4 -3 -5 2 -4 -5 -5 0 0 1 -5 -1 13 -5 -3 -3 2 15 -2 -4 -4 -2 -9 -V 0 -2 -1 -1 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -2 3 -1 -1 0 -9 -B 1 0 1 2 -4 2 2 1 1 -2 -3 1 -2 -5 0 1 0 -6 -4 -1 2 2 0 -9 -Z 0 1 1 2 -5 2 2 1 2 -2 -2 1 -1 -5 1 0 0 -6 -4 -1 2 2 0 -9 -X 0 0 0 0 -2 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM50 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM50 deleted file mode 100644 index 6d37d4b..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM50 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 50 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -3.70, Entropy = 2.00 bits -# -# Lowest score = -13, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -5 -2 -2 -5 -3 -1 -1 -5 -3 -5 -5 -4 -7 0 0 0 -11 -6 -1 -2 -2 -2 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-3 -4 -5 -1 6 1 -4 -5 -4 -1 -3 -2 -13 -T 0 -5 -1 -3 -6 -4 -4 -4 -5 -1 -5 -2 -3 -7 -3 1 6 -10 -5 -2 -2 -4 -2 -13 -W -11 -1 -7 -12 -13 -10 -13 -12 -6 -11 -5 -9 -10 -3 -11 -4 -10 13 -4 -12 -8 -11 -9 -13 -Y -6 -8 -3 -9 -3 -9 -7 -11 -2 -5 -5 -8 -8 3 -11 -5 -5 -4 9 -6 -5 -8 -6 -13 -V -1 -6 -6 -6 -5 -5 -5 -4 -5 3 -1 -7 0 -6 -4 -4 -2 -12 -6 7 -6 -5 -3 -13 -B -2 -5 5 6 -9 -2 2 -2 0 -5 -7 -1 -7 -9 -5 -1 -2 -8 -5 -6 5 1 -3 -13 -Z -2 -2 -1 2 -11 6 6 -4 0 -5 -5 -2 -4 -11 -3 -3 -4 -11 -8 -5 1 6 -3 -13 -X -2 -4 -2 -4 -7 -3 -3 -4 -4 -3 -5 -4 -4 -6 -4 -2 -2 -9 -6 -3 -3 -3 -4 -13 -* -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 -13 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM500 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM500 deleted file mode 100644 index 617c3f1..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM500 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 500 substitution matrix, scale = ln(2)/7 = 0.0990210 -# -# Expected score = -0.401, Entropy = 0.0803 bits -# -# Lowest score = -9, Highest score = 34 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 1 -1 0 1 -2 0 1 1 0 0 -1 0 -1 -3 1 1 1 -6 -3 0 1 0 0 -9 -R -1 5 1 0 -4 2 0 -1 2 -2 -2 4 0 -4 0 0 0 4 -4 -2 0 1 0 -9 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 -5 -5 0 0 1 -5 -1 13 -5 -3 -3 2 15 -1 -4 -4 -2 -9 -V 0 -2 -1 -1 -2 -1 -1 -1 -2 3 3 -2 2 0 -1 -1 0 -6 -1 3 -1 -1 0 -9 -B 1 0 1 2 -4 2 2 1 1 -2 -3 1 -1 -4 0 1 0 -6 -4 -1 2 2 0 -9 -Z 0 1 1 2 -5 2 2 1 2 -2 -2 1 -1 -5 1 0 0 -6 -4 -1 2 2 0 -9 -X 0 0 0 0 -2 0 0 0 0 0 -1 0 0 -2 0 0 0 -4 -2 0 0 0 0 -9 -* -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 -9 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM60 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM60 deleted file mode 100644 index fba70b9..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM60 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 60 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -3.21, Entropy = 1.79 bits -# -# Lowest score = -12, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -5 -2 -2 -5 -3 -1 0 -5 -3 -4 -5 -3 -6 0 1 1 -10 -6 -1 -2 -2 -2 -12 -R -5 8 -3 -6 -6 0 -6 -7 0 -4 -6 2 -2 -7 -2 -2 -4 0 -8 -5 -5 -2 -4 -12 -N -2 -3 6 2 -7 -2 0 -1 1 -4 -5 0 -6 -6 -4 1 -1 -6 -3 -5 5 -1 -2 -12 -D -2 -6 2 7 -10 -1 3 -2 -2 -5 -9 -2 -7 -11 -5 -2 -3 -11 -8 -6 5 2 -3 -12 -C -5 -6 -7 -10 9 -10 -10 -7 -6 -4 -11 -10 -10 -9 -6 -1 -5 -12 -2 -4 -9 -10 -6 -12 -Q -3 0 -2 -1 -10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 -5 6 -5 -5 -3 -12 -B -2 -5 5 5 -9 -1 2 -2 0 -4 -7 -1 -6 -8 -4 0 -2 -8 -5 -5 5 1 -3 -12 -Z -2 -2 -1 2 -10 6 5 -3 0 -4 -5 -2 -4 -10 -2 -3 -4 -11 -7 -5 1 5 -3 -12 -X -2 -4 -2 -3 -6 -3 -3 -3 -3 -3 -4 -3 -3 -5 -3 -2 -2 -8 -5 -3 -3 -3 -3 -12 -* -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 -12 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM70 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM70 deleted file mode 100644 index b20cdf0..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM70 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 70 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -2.77, Entropy = 1.60 bits -# -# Lowest score = -11, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 5 -4 -2 -1 -4 -2 -1 0 -4 -2 -4 -4 -3 -6 0 1 1 -9 -5 -1 -1 -1 -2 -11 -R -4 8 -3 -6 -5 0 -5 -6 0 -3 -6 2 -2 -7 -2 -1 -4 0 -7 -5 -4 -2 -3 -11 -N -2 -3 6 3 -7 -1 0 -1 1 -3 -5 0 -5 -6 -3 1 0 -6 -3 -5 5 -1 -2 -11 -D -1 -6 3 6 -9 0 3 -1 -1 -5 -8 -2 -7 -10 -4 -1 -2 -10 -7 -5 5 2 -3 -11 -C -4 -5 -7 -9 9 -9 -9 -6 -5 -4 -10 -9 -9 -8 -5 -1 -5 -11 -2 -4 -8 -9 -6 -11 -Q -2 0 -1 0 -9 7 2 -4 2 -5 -3 -1 -2 -9 -1 -3 -3 -8 -8 -4 -1 5 -2 -11 -E -1 -5 0 3 -9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5 5 1 -2 -11 -Z -1 -2 -1 2 -9 5 5 -3 1 -4 -4 -2 -3 -9 -2 -2 -3 -10 -7 -4 1 5 -3 -11 -X -2 -3 -2 -3 -6 -2 -3 -3 -3 -3 -4 -3 -3 -5 -3 -1 -2 -7 -5 -2 -2 -3 -3 -11 -* -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM80 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM80 deleted file mode 100644 index 55aa043..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM80 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 80 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -2.55, Entropy = 1.44 bits -# -# Lowest score = -11, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -4 -1 -1 -4 -2 -1 0 -4 -2 -4 -4 -3 -5 0 1 1 -8 -5 0 -1 -1 -1 -11 -R -4 7 -2 -5 -5 0 -4 -6 0 -3 -5 2 -2 -6 -2 -1 -3 0 -7 -5 -3 -1 -3 -11 -N -1 -2 5 3 -6 -1 0 -1 2 -3 -5 0 -4 -5 -3 1 0 -5 -3 -4 4 0 -1 -11 -D -1 -5 3 6 -9 0 4 -1 -1 -4 -7 -2 -6 -9 -4 -1 -2 -10 -7 -5 5 2 -3 -11 -C -4 -5 -6 -9 9 -9 -9 -6 -5 -4 -9 -9 -8 -8 -5 -1 -4 -10 -2 -3 -7 -9 -5 -11 -Q -2 0 -1 0 -9 7 2 -4 2 -4 -3 -1 -2 -8 -1 -3 -3 -8 -7 -4 0 5 -2 -11 -E -1 -4 0 4 -9 2 6 -2 -2 -3 -6 -2 -4 -9 -3 -2 -3 -11 -6 -4 2 5 -2 -11 -G 0 -6 -1 -1 -6 -4 -2 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-X -1 -3 -1 -3 -5 -2 -2 -3 -2 -2 -3 -3 -2 -5 -2 -1 -1 -7 -4 -2 -2 -2 -3 -11 -* -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 -11 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM90 b/maven-src/target/classes/java/jaligner/matrix/matrices/PAM90 deleted file mode 100644 index fa2d5b3..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/matrices/PAM90 +++ /dev/null @@ -1,34 +0,0 @@ -# -# This matrix was produced by "pam" Version 1.0.6 [28-Jul-93] -# -# PAM 90 substitution matrix, scale = ln(2)/2 = 0.346574 -# -# Expected score = -2.26, Entropy = 1.30 bits -# -# Lowest score = -10, Highest score = 13 -# - A R N D C Q E G H I L K M F P S T W Y V B Z X * -A 4 -4 -1 -1 -3 -2 0 0 -4 -2 -3 -3 -2 -5 0 1 1 -8 -5 0 -1 -1 -1 -10 -R -4 7 -2 -5 -5 0 -4 -5 1 -3 -5 2 -2 -6 -1 -1 -3 0 -6 -4 -3 -1 -2 -10 -N -1 -2 5 3 -6 -1 0 -1 2 -3 -4 1 -4 -5 -2 1 0 -5 -2 -4 4 0 -1 -10 -D -1 -5 3 6 -8 0 4 -1 -1 -4 -7 -2 -5 -8 -4 -1 -2 -9 -6 -4 5 3 -2 -10 -C -3 -5 -6 -8 9 -8 -8 -5 -5 -3 -9 -8 -8 -7 -5 -1 -4 -10 -1 -3 -7 -8 -5 -10 -Q -2 0 -1 0 -8 6 2 -3 2 -4 -3 -1 -2 -7 -1 -2 -3 -7 -6 -4 0 5 -2 -10 -E 0 -4 0 4 -8 2 6 -1 -1 -3 -5 -2 -4 -8 -2 -2 -2 -10 -6 -3 2 5 -2 -10 -G 0 -5 -1 -1 -5 -3 -1 5 -5 -5 -6 -4 -5 -6 -3 0 -2 -9 -8 -3 -1 -2 -2 -10 -H -4 1 2 -1 -5 2 -1 -5 8 -5 -3 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 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 1 diff --git a/maven-src/target/classes/java/jaligner/matrix/package.html b/maven-src/target/classes/java/jaligner/matrix/package.html deleted file mode 100644 index d5583c2..0000000 --- a/maven-src/target/classes/java/jaligner/matrix/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Scoring matrices package. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/package.html b/maven-src/target/classes/java/jaligner/package.html deleted file mode 100644 index 614c03d..0000000 --- a/maven-src/target/classes/java/jaligner/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Core classes for the implementation of Smith-Waterman-Gotoh algorithm -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/test/AlignmentScoreChecker.java b/maven-src/target/classes/java/jaligner/test/AlignmentScoreChecker.java deleted file mode 100644 index 4a57cc5..0000000 --- a/maven-src/target/classes/java/jaligner/test/AlignmentScoreChecker.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * $Id: AlignmentScoreChecker.java,v 1.2 2005/04/18 14:06:15 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.test; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.formats.Format; -import jaligner.formats.Pair; -import jaligner.matrix.Matrix; -import jaligner.matrix.MatrixLoader; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Random; - -/** - * Testing the scores of the alignments of the SmithWaterman algorithm - * - * @author Bram Minnaert - */ - -public class AlignmentScoreChecker { - - public static void main(String[] args) { - - int numberOfTests = Integer.parseInt(args[0]); - int sequencesSize = Integer.parseInt(args[1]); - Random random = new Random(); - Format format = new Pair(); - - try { - ArrayList matrices = new ArrayList(); - for (Iterator i = MatrixLoader.list().iterator(); i.hasNext();) { - matrices.add(i.next()); - } - int countOfMatrices = matrices.size(); - - int i = 1; - while (i <= numberOfTests) { - - System.gc(); - - String s1 = RandomSequenceGenerator.generate(sequencesSize); - String s2 = RandomSequenceGenerator.generate(sequencesSize); - - int o = random.nextInt(50); - int e = random.nextInt(10); - - if (s1.length() > 0 && s2.length() > 0 && o >= e) { - - Matrix matrix = (Matrix) MatrixLoader - .load((String) matrices.get(random - .nextInt(countOfMatrices))); - Sequence seq1 = new Sequence(s1); - Sequence seq2 = new Sequence(s2); - - Alignment alignment1 = SmithWatermanGotoh.align(seq1, seq2, - matrix, o, e); - - if (!alignment1.checkScore()) { - System.err.println("Invalid alignment found:"); - System.err.println("Sequence 1 = " + s1); - System.err.println("Sequence 2 = " + s2); - System.err.println(format.format(alignment1)); - System.err.println(alignment1.getSummary()); - System.err - .println("The score of the alignment above is: " - + alignment1.calculateScore()); - System.exit(1); - } - - Alignment alignment2 = SmithWatermanGotoh.align(seq2, seq1, - matrix, o, e); - if (!alignment1.checkScore()) { - System.err.println("Invalid alignment found:"); - System.err.println("Sequence 1 = " + s2); - System.err.println("Sequence 2 = " + s1); - System.err.println(format.format(alignment2)); - System.err.println(alignment2.getSummary()); - System.err - .println("The score of the alignment above is: " - + alignment2.calculateScore()); - System.exit(1); - } - - if (alignment1.getScore() != alignment2.getScore()) { - System.err.println("Not symmetric alignment:"); - - System.err.println("Alignment #1: "); - System.err.println("Sequence 1 = " + s1); - System.err.println("Sequence 2 = " + s2); - System.err.println(format.format(alignment1)); - System.err.println(alignment1.getSummary()); - - System.err.println(); - - System.err.println("Alignment #2: "); - System.err.println("Sequence 1 = " + s2); - System.err.println("Sequence 2 = " + s1); - System.err.println(format.format(alignment2)); - System.err.println(alignment2.getSummary()); - - System.exit(1); - } - } - System.out.println("Processed " + i + "/" + numberOfTests); - i++; - } - } catch (Exception e) { - e.printStackTrace(); - System.exit(1); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/test/RandomSequenceGenerator.java b/maven-src/target/classes/java/jaligner/test/RandomSequenceGenerator.java deleted file mode 100644 index 0701d80..0000000 --- a/maven-src/target/classes/java/jaligner/test/RandomSequenceGenerator.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * $Id: RandomSequenceGenerator.java,v 1.1 2005/04/03 19:38:21 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.test; - -import java.util.Random; - -/** - * This class contains a random generator for smithwaterman sequences. - * - * @author Bram Minnaert - */ - -public class RandomSequenceGenerator { - - /** - * All possible characters - */ - private static final char[] CHARS = { - 'A', 'R', 'N', 'D', 'C', 'Q', 'E', - 'G', 'H', 'I', 'L', 'K', 'M', 'F', 'P', - 'S', 'T', 'W', 'Y', 'V', 'B', 'Z', 'X'}; - - /** - * Number of possible characters - */ - private static final int NUMBER_OF_CHARS = CHARS.length; - - /** - * Random generator - */ - private static Random random = new Random(); - - /** - * Returns random sequence - * @param length Size of the sequence - * @return Random sequence - */ - public static String generate(int length) { - StringBuffer buffer = new StringBuffer(); - char randomChar; - int randomInt; - for (int i = 0; i < length ; i++) { - randomInt = random.nextInt(NUMBER_OF_CHARS); - randomChar = CHARS[randomInt]; - buffer.append(randomChar); - } - return buffer.toString(); - } - - /** - * Displays 10 random smithwaterman sequences with length 50. - * @param args no args - */ - public static void main(String[] args) { - for (int i = 0; i < 10; i++) { - System.out.println("S" + i + " = " + generate(50)); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/test/package.html b/maven-src/target/classes/java/jaligner/test/package.html deleted file mode 100644 index 56c88e4..0000000 --- a/maven-src/target/classes/java/jaligner/test/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Testing package. -@author Bram Minnaert - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/AlignCommandLine.java b/maven-src/target/classes/java/jaligner/ui/AlignCommandLine.java deleted file mode 100644 index bdc0df8..0000000 --- a/maven-src/target/classes/java/jaligner/ui/AlignCommandLine.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * $Id: AlignCommandLine.java,v 1.7 2005/04/18 05:37:52 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.formats.Pair; -import jaligner.matrix.Matrix; -import jaligner.matrix.MatrixLoader; -import jaligner.util.Commons; -import jaligner.util.SequenceParser; - -import java.io.File; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Command line interface for JAligner. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ -public class AlignCommandLine { - - private static final Logger logger = Logger.getLogger(AlignCommandLine.class.getName()); - - /** - * @param args The command line arguments - */ - public static void main(String[] args) { - logger.info( Commons.getJAlignerInfo() ); - - if (args.length == 0) { - new AlignWindow().setVisible(true); - } else { - if (args.length == 5) { - try { - - String f1 = args[0]; // file name of sequence #1 - String f2 = args[1]; // file name of sequence #1 - String m = args[2]; // scoring matrix id or file name user-defined scoring matrix - float o = Float.parseFloat(args[3]); // open gap penalty - float e = Float.parseFloat(args[4]); // extend gap penalty - - Sequence s1 = SequenceParser.parse(new File(f1)); - Sequence s2 = SequenceParser.parse(new File(f2)); - Matrix matrix = MatrixLoader.load(m); - Alignment alignment = SmithWatermanGotoh.align (s1, s2, matrix, o, e); - System.out.println (alignment.getSummary()); - System.out.println (new Pair().format(alignment)); - } catch (Exception e) { - logger.log(Level.SEVERE, "Failed processing the command line: " + e.getMessage(), e); - System.exit(1); - } - } else { - logger.severe( "Invalid number of arguments: " + args.length ); - printUsage(); - System.exit(1); - } - } - - } - - /** - * Prints the syntax for using JAligner - */ - private static void printUsage( ) { - StringBuffer buffer = new StringBuffer(); - buffer.append ( "\n" ); - buffer.append ( "Usage:\n" ); - buffer.append ( "------\n" ); - buffer.append ( "[1] java -jar jaligner.jar \n" ); - buffer.append ( "[2] java -jar jaligner.jar\n" ); - buffer.append ( "\n" ) ; - logger.info(buffer.toString()); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/AlignWindow.form b/maven-src/target/classes/java/jaligner/ui/AlignWindow.form deleted file mode 100644 index 20c67ee..0000000 --- a/maven-src/target/classes/java/jaligner/ui/AlignWindow.form +++ /dev/null @@ -1,896 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/maven-src/target/classes/java/jaligner/ui/AlignWindow.java b/maven-src/target/classes/java/jaligner/ui/AlignWindow.java deleted file mode 100644 index 6f099cf..0000000 --- a/maven-src/target/classes/java/jaligner/ui/AlignWindow.java +++ /dev/null @@ -1,1663 +0,0 @@ - - -package jaligner.ui; - -import jaligner.Alignment; -import jaligner.Sequence; -import jaligner.SmithWatermanGotoh; -import jaligner.example.Example; -import jaligner.formats.CLUSTAL; -import jaligner.formats.FASTA; -import jaligner.formats.FormatFactory; -import jaligner.formats.Pair; -import jaligner.matrix.Matrix; -import jaligner.matrix.MatrixLoader; -import jaligner.ui.clipboard.ClipboardListener; -import jaligner.ui.clipboard.ClipboardPoller; -import jaligner.ui.filechooser.FileChooserFactory; -import jaligner.ui.filechooser.NamedInputStream; -import jaligner.ui.images.ToolbarIcons; -import jaligner.ui.logging.DocumentHandler; -import jaligner.ui.util.TextComponentUtil; -import jaligner.ui.util.TextComponentUtilException; -import jaligner.util.Commons; -import jaligner.util.SequenceParser; - -import java.awt.Color; -import java.awt.Component; -import java.awt.Cursor; -import java.awt.Image; -import java.awt.event.ActionEvent; -import java.awt.event.MouseEvent; -import java.net.URL; -import java.text.DecimalFormat; -import java.util.Collection; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.swing.AbstractAction; -import javax.swing.AbstractButton; -import javax.swing.Action; -import javax.swing.JComboBox; -import javax.swing.JFormattedTextField; -import javax.swing.JOptionPane; -import javax.swing.JTextArea; -import javax.swing.KeyStroke; -import javax.swing.event.CaretEvent; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.text.JTextComponent; - -/** - * Graphical user inteface for JAligner. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class AlignWindow extends javax.swing.JFrame implements ClipboardListener, DocumentListener { - /** - * - */ - private static final long serialVersionUID = 3257844376876364850L; - - /** - * Window width - */ - private static final int WINDOW_WIDTH = 800; - - /** - * Window height - */ - private static final int WINDOW_HEIGHT = 600; - - /** - * Default open gap penalty - */ - private static final float DEFAULT_OPEN_GAP_PENALTY = 10f; - - /** - * Default extend gap penalty - */ - private static final float DEFAULT_EXTEND_GAP_PENALTY = 0.5f; - - /** - * Default scoring matrix - */ - private static final String DEFAULT_SCORING_MATRIX = "BLOSUM62"; - - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(AlignWindow.class.getName()); - - /** - * Clipboard poller thread - */ - private ClipboardPoller clipboardPoller = null; - - /** - * Loaded scoring matrices - */ - private HashMap matrices = new HashMap(); - - /** - * Current text component - */ - private JTextComponent currentTextComponent = null; - - // The actions - public Action nextFocusAction = new AbstractAction("Move Focus Forwards") { - /** - * - */ - private static final long serialVersionUID = 3763091972940183858L; - - public void actionPerformed(ActionEvent evt) { - ((Component)evt.getSource()).transferFocus(); - } - }; - - public Action prevFocusAction = new AbstractAction("Move Focus Backwards") { - /** - * - */ - private static final long serialVersionUID = 3257844402628997943L; - - public void actionPerformed(ActionEvent evt) { - ((Component)evt.getSource()).transferFocusBackward(); - } - }; - - /** - * Constructor - */ - public AlignWindow() { - initComponents(); - - logger.addHandler(new DocumentHandler(jTextPaneConsole)); - - try { - // Set the icon for the frame - URL url = getClass().getResource( ToolbarIcons.GIFS_HOME + "jaligner.gif"); - if (url != null) { - Image image = java.awt.Toolkit.getDefaultToolkit().getImage(url); - setIconImage(image); - } else { - logger.warning("Image URL is NULL"); - } - } catch (Exception e) { - logger.log(Level.WARNING, "Failed setting the frame image: " + e.getMessage(), e); - } - - jMenuItemFileOpen.setVisible(false); - - jFormattedTextFieldGapOpen.setValue(new Float(DEFAULT_OPEN_GAP_PENALTY)); - jFormattedTextFieldGapExtend.setValue(new Float(DEFAULT_EXTEND_GAP_PENALTY)); - - Collection matrices = null; - try { - matrices = MatrixLoader.list(false); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed getting list of scoring matrices: " + e.getMessage(), e); - } - if (matrices != null) { - populateComboBox(jComboBoxScoringMatrix, matrices, DEFAULT_SCORING_MATRIX); - } - - FormatFactory.getInstance().registerFormat(new CLUSTAL()); - FormatFactory.getInstance().registerFormat(new Pair()); - FormatFactory.getInstance().registerFormat(new FASTA()); - - Collection formats = FormatFactory.getInstance().getFormats(); - String[] outputFormats = new String[formats.size()]; - Iterator i = formats.iterator(); - for (int j = 0; i.hasNext(); j++) { - outputFormats[j] = (String) i.next(); - } - populateComboBox(jComboBoxOutputFormat, outputFormats, null); - - jTextAreaSequence1.getDocument().addDocumentListener(this); - jTextAreaSequence2.getDocument().addDocumentListener(this); - jTextAreaAlignment.getDocument().addDocumentListener(this); - - // Add actions - jTextAreaSequence1.getInputMap().put(KeyStroke.getKeyStroke("TAB"), nextFocusAction.getClass().getName()); - jTextAreaSequence1.getActionMap().put(nextFocusAction.getClass().getName(), nextFocusAction); - jTextAreaSequence1.getInputMap().put(KeyStroke.getKeyStroke("shift TAB"), prevFocusAction.getClass().getName()); - jTextAreaSequence1.getActionMap().put(prevFocusAction.getClass().getName(), prevFocusAction); - - jTextAreaSequence2.getInputMap().put(KeyStroke.getKeyStroke("TAB"), nextFocusAction.getClass().getName()); - jTextAreaSequence2.getActionMap().put(nextFocusAction.getClass().getName(), nextFocusAction); - jTextAreaSequence2.getInputMap().put(KeyStroke.getKeyStroke("shift TAB"), prevFocusAction.getClass().getName()); - jTextAreaSequence2.getActionMap().put(prevFocusAction.getClass().getName(), prevFocusAction); - - // Add radio buttons to group - buttonGroupSequences.add(jRadioButtonSequence1); - buttonGroupSequences.add(jRadioButtonSequence2); - buttonGroupSequences.add(jRadioButtonAlignment); - buttonGroupSequences.add(jRadioButtonConsole); - - // Split the space - jSplitPaneBody.setResizeWeight(.9D); - jSplitPaneIO.setResizeWeight(.5D); - jSplitPaneSequences.setResizeWeight(.5D); - - // Set the focus on the text area for sequence #1 - jTextAreaSequence1.requestFocus(); - - // Start the clipboard checker - clipboardPoller = new ClipboardPoller(this); - clipboardPoller.start(); - - // Hide the print menu item in under the File menu - jMenuItemFilePrint.setVisible(false); - - // Set the frame size - this.setSize(WINDOW_WIDTH, WINDOW_HEIGHT); - } - - private void initComponents() {//GEN-BEGIN:initComponents - jPopup = new javax.swing.JPopupMenu(); - jPopupOpen = new javax.swing.JMenuItem(); - jPopupSave = new javax.swing.JMenuItem(); - jPopupSeparator1 = new javax.swing.JSeparator(); - jPopupCut = new javax.swing.JMenuItem(); - jPopupCopy = new javax.swing.JMenuItem(); - jPopupPaste = new javax.swing.JMenuItem(); - jPopupDelete = new javax.swing.JMenuItem(); - jPopupSeparator2 = new javax.swing.JSeparator(); - jPopupPrint = new javax.swing.JMenuItem(); - jPopupSeparator3 = new javax.swing.JSeparator(); - jPopupSelectAll = new javax.swing.JMenuItem(); - buttonGroupSequences = new javax.swing.ButtonGroup(); - jToolBar = new javax.swing.JToolBar(); - jButtonOpen = new javax.swing.JButton(); - jButtonSave = new javax.swing.JButton(); - jButtonCut = new javax.swing.JButton(); - jButtonCopy = new javax.swing.JButton(); - jButtonPaste = new javax.swing.JButton(); - jButtonDelete = new javax.swing.JButton(); - jButtonPrint = new javax.swing.JButton(); - jButtonExit = new javax.swing.JButton(); - jSplitPaneBody = new javax.swing.JSplitPane(); - jSplitPaneIO = new javax.swing.JSplitPane(); - jSplitPaneSequences = new javax.swing.JSplitPane(); - jPanelSequence1 = new javax.swing.JPanel(); - jScrollPaneSequence1 = new javax.swing.JScrollPane(); - jTextAreaSequence1 = new JTextArea(); - jRadioButtonSequence1 = new javax.swing.JRadioButton(); - jPanelSequence2 = new javax.swing.JPanel(); - jScrollPaneSequence2 = new javax.swing.JScrollPane(); - jTextAreaSequence2 = new JTextArea(); - jRadioButtonSequence2 = new javax.swing.JRadioButton(); - jPanelAlignment = new javax.swing.JPanel(); - jRadioButtonAlignment = new javax.swing.JRadioButton(); - jScrollPaneAlignment = new javax.swing.JScrollPane(); - jTextAreaAlignment = new JTextArea(); - jPanelConsole = new javax.swing.JPanel(); - jRadioButtonConsole = new javax.swing.JRadioButton(); - jScrollPaneConsole = new javax.swing.JScrollPane(); - jTextPaneConsole = new javax.swing.JTextPane(); - jPanelControls = new javax.swing.JPanel(); - jPanelScoringMatrix = new javax.swing.JPanel(); - jLabelScoringMatrix = new javax.swing.JLabel(); - jComboBoxScoringMatrix = new JComboBox(); - jPanelGapOpen = new javax.swing.JPanel(); - jLabelOpenGapPenalty = new javax.swing.JLabel(); - jFormattedTextFieldGapOpen = new JFormattedTextField(new DecimalFormat("##0.0##")); - jPanelGapExtend = new javax.swing.JPanel(); - jLabelExtendGapPenalty = new javax.swing.JLabel(); - jFormattedTextFieldGapExtend = new JFormattedTextField(new DecimalFormat("##0.0##")); - jPanelOutputFormat = new javax.swing.JPanel(); - jLabelOutputFormat = new javax.swing.JLabel(); - jComboBoxOutputFormat = new JComboBox(); - jPanelGo = new javax.swing.JPanel(); - jButtonGo = new javax.swing.JButton(); - jMenuBar = new javax.swing.JMenuBar(); - jMenuFile = new javax.swing.JMenu(); - jMenuItemFileOpen = new javax.swing.JMenuItem(); - jMenuItemFileLoadSequence1 = new javax.swing.JMenuItem(); - jMenuItemFileLoadSequence2 = new javax.swing.JMenuItem(); - jMenuItemFileLoadMatrix = new javax.swing.JMenuItem(); - jSeparatorFile = new javax.swing.JSeparator(); - jMenuItemFileExit = new javax.swing.JMenuItem(); - jMenuItemFilePrint = new javax.swing.JMenuItem(); - jMenuEdit = new javax.swing.JMenu(); - jMenuItemEditCut = new javax.swing.JMenuItem(); - jMenuItemEditCopy = new javax.swing.JMenuItem(); - jMenuItemEditPaste = new javax.swing.JMenuItem(); - jMenuItemEditDelete = new javax.swing.JMenuItem(); - jMenuItemEditSelectAll = new javax.swing.JMenuItem(); - jMenuTools = new javax.swing.JMenu(); - jMenuItemToolsRunExample = new javax.swing.JMenuItem(); - jMenuHelp = new javax.swing.JMenu(); - jMenuItemAbout = new javax.swing.JMenuItem(); - - jPopupOpen.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); - jPopupOpen.setIcon(ToolbarIcons.OPEN); - jPopupOpen.setMnemonic('O'); - jPopupOpen.setText("Open..."); - jPopupOpen.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupOpenActionPerformed(evt); - } - }); - - jPopup.add(jPopupOpen); - - jPopupSave.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); - jPopupSave.setIcon(ToolbarIcons.SAVE); - jPopupSave.setMnemonic('S'); - jPopupSave.setText("Save..."); - jPopupSave.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupSaveActionPerformed(evt); - } - }); - - jPopup.add(jPopupSave); - - jPopup.add(jPopupSeparator1); - - jPopupCut.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK)); - jPopupCut.setIcon(ToolbarIcons.CUT); - jPopupCut.setMnemonic('t'); - jPopupCut.setText("Cut"); - jPopupCut.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupCutActionPerformed(evt); - } - }); - - jPopup.add(jPopupCut); - - jPopupCopy.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK)); - jPopupCopy.setIcon(ToolbarIcons.COPY); - jPopupCopy.setMnemonic('C'); - jPopupCopy.setText("Copy"); - jPopupCopy.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupCopyActionPerformed(evt); - } - }); - - jPopup.add(jPopupCopy); - - jPopupPaste.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK)); - jPopupPaste.setIcon(ToolbarIcons.PASTE); - jPopupPaste.setMnemonic('P'); - jPopupPaste.setText("Paste"); - jPopupPaste.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupPasteActionPerformed(evt); - } - }); - - jPopup.add(jPopupPaste); - - jPopupDelete.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, 0)); - jPopupDelete.setIcon(ToolbarIcons.DELETE); - jPopupDelete.setMnemonic('D'); - jPopupDelete.setText("Delete"); - jPopupDelete.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupDeleteActionPerformed(evt); - } - }); - - jPopup.add(jPopupDelete); - - jPopup.add(jPopupSeparator2); - - jPopupPrint.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); - jPopupPrint.setIcon(ToolbarIcons.PRINT); - jPopupPrint.setMnemonic('D'); - jPopupPrint.setText("Print"); - jPopupPrint.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupPrintActionPerformed(evt); - } - }); - - jPopup.add(jPopupPrint); - - jPopup.add(jPopupSeparator3); - - jPopupSelectAll.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); - jPopupSelectAll.setMnemonic('A'); - jPopupSelectAll.setText("Select All"); - jPopupSelectAll.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jPopupSelectAllActionPerformed(evt); - } - }); - - jPopup.add(jPopupSelectAll); - - setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); - setTitle("JAligner - biological pairwise sequence alignment "); - setName("AlignWindow"); - addWindowListener(new java.awt.event.WindowAdapter() { - public void windowClosing(java.awt.event.WindowEvent evt) { - exitForm(evt); - } - }); - - jButtonOpen.setIcon(ToolbarIcons.OPEN); - jButtonOpen.setToolTipText("Open..."); - jButtonOpen.setFocusable(false); - jButtonOpen.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonOpen.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonOpenActionPerformed(evt); - } - }); - - jToolBar.add(jButtonOpen); - - jButtonSave.setIcon(ToolbarIcons.SAVE); - jButtonSave.setToolTipText("Save..."); - jButtonSave.setFocusable(false); - jButtonSave.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonSave.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonSaveActionPerformed(evt); - } - }); - - jToolBar.add(jButtonSave); - - jButtonCut.setIcon(ToolbarIcons.CUT); - jButtonCut.setToolTipText("Cut"); - jButtonCut.setFocusable(false); - jButtonCut.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonCut.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonCutActionPerformed(evt); - } - }); - - jToolBar.add(jButtonCut); - - jButtonCopy.setIcon(ToolbarIcons.COPY); - jButtonCopy.setToolTipText("Copy"); - jButtonCopy.setFocusable(false); - jButtonCopy.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonCopy.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonCopyActionPerformed(evt); - } - }); - - jToolBar.add(jButtonCopy); - - jButtonPaste.setIcon(ToolbarIcons.PASTE); - jButtonPaste.setToolTipText("Paste"); - jButtonPaste.setFocusable(false); - jButtonPaste.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonPaste.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonPasteActionPerformed(evt); - } - }); - - jToolBar.add(jButtonPaste); - - jButtonDelete.setIcon(ToolbarIcons.DELETE); - jButtonDelete.setToolTipText("Delete"); - jButtonDelete.setFocusable(false); - jButtonDelete.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonDelete.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonDeleteActionPerformed(evt); - } - }); - - jToolBar.add(jButtonDelete); - - jButtonPrint.setIcon(ToolbarIcons.PRINT); - jButtonPrint.setToolTipText("Print"); - jButtonPrint.setFocusable(false); - jButtonPrint.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonPrint.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonPrintActionPerformed(evt); - } - }); - - jToolBar.add(jButtonPrint); - - jButtonExit.setIcon(ToolbarIcons.CLOSE); - jButtonExit.setToolTipText("Exit"); - jButtonExit.setFocusable(false); - jButtonExit.setPreferredSize(new java.awt.Dimension(24, 24)); - jButtonExit.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonExitActionPerformed(evt); - } - }); - - jToolBar.add(jButtonExit); - - getContentPane().add(jToolBar, java.awt.BorderLayout.NORTH); - - jSplitPaneBody.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); - jSplitPaneBody.setOneTouchExpandable(true); - jSplitPaneIO.setOneTouchExpandable(true); - jSplitPaneSequences.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); - jSplitPaneSequences.setOneTouchExpandable(true); - jPanelSequence1.setLayout(new java.awt.BorderLayout()); - - jScrollPaneSequence1.setPreferredSize(new java.awt.Dimension(400, 50)); - jTextAreaSequence1.setFont(new java.awt.Font("DialogInput", 0, 12)); - jTextAreaSequence1.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTextAreaSequence1FocusGained(evt); - } - }); - jTextAreaSequence1.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(MouseEvent evt) { - jTextAreaSequence1MouseClicked(evt); - } - }); - jTextAreaSequence1.addCaretListener(new javax.swing.event.CaretListener() { - public void caretUpdate(CaretEvent evt) { - jTextAreaSequence1CaretUpdate(evt); - } - }); - - jScrollPaneSequence1.setViewportView(jTextAreaSequence1); - - jPanelSequence1.add(jScrollPaneSequence1, java.awt.BorderLayout.CENTER); - - jRadioButtonSequence1.setMnemonic('1'); - jRadioButtonSequence1.setText("Sequence #1"); - jRadioButtonSequence1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jRadioButtonSequence1ActionPerformed(evt); - } - }); - - jPanelSequence1.add(jRadioButtonSequence1, java.awt.BorderLayout.NORTH); - - jSplitPaneSequences.setTopComponent(jPanelSequence1); - - jPanelSequence2.setLayout(new java.awt.BorderLayout()); - - jScrollPaneSequence2.setPreferredSize(new java.awt.Dimension(400, 50)); - jTextAreaSequence2.setFont(new java.awt.Font("DialogInput", 0, 12)); - jTextAreaSequence2.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTextAreaSequence2FocusGained(evt); - } - }); - jTextAreaSequence2.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(MouseEvent evt) { - jTextAreaSequence2MouseClicked(evt); - } - }); - jTextAreaSequence2.addCaretListener(new javax.swing.event.CaretListener() { - public void caretUpdate(CaretEvent evt) { - jTextAreaSequence2CaretUpdate(evt); - } - }); - - jScrollPaneSequence2.setViewportView(jTextAreaSequence2); - - jPanelSequence2.add(jScrollPaneSequence2, java.awt.BorderLayout.CENTER); - - jRadioButtonSequence2.setMnemonic('2'); - jRadioButtonSequence2.setText("Sequence #2"); - jRadioButtonSequence2.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jRadioButtonSequence2ActionPerformed(evt); - } - }); - - jPanelSequence2.add(jRadioButtonSequence2, java.awt.BorderLayout.NORTH); - - jSplitPaneSequences.setBottomComponent(jPanelSequence2); - - jSplitPaneIO.setLeftComponent(jSplitPaneSequences); - - jPanelAlignment.setLayout(new java.awt.BorderLayout()); - - jRadioButtonAlignment.setMnemonic('A'); - jRadioButtonAlignment.setText("Alignment"); - jRadioButtonAlignment.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jRadioButtonAlignmentActionPerformed(evt); - } - }); - - jPanelAlignment.add(jRadioButtonAlignment, java.awt.BorderLayout.NORTH); - - jScrollPaneAlignment.setPreferredSize(new java.awt.Dimension(400, 50)); - jTextAreaAlignment.setEditable(false); - jTextAreaAlignment.setFont(new java.awt.Font("DialogInput", 0, 12)); - jTextAreaAlignment.setTabSize(0); - jTextAreaAlignment.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTextAreaAlignmentFocusGained(evt); - } - }); - jTextAreaAlignment.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(MouseEvent evt) { - jTextAreaAlignmentMouseClicked(evt); - } - }); - jTextAreaAlignment.addCaretListener(new javax.swing.event.CaretListener() { - public void caretUpdate(CaretEvent evt) { - jTextAreaAlignmentCaretUpdate(evt); - } - }); - - jScrollPaneAlignment.setViewportView(jTextAreaAlignment); - - jPanelAlignment.add(jScrollPaneAlignment, java.awt.BorderLayout.CENTER); - - jSplitPaneIO.setRightComponent(jPanelAlignment); - - jSplitPaneBody.setTopComponent(jSplitPaneIO); - - jPanelConsole.setLayout(new java.awt.BorderLayout()); - - jRadioButtonConsole.setMnemonic('C'); - jRadioButtonConsole.setText("Console"); - jRadioButtonConsole.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jRadioButtonConsoleActionPerformed(evt); - } - }); - - jPanelConsole.add(jRadioButtonConsole, java.awt.BorderLayout.NORTH); - - jScrollPaneConsole.setPreferredSize(new java.awt.Dimension(400, 50)); - jTextPaneConsole.setEditable(false); - jTextPaneConsole.addFocusListener(new java.awt.event.FocusAdapter() { - public void focusGained(java.awt.event.FocusEvent evt) { - jTextPaneConsoleFocusGained(evt); - } - }); - jTextPaneConsole.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseClicked(MouseEvent evt) { - jTextPaneConsoleMouseClicked(evt); - } - }); - jTextPaneConsole.addCaretListener(new javax.swing.event.CaretListener() { - public void caretUpdate(CaretEvent evt) { - jTextPaneConsoleCaretUpdate(evt); - } - }); - - jScrollPaneConsole.setViewportView(jTextPaneConsole); - - jPanelConsole.add(jScrollPaneConsole, java.awt.BorderLayout.CENTER); - - jSplitPaneBody.setBottomComponent(jPanelConsole); - - getContentPane().add(jSplitPaneBody, java.awt.BorderLayout.CENTER); - - jPanelControls.setLayout(new java.awt.GridLayout(1, 0)); - - jPanelControls.setAutoscrolls(true); - jLabelScoringMatrix.setDisplayedMnemonic('M'); - jLabelScoringMatrix.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - jLabelScoringMatrix.setLabelFor(jComboBoxScoringMatrix); - jLabelScoringMatrix.setText("Matrix"); - jPanelScoringMatrix.add(jLabelScoringMatrix); - - jComboBoxScoringMatrix.setToolTipText("Scoring matrix"); - jComboBoxScoringMatrix.setPrototypeDisplayValue("BLOSUMXXX"); - jPanelScoringMatrix.add(jComboBoxScoringMatrix); - - jPanelControls.add(jPanelScoringMatrix); - - jLabelOpenGapPenalty.setDisplayedMnemonic('O'); - jLabelOpenGapPenalty.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - jLabelOpenGapPenalty.setLabelFor(jFormattedTextFieldGapOpen); - jLabelOpenGapPenalty.setText("Open"); - jPanelGapOpen.add(jLabelOpenGapPenalty); - - jFormattedTextFieldGapOpen.setColumns(3); - jFormattedTextFieldGapOpen.setToolTipText("Gap open penalty"); - jPanelGapOpen.add(jFormattedTextFieldGapOpen); - - jPanelControls.add(jPanelGapOpen); - - jLabelExtendGapPenalty.setDisplayedMnemonic('E'); - jLabelExtendGapPenalty.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - jLabelExtendGapPenalty.setLabelFor(jFormattedTextFieldGapExtend); - jLabelExtendGapPenalty.setText("Extend"); - jPanelGapExtend.add(jLabelExtendGapPenalty); - - jFormattedTextFieldGapExtend.setColumns(3); - jFormattedTextFieldGapExtend.setToolTipText("Gap extend penalty"); - jPanelGapExtend.add(jFormattedTextFieldGapExtend); - - jPanelControls.add(jPanelGapExtend); - - jLabelOutputFormat.setDisplayedMnemonic('F'); - jLabelOutputFormat.setLabelFor(jComboBoxOutputFormat); - jLabelOutputFormat.setText("Format"); - jPanelOutputFormat.add(jLabelOutputFormat); - - jComboBoxOutputFormat.setToolTipText("Alignment output format"); - jComboBoxOutputFormat.setOpaque(false); - jPanelOutputFormat.add(jComboBoxOutputFormat); - - jPanelControls.add(jPanelOutputFormat); - - jButtonGo.setMnemonic('G'); - jButtonGo.setText("Go"); - jButtonGo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jButtonGoActionPerformed(evt); - } - }); - - jPanelGo.add(jButtonGo); - - jPanelControls.add(jPanelGo); - - getContentPane().add(jPanelControls, java.awt.BorderLayout.SOUTH); - - jMenuFile.setMnemonic('F'); - jMenuFile.setText("File"); - jMenuItemFileOpen.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemFileOpen.setIcon(ToolbarIcons.OPEN); - jMenuItemFileOpen.setMnemonic('O'); - jMenuItemFileOpen.setText("Open..."); - jMenuItemFileOpen.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFileOpenActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFileOpen); - - jMenuItemFileLoadSequence1.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemFileLoadSequence1.setIcon(ToolbarIcons.OPEN); - jMenuItemFileLoadSequence1.setMnemonic('1'); - jMenuItemFileLoadSequence1.setText("Load sequence #1..."); - jMenuItemFileLoadSequence1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFileLoadSequence1ActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFileLoadSequence1); - - jMenuItemFileLoadSequence2.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemFileLoadSequence2.setIcon(ToolbarIcons.OPEN); - jMenuItemFileLoadSequence2.setMnemonic('2'); - jMenuItemFileLoadSequence2.setText("Load sequence #2..."); - jMenuItemFileLoadSequence2.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFileLoadSequence2ActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFileLoadSequence2); - - jMenuItemFileLoadMatrix.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemFileLoadMatrix.setIcon(ToolbarIcons.OPEN); - jMenuItemFileLoadMatrix.setMnemonic('M'); - jMenuItemFileLoadMatrix.setText("Load scoring matrix..."); - jMenuItemFileLoadMatrix.setToolTipText("Load user-defined scoring matrix from file system"); - jMenuItemFileLoadMatrix.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFileLoadMatrixActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFileLoadMatrix); - - jMenuFile.add(jSeparatorFile); - - jMenuItemFileExit.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.ALT_MASK)); - jMenuItemFileExit.setIcon(ToolbarIcons.CLOSE); - jMenuItemFileExit.setMnemonic('X'); - jMenuItemFileExit.setText("Exit"); - jMenuItemFileExit.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFileExitActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFileExit); - - jMenuItemFilePrint.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemFilePrint.setIcon(ToolbarIcons.PRINT); - jMenuItemFilePrint.setText("Print..."); - jMenuItemFilePrint.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemFilePrintActionPerformed(evt); - } - }); - - jMenuFile.add(jMenuItemFilePrint); - - jMenuBar.add(jMenuFile); - - jMenuEdit.setMnemonic('E'); - jMenuEdit.setText("Edit"); - jMenuItemEditCut.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemEditCut.setIcon(ToolbarIcons.CUT); - jMenuItemEditCut.setMnemonic('t'); - jMenuItemEditCut.setText("Cut"); - jMenuItemEditCut.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemEditCutActionPerformed(evt); - } - }); - - jMenuEdit.add(jMenuItemEditCut); - - jMenuItemEditCopy.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemEditCopy.setIcon(ToolbarIcons.COPY); - jMenuItemEditCopy.setMnemonic('C'); - jMenuItemEditCopy.setText("Copy"); - jMenuItemEditCopy.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemEditCopyActionPerformed(evt); - } - }); - - jMenuEdit.add(jMenuItemEditCopy); - - jMenuItemEditPaste.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemEditPaste.setIcon(ToolbarIcons.PASTE); - jMenuItemEditPaste.setMnemonic('P'); - jMenuItemEditPaste.setText("Paste"); - jMenuItemEditPaste.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemEditPasteActionPerformed(evt); - } - }); - - jMenuEdit.add(jMenuItemEditPaste); - - jMenuItemEditDelete.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DELETE, 0)); - jMenuItemEditDelete.setIcon(ToolbarIcons.DELETE); - jMenuItemEditDelete.setMnemonic('D'); - jMenuItemEditDelete.setText("Delete"); - jMenuItemEditDelete.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemEditDeleteActionPerformed(evt); - } - }); - - jMenuEdit.add(jMenuItemEditDelete); - - jMenuItemEditSelectAll.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); - jMenuItemEditSelectAll.setMnemonic('A'); - jMenuItemEditSelectAll.setText("Select All"); - jMenuItemEditSelectAll.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemEditSelectAllActionPerformed(evt); - } - }); - - jMenuEdit.add(jMenuItemEditSelectAll); - - jMenuBar.add(jMenuEdit); - - jMenuTools.setMnemonic('T'); - jMenuTools.setText("Tools"); - jMenuItemToolsRunExample.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0)); - jMenuItemToolsRunExample.setMnemonic('E'); - jMenuItemToolsRunExample.setText("Example"); - jMenuItemToolsRunExample.setToolTipText("Aligns P53 human and P53 mouse"); - jMenuItemToolsRunExample.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemToolsRunExampleActionPerformed(evt); - } - }); - - jMenuTools.add(jMenuItemToolsRunExample); - - jMenuBar.add(jMenuTools); - - jMenuHelp.setMnemonic('H'); - jMenuHelp.setText("Help"); - jMenuItemAbout.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0)); - jMenuItemAbout.setIcon(ToolbarIcons.ABOUT); - jMenuItemAbout.setMnemonic('A'); - jMenuItemAbout.setText("About..."); - jMenuItemAbout.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent evt) { - jMenuItemAboutActionPerformed(evt); - } - }); - - jMenuHelp.add(jMenuItemAbout); - - jMenuBar.add(jMenuHelp); - - setJMenuBar(jMenuBar); - - pack(); - }//GEN-END:initComponents - - private void jPopupPrintActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupPrintActionPerformed - print(); - }//GEN-LAST:event_jPopupPrintActionPerformed - - private void jMenuItemToolsRunExampleActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemToolsRunExampleActionPerformed - try { - logger.info("Running the example..."); - jTextAreaSequence1.setText(Example.loadP53Human()); - jTextAreaSequence2.setText(Example.loadP53Mouse()); - align(); - jTextAreaAlignment.requestFocus(); - logger.info("Finished running the example..."); - } catch (Exception e) { - logger.log(Level.SEVERE, "Failed running the example: " + e.getMessage(), e); - } - - }//GEN-LAST:event_jMenuItemToolsRunExampleActionPerformed - - private void jMenuItemFilePrintActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFilePrintActionPerformed - print(); - }//GEN-LAST:event_jMenuItemFilePrintActionPerformed - - private void jButtonPrintActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonPrintActionPerformed - print(); - }//GEN-LAST:event_jButtonPrintActionPerformed - - private void jTextPaneConsoleCaretUpdate(CaretEvent evt) {//GEN-FIRST:event_jTextPaneConsoleCaretUpdate - handleCaretUpdateEvent(evt); - }//GEN-LAST:event_jTextPaneConsoleCaretUpdate - - private void jTextPaneConsoleMouseClicked(MouseEvent evt) {//GEN-FIRST:event_jTextPaneConsoleMouseClicked - jTextPaneConsole.requestFocus(); - if (evt.getButton() == MouseEvent.BUTTON3) { - jPopup.show(evt.getComponent(), evt.getX(), evt.getY()); - } - }//GEN-LAST:event_jTextPaneConsoleMouseClicked - - private void jTextPaneConsoleFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextPaneConsoleFocusGained - currentTextComponent = jTextPaneConsole; - jRadioButtonConsole.setSelected(true); - handleMoveToTextComponent(); - }//GEN-LAST:event_jTextPaneConsoleFocusGained - - private void jRadioButtonConsoleActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jRadioButtonConsoleActionPerformed - jTextPaneConsole.requestFocus(); - }//GEN-LAST:event_jRadioButtonConsoleActionPerformed - - private void jTextAreaAlignmentFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextAreaAlignmentFocusGained - currentTextComponent = jTextAreaAlignment; - jRadioButtonAlignment.setSelected(true); - handleMoveToTextComponent(); - }//GEN-LAST:event_jTextAreaAlignmentFocusGained - - private void jTextAreaSequence2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextAreaSequence2FocusGained - currentTextComponent = jTextAreaSequence2; - jRadioButtonSequence2.setSelected(true); - handleMoveToTextComponent(); - }//GEN-LAST:event_jTextAreaSequence2FocusGained - - private void jTextAreaSequence1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextAreaSequence1FocusGained - currentTextComponent = jTextAreaSequence1; - jRadioButtonSequence1.setSelected(true); - handleMoveToTextComponent(); - }//GEN-LAST:event_jTextAreaSequence1FocusGained - - private void jRadioButtonAlignmentActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jRadioButtonAlignmentActionPerformed - jTextAreaAlignment.requestFocus(); - }//GEN-LAST:event_jRadioButtonAlignmentActionPerformed - - private void jRadioButtonSequence2ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jRadioButtonSequence2ActionPerformed - jTextAreaSequence2.requestFocus(); - }//GEN-LAST:event_jRadioButtonSequence2ActionPerformed - - private void jRadioButtonSequence1ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jRadioButtonSequence1ActionPerformed - jTextAreaSequence1.requestFocus(); - }//GEN-LAST:event_jRadioButtonSequence1ActionPerformed - - private void jMenuItemEditCopyActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditCopyActionPerformed - copy(); - }//GEN-LAST:event_jMenuItemEditCopyActionPerformed - - private void jMenuItemEditDeleteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditDeleteActionPerformed - delete(); - }//GEN-LAST:event_jMenuItemEditDeleteActionPerformed - - private void jMenuItemEditPasteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditPasteActionPerformed - paste(); - }//GEN-LAST:event_jMenuItemEditPasteActionPerformed - - private void jMenuItemFileOpenActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFileOpenActionPerformed - loadFileToTextArea("", currentTextComponent); - }//GEN-LAST:event_jMenuItemFileOpenActionPerformed - - private void jMenuItemEditCutActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditCutActionPerformed - cut(); - }//GEN-LAST:event_jMenuItemEditCutActionPerformed - - private void jMenuItemEditSelectAllActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditSelectAllActionPerformed - selectAll(); - }//GEN-LAST:event_jMenuItemEditSelectAllActionPerformed - - private void jTextAreaSequence2MouseClicked(MouseEvent evt) {//GEN-FIRST:event_jTextAreaSequence2MouseClicked - jTextAreaSequence2.requestFocus(); - if (evt.getButton() == MouseEvent.BUTTON3) { - jPopup.show(evt.getComponent(), evt.getX(), evt.getY()); - } - }//GEN-LAST:event_jTextAreaSequence2MouseClicked - - private void jTextAreaSequence2CaretUpdate(CaretEvent evt) {//GEN-FIRST:event_jTextAreaSequence2CaretUpdate - handleCaretUpdateEvent(evt); - }//GEN-LAST:event_jTextAreaSequence2CaretUpdate - - private void jButtonExitActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonExitActionPerformed - exitForm(null); - }//GEN-LAST:event_jButtonExitActionPerformed - - private void jButtonGoActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonGoActionPerformed - align(); - }//GEN-LAST:event_jButtonGoActionPerformed - - private void jMenuItemFileLoadSequence2ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFileLoadSequence2ActionPerformed - loadFileToTextArea("sequence #2", jTextAreaSequence2); - }//GEN-LAST:event_jMenuItemFileLoadSequence2ActionPerformed - - private void jMenuItemFileLoadSequence1ActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFileLoadSequence1ActionPerformed - loadFileToTextArea("sequence #1", jTextAreaSequence1); - }//GEN-LAST:event_jMenuItemFileLoadSequence1ActionPerformed - - private void jMenuItemFileLoadMatrixActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFileLoadMatrixActionPerformed - NamedInputStream selectedInputStream = null; - try { - logger.info("Loading scoring matrix..."); - selectedInputStream = FileChooserFactory.getFileChooser().open(); - if (selectedInputStream != null) { - Matrix matrix = MatrixLoader.load(selectedInputStream); - - // Put the loaded matrix in the matrices hashmap - matrices.put(selectedInputStream.getName(), matrix); - - boolean found = false; - int index = 0; - int count = jComboBoxScoringMatrix.getItemCount(); - while (index < count && !found) { - if (((String)jComboBoxScoringMatrix.getItemAt(index)).equalsIgnoreCase(selectedInputStream.getName())) { - found = true; - } else { - index++; - } - } - if (!found) { - // Add the loaded matrix to the scoring matrices dropdown menu - jComboBoxScoringMatrix.addItem(selectedInputStream.getName()); - index = jComboBoxScoringMatrix.getItemCount()-1; - } - // Set the selected item to the new loaded matrix - jComboBoxScoringMatrix.setSelectedIndex(index); - - logger.info("Finished loading scoring matrix"); - } else { - logger.info("Canceled loading scoring matrix"); - } - } catch (Exception e) { - String message = "Failed loading scoring matrix: " + e.getMessage(); - logger.log(Level.SEVERE, message, e); - showErrorMessage(message); - } finally { - if (selectedInputStream != null) { - try { - selectedInputStream.getInputStream().close(); - } catch(Exception e) { - logger.log(Level.WARNING, "Failed closing input stream: " + e.getMessage(), e); - } - } - } - }//GEN-LAST:event_jMenuItemFileLoadMatrixActionPerformed - - private void jTextAreaAlignmentMouseClicked(MouseEvent evt) {//GEN-FIRST:event_jTextAreaAlignmentMouseClicked - jTextAreaAlignment.requestFocus(); - if (evt.getButton() == MouseEvent.BUTTON3) { - jPopup.show(evt.getComponent(), evt.getX(), evt.getY()); - } - }//GEN-LAST:event_jTextAreaAlignmentMouseClicked - - private void jPopupSaveActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupSaveActionPerformed - saveTextAreaToFile((JTextArea) jPopup.getInvoker()); - }//GEN-LAST:event_jPopupSaveActionPerformed - - private void jButtonSaveActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonSaveActionPerformed - saveTextAreaToFile(currentTextComponent); - }//GEN-LAST:event_jButtonSaveActionPerformed - - private void jTextAreaAlignmentCaretUpdate(CaretEvent evt) {//GEN-FIRST:event_jTextAreaAlignmentCaretUpdate - handleCaretUpdateEvent(evt); - }//GEN-LAST:event_jTextAreaAlignmentCaretUpdate - - private void jPopupOpenActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupOpenActionPerformed - loadFileToTextArea("", (JTextArea) jPopup.getInvoker()); - }//GEN-LAST:event_jPopupOpenActionPerformed - - private void jPopupSelectAllActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupSelectAllActionPerformed - selectAll(); - }//GEN-LAST:event_jPopupSelectAllActionPerformed - - private void jPopupDeleteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupDeleteActionPerformed - delete(); - }//GEN-LAST:event_jPopupDeleteActionPerformed - - private void jPopupPasteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupPasteActionPerformed - paste(); - }//GEN-LAST:event_jPopupPasteActionPerformed - - private void jPopupCopyActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupCopyActionPerformed - copy(); - }//GEN-LAST:event_jPopupCopyActionPerformed - - private void jPopupCutActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jPopupCutActionPerformed - cut(); - }//GEN-LAST:event_jPopupCutActionPerformed - - private void jTextAreaSequence1CaretUpdate(CaretEvent evt) {//GEN-FIRST:event_jTextAreaSequence1CaretUpdate - handleCaretUpdateEvent(evt); - }//GEN-LAST:event_jTextAreaSequence1CaretUpdate - - private void jButtonDeleteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed - delete(); - }//GEN-LAST:event_jButtonDeleteActionPerformed - - private void jButtonPasteActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonPasteActionPerformed - paste(); - }//GEN-LAST:event_jButtonPasteActionPerformed - - private void jButtonCopyActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonCopyActionPerformed - copy(); - }//GEN-LAST:event_jButtonCopyActionPerformed - - private void jButtonCutActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonCutActionPerformed - cut(); - }//GEN-LAST:event_jButtonCutActionPerformed - - private void jButtonOpenActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jButtonOpenActionPerformed - loadFileToTextArea("", currentTextComponent); - }//GEN-LAST:event_jButtonOpenActionPerformed - - private void jTextAreaSequence1MouseClicked(MouseEvent evt) {//GEN-FIRST:event_jTextAreaSequence1MouseClicked - jTextAreaSequence1.requestFocus(); - if (evt.getButton() == MouseEvent.BUTTON3) { - jPopup.show(evt.getComponent(), evt.getX(), evt.getY()); - } - }//GEN-LAST:event_jTextAreaSequence1MouseClicked - - private void jMenuItemAboutActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemAboutActionPerformed - String message = "JAligner " - + Commons.getLineSeparator() + Commons.getLineSeparator() - + "Open source Java implementation" - + Commons.getLineSeparator() - + "of the Smith-Waterman algorithm" - + Commons.getLineSeparator() - + "for biological sequence alignment." - + Commons.getLineSeparator() + Commons.getLineSeparator() - + "Build: " + Commons.getCurrentRelease() - + Commons.getLineSeparator() + Commons.getLineSeparator() - + "By: Ahmed Moustafa "; - JOptionPane.showMessageDialog(this, message, "About JAligner", - JOptionPane.INFORMATION_MESSAGE); - }//GEN-LAST:event_jMenuItemAboutActionPerformed - - private void jMenuItemFileExitActionPerformed(ActionEvent evt) {//GEN-FIRST:event_jMenuItemFileExitActionPerformed - exitForm(null); - }//GEN-LAST:event_jMenuItemFileExitActionPerformed - - /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm - logger.info("Quitting..."); - if (JOptionPane.showConfirmDialog(this, "Are you sure you want to exit JAligner?", "JAligner - confirmation", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { - logger.info("Thank you for using JAligner!"); - System.exit(0); - } else { - logger.info("Canceled quitting"); - currentTextComponent.requestFocus(); - } - }//GEN-LAST:event_exitForm - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.ButtonGroup buttonGroupSequences; - private javax.swing.JButton jButtonCopy; - private javax.swing.JButton jButtonCut; - private javax.swing.JButton jButtonDelete; - private javax.swing.JButton jButtonExit; - private javax.swing.JButton jButtonGo; - private javax.swing.JButton jButtonOpen; - private javax.swing.JButton jButtonPaste; - private javax.swing.JButton jButtonPrint; - private javax.swing.JButton jButtonSave; - private JComboBox jComboBoxOutputFormat; - private JComboBox jComboBoxScoringMatrix; - private JFormattedTextField jFormattedTextFieldGapExtend; - private JFormattedTextField jFormattedTextFieldGapOpen; - private javax.swing.JLabel jLabelExtendGapPenalty; - private javax.swing.JLabel jLabelOpenGapPenalty; - private javax.swing.JLabel jLabelOutputFormat; - private javax.swing.JLabel jLabelScoringMatrix; - private javax.swing.JMenuBar jMenuBar; - private javax.swing.JMenu jMenuEdit; - private javax.swing.JMenu jMenuFile; - private javax.swing.JMenu jMenuHelp; - private javax.swing.JMenuItem jMenuItemAbout; - private javax.swing.JMenuItem jMenuItemEditCopy; - private javax.swing.JMenuItem jMenuItemEditCut; - private javax.swing.JMenuItem jMenuItemEditDelete; - private javax.swing.JMenuItem jMenuItemEditPaste; - private javax.swing.JMenuItem jMenuItemEditSelectAll; - private javax.swing.JMenuItem jMenuItemFileExit; - private javax.swing.JMenuItem jMenuItemFileLoadMatrix; - private javax.swing.JMenuItem jMenuItemFileLoadSequence1; - private javax.swing.JMenuItem jMenuItemFileLoadSequence2; - private javax.swing.JMenuItem jMenuItemFileOpen; - private javax.swing.JMenuItem jMenuItemFilePrint; - private javax.swing.JMenuItem jMenuItemToolsRunExample; - private javax.swing.JMenu jMenuTools; - private javax.swing.JPanel jPanelAlignment; - private javax.swing.JPanel jPanelConsole; - private javax.swing.JPanel jPanelControls; - private javax.swing.JPanel jPanelGapExtend; - private javax.swing.JPanel jPanelGapOpen; - private javax.swing.JPanel jPanelGo; - private javax.swing.JPanel jPanelOutputFormat; - private javax.swing.JPanel jPanelScoringMatrix; - private javax.swing.JPanel jPanelSequence1; - private javax.swing.JPanel jPanelSequence2; - private javax.swing.JPopupMenu jPopup; - private javax.swing.JMenuItem jPopupCopy; - private javax.swing.JMenuItem jPopupCut; - private javax.swing.JMenuItem jPopupDelete; - private javax.swing.JMenuItem jPopupOpen; - private javax.swing.JMenuItem jPopupPaste; - private javax.swing.JMenuItem jPopupPrint; - private javax.swing.JMenuItem jPopupSave; - private javax.swing.JMenuItem jPopupSelectAll; - private javax.swing.JSeparator jPopupSeparator1; - private javax.swing.JSeparator jPopupSeparator2; - private javax.swing.JSeparator jPopupSeparator3; - private javax.swing.JRadioButton jRadioButtonAlignment; - private javax.swing.JRadioButton jRadioButtonConsole; - private javax.swing.JRadioButton jRadioButtonSequence1; - private javax.swing.JRadioButton jRadioButtonSequence2; - private javax.swing.JScrollPane jScrollPaneAlignment; - private javax.swing.JScrollPane jScrollPaneConsole; - private javax.swing.JScrollPane jScrollPaneSequence1; - private javax.swing.JScrollPane jScrollPaneSequence2; - private javax.swing.JSeparator jSeparatorFile; - private javax.swing.JSplitPane jSplitPaneBody; - private javax.swing.JSplitPane jSplitPaneIO; - private javax.swing.JSplitPane jSplitPaneSequences; - private JTextArea jTextAreaAlignment; - private JTextArea jTextAreaSequence1; - private JTextArea jTextAreaSequence2; - private javax.swing.JTextPane jTextPaneConsole; - private javax.swing.JToolBar jToolBar; - // End of variables declaration//GEN-END:variables - - /** - * Populates a combobox with an array of strings and selects the default - * @param combobox combobox to be populated - * @param items array of strings to be added to the combobox - * @param selected the default selected item - */ - private void populateComboBox(JComboBox combobox, String[] items, String selected) { - for (int i = 0; i < items.length; i++) { - combobox.addItem(items[i]); - if (items[i].equals(selected)) { - combobox.setSelectedIndex(i); - } - } - } - - /** - * Populates a combobox with an array of strings and selects the default - * @param combobox combobox to be populated - * @param items array of strings to be added to the combobox - * @param selected the default selected item - */ - private void populateComboBox(JComboBox combobox, Collection items, String selected) { - String item; - Iterator i = items.iterator(); - int index = 0; - while (i.hasNext()) { - item = (String) i.next(); - combobox.addItem(item); - if (item.equals(selected)) { - combobox.setSelectedIndex(index); - } - index++; - } - } - - /** - * Displays an error message - * @param message the error message to be displayed - */ - private void showErrorMessage(String message) { - JOptionPane.showMessageDialog(this, message, "JAligner - error message", JOptionPane.ERROR_MESSAGE); - } - - /** - * Loads the contents of a selected file into a text component. - * @param id - * @param textComponent - */ - private void loadFileToTextArea(String id, JTextComponent textComponent) { - logger.info("Loading " + id + "..."); - try { - if (TextComponentUtil.open(textComponent)) { - textComponent.requestFocus(); - textComponent.setCaretPosition(0); - logger.info("Finished loading " + id); - } else { - logger.info("Canceled loading " + id); - } - } catch (Exception e) { - String message = "Failed loading " + id + ": " + e.getMessage(); - logger.log(Level.SEVERE, message, e); - showErrorMessage(message); - } - } - - /** - * Saves a text component to a file. - * @param textComponent - */ - private void saveTextAreaToFile(JTextComponent textComponent) { - try { - logger.info("Saving..."); - if (TextComponentUtil.save(textComponent)) { - logger.info("Finished saving"); - } else { - logger.info("Canceled saving"); - } - } catch (Exception e) { - String message = "Failed saving: " + e.getMessage(); - logger.log(Level.SEVERE, message, e); - showErrorMessage(message); - } - } - - /** - * - * - */ - private void cut() { - TextComponentUtil.cut(currentTextComponent); - } - - /** - * - * - */ - private void copy() { - TextComponentUtil.copy(currentTextComponent); - } - - /** - * - * - */ - private void paste() { - TextComponentUtil.paste(currentTextComponent); - } - - /** - * - * - */ - private void delete() { - TextComponentUtil.delete(currentTextComponent); - } - - /** - * - * - */ - private void selectAll() { - TextComponentUtil.selectAll(currentTextComponent); - } - - /** - * Prints the contents of a text component - * - */ - private void print() { - try { - logger.info("Printing..."); - TextComponentUtil.print(currentTextComponent); - logger.info("Finished printing."); - } catch (TextComponentUtilException textComponentUtilException) { - logger.log(Level.SEVERE, "Failed printing: " + textComponentUtilException.getMessage(), textComponentUtilException); - } - } - - /** - * Implements insertUpdate of {@link DocumentListener} - */ - public void insertUpdate(DocumentEvent e) { - if (e.getDocument() == currentTextComponent.getDocument()) { - setSaveControlsEnabled(true); - setSelectAllControlsEnabled(true); - setPrintControlsEnabled(true); - } - } - - /** - * Implements removeUpdate of {@link DocumentListener} - */ - public void removeUpdate(DocumentEvent e) { - if (e.getDocument() == currentTextComponent.getDocument()) { - if (e.getDocument().getLength() == 0) { - setSaveControlsEnabled(false); - setSelectAllControlsEnabled(false); - setPrintControlsEnabled(false); - } - } - } - - /** - * Implements changedUpdate of {@link DocumentListener} - */ - public void changedUpdate(DocumentEvent e) {} - - /** - * Implements the notify method of the interface {@link ClipboardListener} - */ - public void clipboardCheck(String clipboardContents) { - setPasteControlsEnabled(clipboardContents != null && currentTextComponent != null && currentTextComponent.isEditable()); - } - - /** - * Sets the status of the open controls - * @param enabled - */ - private void setOpenControlsEnabled(boolean enabled) { - jMenuItemFileOpen.setEnabled(enabled); - jButtonOpen.setEnabled(enabled); - jPopupOpen.setEnabled(enabled); - } - - /** - * Sets the status of the save controls - * @param enabled - */ - private void setSaveControlsEnabled(boolean enabled) { - jButtonSave.setEnabled(enabled); - jPopupSave.setEnabled(enabled); - } - - /** - * Sets the status of the cut controls - * @param enabled - */ - private void setCutControlsEnabled(boolean enabled) { - jMenuItemEditCut.setEnabled(enabled); - jButtonCut.setEnabled(enabled); - jPopupCut.setEnabled(enabled); - } - - /** - * Sets the status of the copy controls - * @param enabled - */ - private void setCopyControlsEnabled(boolean enabled) { - jMenuItemEditCopy.setEnabled(enabled); - jButtonCopy.setEnabled(enabled); - jPopupCopy.setEnabled(enabled); - } - - /** - * Sets the status of the paste controls - * @param enabled - */ - private void setPasteControlsEnabled(boolean enabled) { - jMenuItemEditPaste.setEnabled(enabled); - jButtonPaste.setEnabled(enabled); - jPopupPaste.setEnabled(enabled); - } - - /** - * Sets the status of the delete controls - * @param enabled - */ - private void setDeleteControlsEnabled(boolean enabled) { - jMenuItemEditDelete.setEnabled(enabled); - jButtonDelete.setEnabled(enabled); - jPopupDelete.setEnabled(enabled); - } - - /** - * Sets the status of the select all controls - * @param enabled - */ - private void setSelectAllControlsEnabled(boolean enabled) { - jMenuItemEditSelectAll.setEnabled(enabled); - jPopupSelectAll.setEnabled(enabled); - } - - /** - * Sets the status of the print controls - * @param enabled - */ - private void setPrintControlsEnabled(boolean enabled) { - jButtonPrint.setEnabled(enabled); - jPopupPrint.setEnabled(enabled); - } - - /** - * - * @param event - */ - private void handleCaretUpdateEvent(CaretEvent event) { - if (event.getSource() == currentTextComponent) { - boolean enabled = event.getDot() != event.getMark(); - // Read controls - setCopyControlsEnabled(enabled); - - // Write controls - enabled &= currentTextComponent.isEditable(); - setCutControlsEnabled(enabled); - setDeleteControlsEnabled(enabled); - } - } - - /** - * - * - */ - private void handleMoveToTextComponent( ) { - boolean enabled; - - enabled = currentTextComponent.getSelectedText() != null; - setCopyControlsEnabled(enabled); - - if (currentTextComponent.isEditable()) { - setOpenControlsEnabled(true); - - setCutControlsEnabled(enabled); - setDeleteControlsEnabled(enabled); - } else { - setPasteControlsEnabled(false); - - setOpenControlsEnabled(false); - - setCutControlsEnabled(false); - setDeleteControlsEnabled(false); - } - - enabled = currentTextComponent.getText().length() > 0; - setSaveControlsEnabled(enabled); - setSelectAllControlsEnabled(enabled); - setPrintControlsEnabled(enabled); - - // Adjust background of the radio buttons - Enumeration buttons = buttonGroupSequences.getElements(); - AbstractButton button = null; - while (buttons.hasMoreElements()) { - button = (AbstractButton) buttons.nextElement(); - if (button.isSelected()) { - button.setForeground(Color.blue); - } else { - button.setForeground(Color.black); - } - } - - } - - /** - * - * - */ - private void align() { - jTextAreaAlignment.setText(""); - - String matrixId = (String) jComboBoxScoringMatrix.getSelectedItem(); - float open = ((Number)jFormattedTextFieldGapOpen.getValue()).floatValue(); - float extend = ((Number)jFormattedTextFieldGapExtend.getValue()).floatValue(); - - Sequence sequence1 = null; - try { - logger.info("Processing sequence #1..."); - sequence1 = SequenceParser.parse(jTextAreaSequence1.getText()); - logger.info("Finished processing sequence #1"); - } catch (Exception e) { - String message = "Failed parsing sequence #1: " + e.getMessage(); - logger.log(Level.SEVERE, message, e); - showErrorMessage(message); - jTextAreaSequence1.requestFocus(); - return; - } - - Sequence sequence2 = null; - try { - logger.info("Processing sequence #2..."); - sequence2 = SequenceParser.parse(jTextAreaSequence2.getText()); - logger.info("Finished processing sequence #2"); - } catch (Exception e) { - String message = "Failed parsing sequence #2: " + e.getMessage(); - logger.log(Level.SEVERE, message, e); - showErrorMessage(message); - jTextAreaSequence2.requestFocus(); - return; - } - - logger.info("Aliging..."); - try { - setCursor(new Cursor(Cursor.WAIT_CURSOR)); - - long start = System.currentTimeMillis(); - Matrix matrix = null; - if (!matrices.containsKey(matrixId)) { - matrix = MatrixLoader.load(matrixId); - matrices.put(matrixId, matrix); - } else { - matrix = (Matrix) matrices.get(matrixId); - } - Alignment alignment = SmithWatermanGotoh.align(sequence1, sequence2, matrix, open, extend); - long end = System.currentTimeMillis(); - logger.info("Finished aligning in " + (end - start) + " milliseconds"); - - StringBuffer buffer = new StringBuffer(); - - buffer.append(alignment.getSummary()); - buffer.append(Commons.getLineSeparator()); - - String formatId = (String) jComboBoxOutputFormat.getSelectedItem(); - String formattedAlignment = FormatFactory.getInstance().getFormat(formatId).format(alignment); - buffer.append(formattedAlignment); - - jTextAreaAlignment.setText(""); - jTextAreaAlignment.append(buffer.toString()); - jTextAreaAlignment.setCaretPosition(0); - } catch (Error error) { - String message = "Failed aligning: " + error.getMessage(); - logger.log(Level.SEVERE, message, error); - showErrorMessage(message); - } catch (Exception exception) { - String message = "Failed aligning: " + exception.getMessage(); - logger.log(Level.SEVERE, message, exception); - showErrorMessage(message); - } finally { - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); - } - } - - /** - * - * @param args - */ - public static void main(String[] args) { - logger.info( Commons.getJAlignerInfo() ); - new AlignWindow().setVisible(true); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandler.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandler.java deleted file mode 100644 index e5020e7..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandler.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: ClipboardHandler.java,v 1.4 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -/** - * Abstract class to handle setting and getting "text" contents of - * the system clipboard. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public interface ClipboardHandler { - /** - * Returns the contents of the system of the clipboard - * - * @return String - */ - public String getContents(); - - /** - * Sets the contents of the system of the clipboard - * - * @param s the clipboard contents to set - */ - public void setContents(String s); -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerAWT.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerAWT.java deleted file mode 100644 index 95859b7..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerAWT.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id: ClipboardHandlerAWT.java,v 1.3 2004/12/19 08:00:48 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -import java.awt.Toolkit; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.StringSelection; -import java.awt.datatransfer.Transferable; -import java.util.logging.Level; -import java.util.logging.Logger; - - -/** - * Sets and gets the contents of the system clipboard. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class ClipboardHandlerAWT implements ClipboardHandler { - private static Logger logger = Logger.getLogger(ClipboardHandlerAWT.class.getName()); - - /** - * Gets the contents of the system clipboard - * - * @return The text contents of the system clipboard - */ - public String getContents() { - String contents = null; - Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); - Transferable data = c.getContents(null); - if (data != null && data.isDataFlavorSupported(DataFlavor.stringFlavor)) { - try { - contents = ((String)(data.getTransferData(DataFlavor.stringFlavor))); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed getting tranfer data: " + e.getMessage(), e); - } - } - return contents; - } - - /** - * Sets the contents of the system clipboard - * - * @param s the clipboard contents to set - */ - public void setContents(String s) { - Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard(); - c.setContents(new StringSelection(s), null); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerFactory.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerFactory.java deleted file mode 100644 index 772d57e..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerFactory.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: ClipboardHandlerFactory.java,v 1.2 2004/11/30 05:10:29 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -import jaligner.util.Commons; - -/** - * A factory for {@link ClipboardHandler}. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class ClipboardHandlerFactory { - /** - * Instance of a concrete {@link ClipboardHandlerFactory}. - */ - private static ClipboardHandler instance = null; - - /** - * Constructor - */ - private ClipboardHandlerFactory ( ) { - super(); - } - - /** - * Returns an instance of a concrete {@link ClipboardHandler}. - * @return Concrete {@link ClipboardHandler}. - */ - public static ClipboardHandler getClipboardHandler( ) { - if (instance == null) { - if (Commons.isJnlp()) { - instance = new ClipboardHandlerJNLP(); - } else { - instance = new ClipboardHandlerAWT(); - } - } - return instance; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerJNLP.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerJNLP.java deleted file mode 100644 index e31ee47..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardHandlerJNLP.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id: ClipboardHandlerJNLP.java,v 1.3 2004/12/19 08:00:48 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.StringSelection; -import java.awt.datatransfer.Transferable; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.jnlp.ClipboardService; -import javax.jnlp.ServiceManager; - -/** - * Sets and gets the contents of the system clipboard. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class ClipboardHandlerJNLP implements ClipboardHandler { - private static Logger logger = Logger.getLogger(ClipboardHandlerJNLP.class.getName()); - - /** - * Gets the contents of the system clipboard - * - * @return The text system clipboad contents - */ - public String getContents() { - String contents = null; - try { - ClipboardService cs = (ClipboardService)ServiceManager.lookup(ClipboardService.class.getName()); - Transferable data = cs.getContents(); - if (data != null && data.isDataFlavorSupported(DataFlavor.stringFlavor)) { - contents = ((String)(data.getTransferData(DataFlavor.stringFlavor))); - } - } catch (Exception e) { - logger.log(Level.WARNING, "Failed getting the clipboard contents: " + e.getMessage(), e ); - } - return contents; - } - - /** - * Sets the contents of the system clipboard - * - * @param s clipboard contents to set - */ - public void setContents(String s) { - try { - ClipboardService cs = (ClipboardService)ServiceManager.lookup(ClipboardService.class.getName()); - cs.setContents(new StringSelection(s)); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed setting the clipboard contents: " + e.getMessage(), e ); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardListener.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardListener.java deleted file mode 100644 index 1716596..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardListener.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * $Id: ClipboardListener.java,v 1.5 2004/12/23 17:06:47 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -/** - * Listener interface to get notified with the clipboard contents. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public interface ClipboardListener { - - /** - * Notifies the listener with the current contents of the clipboard. - * @param contents The current contents of the clipboard - */ - public void clipboardCheck(String contents); - -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardPoller.java b/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardPoller.java deleted file mode 100644 index 0b4daf0..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/ClipboardPoller.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * $Id: ClipboardPoller.java,v 1.5 2004/12/23 17:06:47 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.clipboard; - -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Checks the system clipboard to notifies a listener with current contents. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class ClipboardPoller extends Thread { - /** - * Sleeping interval - */ - private static final int SLEEPING_TIME_IN_MILLISECONDS = 1500; - - /** - * Clipboard listener {@link ClipboardListener} - */ - private ClipboardListener listener = null; - - /** - * Running flag - */ - private boolean running = false; - - /** - * Logger - */ - private Logger logger = null; - - /** - * Constructor - * @param listener - */ - public ClipboardPoller(ClipboardListener listener) { - logger = Logger.getLogger(this.getClass().getName()); - this.listener = listener; - } - - /** - * Runs the thread - */ - public void run() { - logger.info("Started"); - while (running) { - String contents = ClipboardHandlerFactory.getClipboardHandler().getContents(); - listener.clipboardCheck(contents); - try { - Thread.sleep(SLEEPING_TIME_IN_MILLISECONDS); - } catch (Exception e){ - logger.log(Level.SEVERE, "Failed sleeping: " + e.getMessage(), e); - running = false; - } - } - logger.info("Stopped"); - } - - /** - * Starts the thread - */ - public void start() { - logger.info("Starting..."); - if (!running) { - if (listener != null) { - running = true; - } else { - logger.warning("No listener"); - } - } else { - logger.warning("Already started"); - } - super.start(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/clipboard/package.html b/maven-src/target/classes/java/jaligner/ui/clipboard/package.html deleted file mode 100644 index d3f3582..0000000 --- a/maven-src/target/classes/java/jaligner/ui/clipboard/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Clipboard handling for JNLP and AWT. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooser.java b/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooser.java deleted file mode 100644 index a7a1a5b..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooser.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * $Id: FileChooser.java,v 1.10 2005/01/10 15:01:01 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - -import java.io.InputStream; - -/** - * Opens and saves files. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class FileChooser { - /** - * Buffer size while reading from or write to a file (4 KB) - */ - public static final int BUFFER_SIZE = 4096; - - private String userDir = null; - - /** - * Shows a dialog to select a file - * - * @return InputStream - * @throws FileChooserException - */ - public abstract NamedInputStream open() throws FileChooserException; - - /** - * Saves an input stream to a file - * - * @param is - * @param fileName - * @return boolean - * @throws FileChooserException - */ - public abstract boolean save(InputStream is, String fileName) throws FileChooserException; - - /** - * Gets the current user working directory - * @return current working directory - */ - public String getUserDirectory ( ) { - if (userDir == null) { - userDir = System.getProperty("user.home"); - } - return userDir; - } - - /** - * Sets the user working directory - * @param userDir The user directory to set - */ - public void setUserDirectory (String userDir) { - this.userDir = userDir; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserException.java b/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserException.java deleted file mode 100644 index 3882735..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * $Id: FileChooserException.java,v 1.2 2005/04/14 14:44:43 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - -/** - * File chooser exception - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FileChooserException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 3258408434931086648L; - - /** - * @param message - */ - public FileChooserException(String message) { - super(message); - } -} diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserFactory.java b/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserFactory.java deleted file mode 100644 index ef6abf3..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserFactory.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: FileChooserFactory.java,v 1.3 2005/01/11 15:23:25 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - -import jaligner.util.Commons; - -/** - * A factory for {@link FileChooser}. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FileChooserFactory { - /** - * Instance of a concrete {@link FileChooser}. - */ - private static FileChooser instance = null; - - /** - * Constructor - */ - private FileChooserFactory ( ) { - super(); - } - - /** - * Returns an instance of a concrete {@link FileChooser}. - * @return Concrete {@link FileChooser}. - */ - public static FileChooser getFileChooser( ) { - if (instance == null) { - if (Commons.isJnlp()) { - instance = new FileChooserJNLP(); - } else { - instance = new FileChooserTrusted(); - } - } - return instance; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserJNLP.java b/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserJNLP.java deleted file mode 100644 index 8a4e443..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserJNLP.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * $Id: FileChooserJNLP.java,v 1.11 2005/01/10 15:01:01 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - -import java.io.InputStream; -import java.util.logging.Logger; - -import javax.jnlp.FileContents; -import javax.jnlp.FileOpenService; -import javax.jnlp.FileSaveService; -import javax.jnlp.ServiceManager; - - -/** - * Opens and saves files. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FileChooserJNLP extends FileChooser { - private static final Logger logger = Logger.getLogger(FileChooserJNLP.class.getName()); - - /** - * Shows a dialog to select a file. - * - * @return InputStream - * @throws FileChooserException - */ - public NamedInputStream open() throws FileChooserException { - try { - FileOpenService fos = (FileOpenService) ServiceManager.lookup(FileOpenService.class.getName()); - FileContents fc = null; - if ((fc = fos.openFileDialog(getUserDirectory(), null)) != null) { - logger.info("Loaded: " + fc.getName()); - return new NamedInputStream(fc.getName(), fc.getInputStream()); - } else { - return null; - } - } catch (Exception e) { - String message = "Failed open: " + e.getMessage(); - logger.warning(message); - throw new FileChooserException(message); - } - } - - /** - * Saves an input stream to a file. - * - * @param is - * @param fileName - * @return Boolean - * @throws FileChooserException - */ - public boolean save(InputStream is, String fileName) throws FileChooserException { - try { - FileSaveService fss = (FileSaveService) ServiceManager.lookup(FileSaveService.class.getName()); - FileContents fc = fss.saveFileDialog(getUserDirectory(), null, is, fileName); - if (fc != null) { - logger.info("Saved: " + fc.getName()); - return true; - } else { - return false; - } - } catch (Exception e) { - String message = "Failed save: " + e.getMessage(); - logger.warning(message); - throw new FileChooserException(message); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserTrusted.java b/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserTrusted.java deleted file mode 100644 index 5ebd6ff..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/FileChooserTrusted.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * $Id: FileChooserTrusted.java,v 1.12 2005/01/10 15:01:01 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - - - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.util.logging.Logger; - -import javax.swing.JFileChooser; - -/** - * Opens and saves files. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class FileChooserTrusted extends FileChooser { - private static final Logger logger = Logger.getLogger(FileChooserJNLP.class.getName()); - - /** - * Shows a dialog to select a file. - * @return input stream - * @throws FileChooserException - * @see NamedInputStream - */ - public NamedInputStream open() throws FileChooserException { - try { - JFileChooser chooser = new JFileChooser( ); - chooser.setCurrentDirectory(new File(getUserDirectory())); - int returnVal = chooser.showOpenDialog(null); - if (returnVal == JFileChooser.APPROVE_OPTION) { - setUserDirectory(chooser.getCurrentDirectory().toString()); - logger.info("Loaded: " + chooser.getSelectedFile().getName()); - return new NamedInputStream(chooser.getSelectedFile().getName(), - new FileInputStream(chooser.getSelectedFile())); - } else { - return null; - } - } catch (Exception e) { - String message = "Failed open: " + e.getMessage(); - logger.warning(message); - throw new FileChooserException(message); - } - } - - /** - * Saves an input stream to a file. - * - * @param is - * @param fileName - * @return boolean - * @throws FileChooserException - */ - public boolean save(InputStream is, String fileName) throws FileChooserException { - try { - JFileChooser chooser = new JFileChooser( ); - chooser.setCurrentDirectory(new File(getUserDirectory())); - if (fileName != null) { - chooser.setSelectedFile(new File(fileName)); - } - int returnVal = chooser.showSaveDialog(null); - if (returnVal == JFileChooser.APPROVE_OPTION) { - setUserDirectory(chooser.getCurrentDirectory().toString()); - File file = chooser.getSelectedFile(); - logger.info("Saved: " + file.getName()); - FileOutputStream fos = new FileOutputStream(file); - byte[] buffer = new byte[BUFFER_SIZE]; - int len; - while ((len = is.read(buffer)) != -1) { - fos.write(buffer, 0, len); - } - fos.close(); - is.close(); - return true; - } else { - return false; - } - } catch (Exception e) { - String message = "Failed save: " + e.getMessage(); - logger.warning(message); - throw new FileChooserException(message); - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/NamedInputStream.java b/maven-src/target/classes/java/jaligner/ui/filechooser/NamedInputStream.java deleted file mode 100644 index 6ee46ac..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/NamedInputStream.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id: NamedInputStream.java,v 1.2 2005/04/14 14:44:43 ahmed Exp $ - * - * This program inputStream free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program inputStream distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.filechooser; - -import java.io.InputStream; -import java.io.Serializable; - -/** - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class NamedInputStream extends Object implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 3256441404384686387L; - - /** - * Name. - */ - private String name = null; - - /** - * Input stream. - */ - private InputStream inputStream = null; - - /** - * - */ - public NamedInputStream(String name, InputStream inputStream) { - this.name = name; - this.inputStream = inputStream; - } - - /** - * @return Returns the inputStream. - */ - public InputStream getInputStream() { - return this.inputStream; - } - - /** - * @return Returns the name. - */ - public String getName() { - return this.name; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/filechooser/package.html b/maven-src/target/classes/java/jaligner/ui/filechooser/package.html deleted file mode 100644 index 437cb06..0000000 --- a/maven-src/target/classes/java/jaligner/ui/filechooser/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -File loading and storing. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/images/ToolbarIcons.java b/maven-src/target/classes/java/jaligner/ui/images/ToolbarIcons.java deleted file mode 100644 index 4864d27..0000000 --- a/maven-src/target/classes/java/jaligner/ui/images/ToolbarIcons.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * $Id: ToolbarIcons.java,v 1.3 2005/02/17 07:14:56 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.images; - -import javax.swing.ImageIcon; - -/** - * Toolbar icons - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class ToolbarIcons { - /** - * Path to the gifs folder - */ - public static final String GIFS_HOME = "/jaligner/ui/images/gifs/"; - - /** - * Open icon - */ - public static final ImageIcon OPEN = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "open.gif")); - - /** - * Save icon - */ - public static final ImageIcon SAVE = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "save.gif")); - - /** - * Cut icon - */ - public static final ImageIcon CUT = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "cut.gif")); - - /** - * Copy icon - */ - public static final ImageIcon COPY = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "copy.gif")); - - /** - * Paste icon - */ - public static final ImageIcon PASTE = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "paste.gif")); - - /** - * Delete icon - */ - public static final ImageIcon DELETE = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "delete.gif")); - - /** - * Close icon - */ - public static final ImageIcon CLOSE = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "close.gif")); - - /** - * About icon - */ - public static final ImageIcon ABOUT = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "about.gif")); - - - /** - * Print icon - */ - public static final ImageIcon PRINT = new ImageIcon(ToolbarIcons.class.getResource(GIFS_HOME + "print.gif")); -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/about.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/about.gif deleted file mode 100644 index 04da95e..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/about.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/close.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/close.gif deleted file mode 100644 index 064202b..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/close.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/copy.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/copy.gif deleted file mode 100644 index fa98681..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/copy.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/cut.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/cut.gif deleted file mode 100644 index 14b73a8..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/cut.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/delete.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/delete.gif deleted file mode 100644 index d9d1a33..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/delete.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/jaligner.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/jaligner.gif deleted file mode 100644 index 4711572..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/jaligner.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/open.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/open.gif deleted file mode 100644 index fabd567..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/open.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/paste.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/paste.gif deleted file mode 100644 index f118c7e..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/paste.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/print.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/print.gif deleted file mode 100644 index 7eb8299..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/print.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/gifs/save.gif b/maven-src/target/classes/java/jaligner/ui/images/gifs/save.gif deleted file mode 100644 index 8d3929c..0000000 Binary files a/maven-src/target/classes/java/jaligner/ui/images/gifs/save.gif and /dev/null differ diff --git a/maven-src/target/classes/java/jaligner/ui/images/package.html b/maven-src/target/classes/java/jaligner/ui/images/package.html deleted file mode 100644 index 5c792c9..0000000 --- a/maven-src/target/classes/java/jaligner/ui/images/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Images used in the toolbar. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/logging/DocumentHandler.java b/maven-src/target/classes/java/jaligner/ui/logging/DocumentHandler.java deleted file mode 100644 index 5ac9a33..0000000 --- a/maven-src/target/classes/java/jaligner/ui/logging/DocumentHandler.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * $Id: DocumentHandler.java,v 1.6 2005/02/22 06:11:58 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.logging; - -import java.awt.Color; -import java.util.logging.ErrorManager; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; - -import javax.swing.JTextPane; -import javax.swing.text.Style; -import javax.swing.text.StyleConstants; -import javax.swing.text.StyledDocument; - -/** - * Logging handler of {@link JTextPane}. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class DocumentHandler extends Handler { - /** - * Maximum document size - */ - private static final int MAXIMUM_DOCUMENT_SIZE = 524288; // 0.5 MB - - private JTextPane textPane = null; - private Style infoStyle = null; - private Style severStyle = null; - - /** - * Constructor - * @param textPane - */ - public DocumentHandler(JTextPane textPane) { - this.textPane = textPane; - setFormatter(new RecordFormatter()); - - StyledDocument document = (StyledDocument) this.textPane.getDocument(); - - infoStyle = document.addStyle("INFO", null); - StyleConstants.setFontFamily(infoStyle,"Monospaced"); - StyleConstants.setBackground(infoStyle, Color.white); - StyleConstants.setForeground(infoStyle, Color.blue); - - severStyle = document.addStyle("SEVER", null); - StyleConstants.setFontFamily(severStyle,"Monospaced"); - StyleConstants.setBackground(severStyle, Color.white); - StyleConstants.setForeground(severStyle, Color.red); - } - - - /** - * - */ - public void close() { - } - - /** - * - */ - public void flush() { - } - - /** - * - */ - public void publish(LogRecord record) { - if (!isLoggable(record)) { - return; - } - - String message; - - try { - message = getFormatter().format(record); - } catch (Exception exception) { - reportError(null, exception, ErrorManager.FORMAT_FAILURE); - return; - } - - synchronized(textPane) { - if (textPane.getDocument().getLength() >= MAXIMUM_DOCUMENT_SIZE) { - // Delete the contents of the text pane. - textPane.setText(""); - } - - try { - if (record.getLevel() == Level.SEVERE) { - textPane.getDocument().insertString(textPane.getDocument().getLength(), message, severStyle); - } else { - textPane.getDocument().insertString(textPane.getDocument().getLength(), message, infoStyle); - } - textPane.setCaretPosition(textPane.getDocument().getLength()); - } catch (Exception ex) { - reportError(null, ex, ErrorManager.WRITE_FAILURE); - } - } - - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/logging/RecordFormatter.java b/maven-src/target/classes/java/jaligner/ui/logging/RecordFormatter.java deleted file mode 100644 index bae1955..0000000 --- a/maven-src/target/classes/java/jaligner/ui/logging/RecordFormatter.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id: RecordFormatter.java,v 1.6 2005/02/19 14:58:10 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.logging; - -import java.util.Date; -import java.util.logging.Formatter; -import java.util.logging.Handler; -import java.util.logging.LogRecord; - -/** - * Logging record formatter - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class RecordFormatter extends Formatter { - - /** - * This method is called for every log records - * - * @param record - */ - public String format(LogRecord record) { - StringBuffer buffer = new StringBuffer( ); - buffer.append ( new Date().toString() ); - buffer.append ( " " ); - buffer.append ( record.getLevel() ); - buffer.append ( "\t" ); - buffer.append ( record.getMessage() ); - buffer.append ( "\n" ); - - return buffer.toString(); - } - - /** - * This method is called just after the handler using this - * formatter is created - * - * @param handler - */ - public String getHead(Handler handler) { - return ""; - } - - /** - * This method is called just after the handler using this - * formatter is closed - * - * @param handler - */ - public String getTail(Handler handler) { - return "\n"; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/logging/package.html b/maven-src/target/classes/java/jaligner/ui/logging/package.html deleted file mode 100644 index 4506adc..0000000 --- a/maven-src/target/classes/java/jaligner/ui/logging/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Logging package. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/package.html b/maven-src/target/classes/java/jaligner/ui/package.html deleted file mode 100644 index cf56259..0000000 --- a/maven-src/target/classes/java/jaligner/ui/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Command line and graphical user interface. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/util/PrintJobMointor.java b/maven-src/target/classes/java/jaligner/ui/util/PrintJobMointor.java deleted file mode 100644 index 8329caa..0000000 --- a/maven-src/target/classes/java/jaligner/ui/util/PrintJobMointor.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id: PrintJobMointor.java,v 1.2 2005/02/19 14:58:10 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.util; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.print.DocPrintJob; -import javax.print.event.PrintJobAdapter; -import javax.print.event.PrintJobEvent; - -/** - * Mointor for print job. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class PrintJobMointor { - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(TextComponentUtil.class.getName()); - - // True iff it is safe to close the print job's input stream - private boolean done = false; - - PrintJobMointor(DocPrintJob job) { - // Add a listener to the print job - job.addPrintJobListener(new PrintJobAdapter() { - public void printJobCanceled(PrintJobEvent printJobEvent) { - logger.info("Print job canceled"); - allDone(); - } - - public void printJobCompleted(PrintJobEvent printJobEvent) { - logger.info("Print job completed"); - allDone(); - } - - public void printJobFailed(PrintJobEvent printJobEvent) { - logger.info("Print job failed"); - allDone(); - } - - public void printJobNoMoreEvents(PrintJobEvent printJobEvent) { - allDone(); - } - - void allDone() { - synchronized (PrintJobMointor.this) { - done = true; - PrintJobMointor.this.notify(); - } - } - }); - } - - /** - * Waits for print job - * - */ - public synchronized void waitForPrintJob() { - try { - logger.info("Waiting for print job..."); - while (!done) { - wait(); - } - logger.info("Finished waiting for print"); - } catch (InterruptedException e) { - logger.log(Level.SEVERE, "Failed waiting for print job: " + e.getMessage(), e); - } - } -} diff --git a/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtil.java b/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtil.java deleted file mode 100644 index 954f64b..0000000 --- a/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtil.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * $Id: TextComponentUtil.java,v 1.14 2005/04/15 15:03:15 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.util; - -import jaligner.ui.clipboard.ClipboardHandlerFactory; -import jaligner.ui.filechooser.FileChooserFactory; -import jaligner.ui.filechooser.NamedInputStream; -import jaligner.util.Commons; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.print.Doc; -import javax.print.DocFlavor; -import javax.print.DocPrintJob; -import javax.print.PrintService; -import javax.print.PrintServiceLookup; -import javax.print.ServiceUI; -import javax.print.SimpleDoc; -import javax.print.attribute.HashDocAttributeSet; -import javax.print.attribute.HashPrintRequestAttributeSet; -import javax.print.attribute.PrintRequestAttributeSet; -import javax.print.attribute.standard.DocumentName; -import javax.print.attribute.standard.JobName; -import javax.swing.text.Document; -import javax.swing.text.JTextComponent; - -/** - * Text component (e.g. {@link javax.swing.JTextArea}or - * {@link javax.swing.JTextPane}) editing helper class. - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class TextComponentUtil { - /** - * Empty string - */ - private static final String EMPTY = ""; - - /** - * Logger - */ - private static final Logger logger = Logger - .getLogger(TextComponentUtil.class.getName()); - - /** - * Copies the selected text to the system clipboad and then deletes it from - * the text component. - * - * @param textComponent - */ - public static void cut(JTextComponent textComponent) { - copy(textComponent); - delete(textComponent); - } - - /** - * Copies the selected text to the system clipboard. - * - * @param textComponent - */ - public static void copy(JTextComponent textComponent) { - ClipboardHandlerFactory.getClipboardHandler().setContents( - textComponent.getSelectedText()); - } - - /** - * Copies the text contents of the system clipboard to the text component. - * - * @param textComponent - */ - public static void paste(JTextComponent textComponent) { - String contents = ClipboardHandlerFactory.getClipboardHandler() - .getContents(); - if (contents != null) { - StringBuffer buffer = new StringBuffer(); - char c; - for (int i = 0, n = contents.length(); i < n; i++) { - c = contents.charAt(i); - // Not to copy a null character - if (c != 0) { - buffer.append(c); - } - } - textComponent.replaceSelection(buffer.toString()); - } - if (!textComponent.hasFocus()) { - textComponent.requestFocus(); - } - } - - /** - * Deletes the selected text in a text component. - * - * @param textComponent - */ - public static void delete(JTextComponent textComponent) { - textComponent.replaceSelection(EMPTY); - } - - /** - * Selects all contents of a text component. - * - * @param textComponent - */ - public static void selectAll(JTextComponent textComponent) { - if (!textComponent.hasFocus()) { - textComponent.requestFocus(); - } - textComponent.selectAll(); - } - - /** - * Opens a file and puts the contents of the file in a text component. - * - * @param textComponent - * @throws TextComponentUtilException - */ - public static boolean open(JTextComponent textComponent) - throws TextComponentUtilException { - InputStream is = null; - BufferedReader reader = null; - try { - NamedInputStream selectedInputStream = FileChooserFactory - .getFileChooser().open(); - if (selectedInputStream != null) { - is = selectedInputStream.getInputStream(); - textComponent.setText(EMPTY); - - reader = new BufferedReader(new InputStreamReader(is)); - String line; - Document document = textComponent.getDocument(); - while ((line = reader.readLine()) != null) { - document.insertString(document.getLength(), line - + Commons.getLineSeparator(), null); - } - if (!textComponent.hasFocus()) { - textComponent.requestFocus(); - } - return true; - } else { - return false; - } - } catch (Exception e) { - throw new TextComponentUtilException(e.getMessage()); - } finally { - if (is != null) { - try { - is.close(); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed closing input stream: " - + e.getMessage(), e); - } - } - if (reader != null) { - try { - reader.close(); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed closing reader: " - + e.getMessage(), e); - } - } - } - } - - /** - * Saves the contents of a text component to a file. - * - * @param textComponent - * @param fileName - * @return true if a file has been chosen or false otherwise - * @throws TextComponentUtilException - */ - public static boolean save(JTextComponent textComponent, String fileName) - throws TextComponentUtilException { - InputStream is = null; - try { - is = new ByteArrayInputStream(textComponent.getText().getBytes()); - return FileChooserFactory.getFileChooser().save(is, fileName); - } catch (Exception e) { - throw new TextComponentUtilException(e.getMessage()); - } finally { - try { - is.close(); - } catch (Exception e) { - logger.log(Level.WARNING, "Failed closing input stream: " - + e.getMessage(), e); - } - } - } - - /** - * Saves the contents of a text component to a file. - * - * @param textComponent - * @return true if a file has been chosen or false otherwise - * @throws TextComponentUtilException - */ - public static boolean save(JTextComponent textComponent) - throws TextComponentUtilException { - return save(textComponent, null); - } - - /** - * Prints the contents of a text component. - * - * @param textComponent - */ - public static void print(JTextComponent textComponent) - throws TextComponentUtilException { - InputStream is = null; - try { - PrintService[] printServices = PrintServiceLookup - .lookupPrintServices(DocFlavor.INPUT_STREAM.AUTOSENSE, null); - if (printServices.length > 0) { - - PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet(); - printRequestAttributeSet.add(new JobName("JAligner", null)); - PrintService service = ServiceUI.printDialog(null, 50, 50, - printServices, PrintServiceLookup - .lookupDefaultPrintService(), - DocFlavor.INPUT_STREAM.AUTOSENSE, - printRequestAttributeSet); - - if (service != null) { - DocPrintJob printJob = service.createPrintJob(); - PrintJobMointor printJobMointor = new PrintJobMointor( - printJob); - - is = new ByteArrayInputStream(textComponent.getText() - .getBytes()); - - DocumentName documentName = new DocumentName("JAligner", - null); - HashDocAttributeSet docAttributeSet = new HashDocAttributeSet(); - docAttributeSet.add(documentName); - Doc doc = new SimpleDoc(is, - DocFlavor.INPUT_STREAM.AUTOSENSE, docAttributeSet); - - printJob.print(doc, printRequestAttributeSet); - printJobMointor.waitForPrintJob(); - } - } else { - throw new TextComponentUtilException("No print service found!"); - } - } catch (Exception e) { - throw new TextComponentUtilException(e.getMessage()); - } finally { - if (is != null) { - try { - is.close(); - } catch (IOException e) { - logger.log(Level.WARNING, "Failed closing input stream: " - + e.getMessage(), e); - } - } - } - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtilException.java b/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtilException.java deleted file mode 100644 index d99df09..0000000 --- a/maven-src/target/classes/java/jaligner/ui/util/TextComponentUtilException.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: TextComponentUtilException.java,v 1.2 2005/04/14 14:44:44 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.ui.util; - -/** - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class TextComponentUtilException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 4050763797251567922L; - - /** - * @param message - */ - public TextComponentUtilException(String message) { - super(message); - } -} diff --git a/maven-src/target/classes/java/jaligner/ui/util/package.html b/maven-src/target/classes/java/jaligner/ui/util/package.html deleted file mode 100644 index a98316d..0000000 --- a/maven-src/target/classes/java/jaligner/ui/util/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Text component utilites package. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/util/Commons.java b/maven-src/target/classes/java/jaligner/util/Commons.java deleted file mode 100644 index 1e07b29..0000000 --- a/maven-src/target/classes/java/jaligner/util/Commons.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * $Id: Commons.java,v 1.27 2005/04/18 05:37:52 ahmed Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.util; - -import java.net.JarURLConnection; -import java.net.URL; -import java.util.jar.Attributes; -import java.util.jar.JarFile; -import java.util.jar.Manifest; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Global constants/varilables/settings - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public abstract class Commons { - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(Commons.class - .getName()); - - /** - * Build timestamp attribute in the manifest in the jar - */ - private static final String BUILD_TIMESTAMP = "Created-At"; - - /** - * - */ - private static final String currentRelease = getManifestBuildTimestamp(); - - /** - * Default home directory - */ - private static final String DEFAULT_USER_DIRECTORY = "."; - - /** - * Default file separator - */ - private static final String DEFAULT_FILE_SEPARATOR = "/"; - - /** - * Default line separator - */ - private static final String DEFAULT_LINE_SEPARATOR = "\r\n"; - - /** - * User home directory - */ - private static String userDirectory = DEFAULT_USER_DIRECTORY; - static { - try { - userDirectory = System.getProperty("user.dir"); - } catch (Exception e) { - /*logger.log(Level.WARNING, "Failed getting user current directory: " - + e.getMessage(), e);*/ - } - } - - /** - * Line separator - */ - private static String fileSeparator = DEFAULT_FILE_SEPARATOR; - static { - try { - fileSeparator = System.getProperty("file.separator"); - } catch (Exception e) { - /*logger.log(Level.WARNING, "Failed getting system file separator: " - + e.getMessage(), e);*/ - } - } - - /** - * Line separator - */ - private static String lineSeparator = DEFAULT_LINE_SEPARATOR; - - static { - try { - lineSeparator = System.getProperty("line.separator"); - } catch (Exception e) { - /*logger.log(Level.WARNING, "Failed getting system line separator: " - + e.getMessage(), e);*/ - } - } - - /** - * JNLP enabled - */ - private static boolean jnlp = false; - static { - try { - jnlp = "true".equalsIgnoreCase(System.getProperty("jnlp.enabled")); - } catch (Exception e) { - /*logger.log(Level.WARNING, "Failed getting jnlp enabled property: " - + e.getMessage(), e);*/ - } - setJnlp(jnlp); - } - - /** - * Returns system file separator. - * - * @return file separator - */ - public static String getFileSeparator() { - return fileSeparator; - } - - /** - * Returns system line separator. - * - * @return line separator - */ - public static String getLineSeparator() { - return lineSeparator; - } - - /** - * Returns user's current directory. - * - * @return user's current directory - */ - public static String getUserDirectory() { - return userDirectory; - } - - /** - * Sets the JNLP flag to true of false - * - * @param jnlp - * true or false - */ - public static void setJnlp(boolean jnlp) { - Commons.jnlp = jnlp; - } - - /** - * Returns true if jnlp is enabled - * - * @return true if jnlp is enabled, otherwise returns false - */ - public static boolean isJnlp() { - return jnlp; - } - - /** - * Gets the build teimstamp from the jar manifest - * - * @return build timestamp - */ - private static String getManifestBuildTimestamp() { - JarURLConnection connection = null; - JarFile jarFile = null; - URL url = Commons.class.getClassLoader().getResource("jaligner"); - try { - // Get jar connection - connection = (JarURLConnection) url.openConnection(); - - // Get the jar file - jarFile = connection.getJarFile(); - - // Get the manifest - Manifest manifest = jarFile.getManifest(); - - // Get the manifest entries - Attributes attributes = manifest.getMainAttributes(); - - Attributes.Name name = new Attributes.Name(BUILD_TIMESTAMP); - return attributes.getValue(name); - } catch (Exception e) { - String message = "Failed getting the current release info: " - + e.getMessage(); - /*logger.log(Level.WARNING, message);*/ - } - return null; - } - - /** - * Returns the current release version of JAligner - * - * @return current release - */ - public static String getCurrentRelease() { - return currentRelease; - } - - /** - * Returns information about JAligner - * - * @return information about JAligner - */ - public static String getJAlignerInfo() { - return "JAligner - Build: " + getCurrentRelease() - + " - By: Ahmed Moustafa (ahmed@users.sf.net)"; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/util/SequenceParser.java b/maven-src/target/classes/java/jaligner/util/SequenceParser.java deleted file mode 100644 index 27ee681..0000000 --- a/maven-src/target/classes/java/jaligner/util/SequenceParser.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * @author Ahmed Moustafa (ahmed at users.sourceforge.net) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.util; - - -import jaligner.Sequence; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.util.StringTokenizer; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * SequenceParser to sequences from different formats. - *
- * Currently the supported formats are: - * - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class SequenceParser { - - /** - * Logger - */ - private static final Logger logger = Logger.getLogger(SequenceParser.class.getName()); - - /** - * Returns a parsed Sequence from a string. - * @param sequence string to parse - * @return parsed sequence - * @throws SequenceParserException - * @see Sequence - */ - public static Sequence parse (String sequence) throws SequenceParserException { - if (sequence == null) { - throw new SequenceParserException ( "Null sequence" ); - } - - if (sequence.trim().length() == 0) { - throw new SequenceParserException ( "Empty sequence" ); - } - - sequence = sequence.replaceAll("\r\n", "\n"); - - String sequenceName = null; - String sequenceDescription = null; - - if (sequence.startsWith(">")) { - // FASTA format - int index = sequence.indexOf("\n"); - - if (index == -1) { - throw new SequenceParserException ( "Invalid sequence format" ); - } - - String first = sequence.substring(1, index); - sequence = sequence.substring(index); - - index = 0; - for (int i = 0; i < first.length() && first.charAt(i) != ' ' && first.charAt(i) != '\t'; i++, index++) { - // Skip white spaces - } - sequenceName = first.substring(0, index); - StringTokenizer stringTokenizer = new StringTokenizer(sequenceName, "|"); - while (stringTokenizer.hasMoreTokens()) { - sequenceName = stringTokenizer.nextToken(); - } - sequenceDescription = index + 1 > first.length() ? "" : first.substring(index + 1); - } else { - // Plain format ... nothing to do here - } - - Sequence s = new Sequence(prepare(sequence), sequenceName, sequenceDescription, Sequence.PROTEIN); - - return s; - } - - /** - * Returns a Sequence parsed and loaded from a file - * @param file to parse - * @return parsed sequence - * @throws SequenceParserException - * @see Sequence - */ - public static Sequence parse (File file) throws SequenceParserException { - String sequenceName = null; - String sequenceDescription = null; - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(new FileInputStream(file))); - StringBuffer buffer = new StringBuffer(); - - // Read & parse the first line - String line = reader.readLine(); - - if (line.startsWith(">")) { - // FASTA sequence - - line = line.substring(1).trim(); - int index = 0; - for (int i = 0; i < line.length() && line.charAt(i) != ' ' && line.charAt(i) != '\t'; i++, index++) { - // Skip white spaces - } - - sequenceName = line.substring(0, index); - StringTokenizer stringTokenizer = new StringTokenizer(sequenceName, "|"); - while (stringTokenizer.hasMoreTokens()) { - sequenceName = stringTokenizer.nextToken(); - } - sequenceDescription = index + 1 > line.length() ? "" : line.substring(index + 1); - } else { - // Plain sequence - buffer.append(prepare(line)); - } - - // Read the remaining the file (the actual sequence) - while ((line = reader.readLine()) != null) { - buffer.append(prepare(line)); - } - reader.close(); - - Sequence s = new Sequence(buffer.toString(), sequenceName, sequenceDescription, Sequence.PROTEIN); - return s; - } catch (Exception e) { - throw new SequenceParserException(e.getMessage()); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (Exception silent) { - logger.log(Level.WARNING, "Failed closing reader: " + silent.getMessage(), silent); - } - } - } - - } - - /** - * Removes whitespaces from a sequence and validates other characters. - * @param sequence sequence to be prepared - * @return prepared array of characters - * @throws SequenceParserException - */ - private static String prepare (String sequence) throws SequenceParserException { - StringBuffer buffer = new StringBuffer(); - String copy = sequence.trim().toUpperCase(); - - for (int i = 0, n = copy.length(); i < n; i++) { - switch ( copy.charAt(i) ) { - // skip whitespaces - case 9: - case 10: - case 13: - case 32: break; - - // add a valid character - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'K': - case 'L': - case 'M': - case 'N': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'Y': - case 'Z': - case 'X': - - case '-': - case '*': buffer.append(copy.charAt(i)); break; - - // throw an exception for anything else - default: throw new SequenceParserException( "Invalid sequence character: '" + copy.charAt(i) + "'"); - } - } - return buffer.toString(); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/util/SequenceParserException.java b/maven-src/target/classes/java/jaligner/util/SequenceParserException.java deleted file mode 100644 index 450169f..0000000 --- a/maven-src/target/classes/java/jaligner/util/SequenceParserException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * @author Ahmed Moustafa (ahmed at users.sourceforge.net) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package jaligner.util; - -/** - * - * @author Ahmed Moustafa (ahmed@users.sf.net) - */ - -public class SequenceParserException extends Exception { - /** - * - */ - private static final long serialVersionUID = 3258417248288191543L; - - /** - * @param message - */ - public SequenceParserException(String message) { - super(message); - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/jaligner/util/package.html b/maven-src/target/classes/java/jaligner/util/package.html deleted file mode 100644 index 9223585..0000000 --- a/maven-src/target/classes/java/jaligner/util/package.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - -Utility classes for helping core and GUI classes. -@author Ahmed Moustafa (ahmed@users.sf.net) - - \ No newline at end of file diff --git a/maven-src/target/classes/java/main.java b/maven-src/target/classes/java/main.java deleted file mode 100644 index e49dc5d..0000000 --- a/maven-src/target/classes/java/main.java +++ /dev/null @@ -1,174 +0,0 @@ -import halign.centerstar.MatrixMSA; -import halign.centerstar.TreeMSA; -import halign.kband.KbandMSA; -import halign.suffixtree.ExtremeMSA; -import halign.suffixtree.SparkDNAMSA; -import halign.smithwaterman.LocalProteinMSA; -import halign.smithwaterman.SparkProteinMSA; -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaSparkContext; -import tree.MSATree; -import tree.SparkTree; - -import java.util.Objects; - -public class main { - - public static void main(String[] args) { - long start = System.currentTimeMillis(); - String inputFile; - String outputFile; - String outputDFS; - int method; - try { - if (args.length == 0) { - errorNote(); - return; - } - if (Objects.equals(args[0], "-localMSA")) { // msa mode, Single mode - inputFile = args[1]; - outputFile = args[2]; - method = Integer.parseInt(args[3]); - switch (method) { - case 0: - // suffix tree algorithm, which is the fastest, but only for DNA/RNA - System.out.println("Running suffix alignment as single mode"); - new ExtremeMSA().start(inputFile, outputFile, null); - break; - case 1: - // kband algorithm based on BLOSUM62 scoring matrix, only for Protein - System.out.println("Running smithwaterman alignment as single mode"); - new LocalProteinMSA().start(inputFile, outputFile); - break; - case 2: - // kband algorithm based on affine gap penalty, only for DNA/RNA - System.out.println("Running kband alignment as single mode"); - new KbandMSA().start(inputFile, outputFile, null); - break; - case 3: - // trie tree alignment algorithm which is slower and only for DNA/RNA - System.out.println("Running trie tree alignment as single mode"); - new TreeMSA().start(inputFile, outputFile, null); - break; - case 4: - // basic algorithm based on the similarity matrix, the slowest and only for DNA/RNA - // but it is the most accurate in the case of lower sequences similarity - System.out.println("Running similarity matrix alignment as single mode"); - new MatrixMSA().start(inputFile, outputFile, null); - break; - } - long end = System.currentTimeMillis(); - System.out.println("Cost time: " + (end - start) + "ms"); - System.out.println("Successfully! The result is saved as: " + outputFile); - } else if (Objects.equals(args[0], "-hadoopMSA")) { //Hadoop mode - inputFile = args[1]; - outputFile = args[2]; - outputDFS = args[3]; - method = Integer.parseInt(args[4]); - switch (method) { - case 0: - System.out.println("Running suffix tree alignment as hadoop mode"); - new ExtremeMSA().start(inputFile, outputFile, outputDFS); - break; - case 1: - System.out.println("Sorry, smithwaterman alignment as hadoop mode had been canceled. " + - "You may use Spark mode instead."); - break; - case 2: - System.out.println("Running kband alignment as hadoop mode"); - new KbandMSA().start(inputFile, outputFile, outputDFS); - break; - case 3: - System.out.println("Running trie tree alignment as hadoop mode"); - new TreeMSA().start(inputFile, outputFile, outputDFS); - break; - case 4: - System.out.println("Running similarity matrix alignment as hadoop mode"); - new MatrixMSA().start(inputFile, outputFile, outputDFS); - break; - } - long end = System.currentTimeMillis(); - System.out.println("Cost time: " + (end - start) + "ms"); - System.out.println("Successfully! The result is saved as: " + outputFile); - } else if (Objects.equals(args[0], "-sparkMSA")) { - inputFile = args[1]; - outputFile = args[2]; - method = Integer.parseInt(args[3]); - switch (method) { - case 0: - System.out.println("Running suffix tree alignment as spark mode"); - SparkConf conf = new SparkConf().setAppName("SparkSuffixAutomation"); - conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - conf.set("spark.kryoserializer.buffer.max", "2000m"); - conf.registerKryoClasses(new Class[]{SparkDNAMSA.class}); - JavaSparkContext jsc = new JavaSparkContext(conf); - new SparkDNAMSA().start(jsc, inputFile, outputFile); - jsc.stop(); - break; - case 1: - System.out.println("Running smithwaterman alignment as spark mode"); - conf = new SparkConf().setAppName("SparkProteinMSA"); - conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - conf.set("spark.kryoserializer.buffer.max", "2000m"); - conf.registerKryoClasses(new Class[]{SparkProteinMSA.class}); - jsc = new JavaSparkContext(conf); - new SparkProteinMSA().start(jsc, inputFile, outputFile); - jsc.stop(); - break; - } - long end = System.currentTimeMillis(); - System.out.println("Cost time: " + (end - start) + "ms"); - System.out.println("Successfully! The result is saved as: " + outputFile); - } else if (Objects.equals(args[0], "-localTree")) { - inputFile = args[1]; - outputFile = args[2]; - System.out.println("Generating phylogenetic trees as local mode"); - new MSATree().start(inputFile, outputFile); - long end = System.currentTimeMillis(); - System.out.println("Cost time: " + (end - start) + "ms"); - System.out.println("Successfully! The result is saved as: " + outputFile); - } else if (Objects.equals(args[0], "-sparkTree")) { - inputFile = args[1]; - outputFile = args[2]; - System.out.println("Generating phylogenetic trees as spark mode"); - SparkConf conf = new SparkConf().setAppName("SparkMSATree"); - conf.setMaster("local[16]"); - conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - conf.set("spark.kryoserializer.buffer.max", "2000m"); - conf.registerKryoClasses(new Class[]{SparkTree.class}); - JavaSparkContext jsc = new JavaSparkContext(conf); - new SparkTree().GenerateTree(jsc, inputFile, outputFile); - jsc.stop(); - } else - errorNote(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private static void errorNote() { - String version = "HAlign2.1.jar"; - String suffix = " "; - System.out.println("Kindly note: error params."); - System.out.println(); - System.out.println("1. if you are a single core user, command is: java -jar " + version + suffix); - System.out.println("mode: -localMSA, -localTree."); - System.out.println("input-file: local fasta format file, required."); - System.out.println("output-file: local fasta format file, just a file name, required."); - System.out.println("algorithm: 0, 1, 2, 3, or 4, optional."); - System.out.println(); - System.out.println("2. if you are a hadoop user, command is: hadoop jar " + version + suffix); - System.out.println("mode: -hadoopMSA."); - System.out.println("input-file: local fasta format file, required."); - System.out.println("output-file: local fasta format file, just a file name, required."); - System.out.println("algorithm: 0, 1, 2, 3, or 4, optional."); - System.out.println(); - System.out.println("3. if you are a spark user, command is: spark-submit --class main " + version + suffix); - System.out.println("mode: -sparkMSA, -sparkTree."); - System.out.println("input-file: local fasta format file, required."); - System.out.println("output-file: local fasta format file, just a file name, required."); - System.out.println("algorithm: 0, 1, required for '-sparkMSA' mode."); - System.out.println(); - System.out.println("Visit https://github.com/ShixiangWan/HAlign2.0 for detailed usages. Thanks."); - } -} diff --git a/maven-src/target/classes/java/tree/ClusterProcess.java b/maven-src/target/classes/java/tree/ClusterProcess.java deleted file mode 100644 index ea61b24..0000000 --- a/maven-src/target/classes/java/tree/ClusterProcess.java +++ /dev/null @@ -1,106 +0,0 @@ -package tree; - -import java.io.*; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -public class ClusterProcess { - - public static Set sum_set = new HashSet<>(); - - class cluster_data { - String label; - String name; - String sequence; - } - - public void preProcess(String filename) throws IOException { - BufferedReader br = new BufferedReader(new FileReader(filename)); - int first_set_flag = 0; - String pre_label = ""; - String cur_label; - Set pre_set = new HashSet<>(); - while (br.ready()) { - String str[] = br.readLine().split("\t"); - cur_label = str[0]; - if (first_set_flag == 0) { // add the first data - first_set_flag = 1; - pre_label = cur_label; - cluster_data clusterdata = new cluster_data(); - clusterdata.label = str[0]; - clusterdata.name = str[1]; - clusterdata.sequence = str[2]; - pre_set.add(clusterdata); - continue; - } - // if the current label no equal to the pre label add the set to sum-set - if (!cur_label.equals(pre_label)) { - sum_set.add(pre_set); - pre_label = cur_label; - pre_set = new HashSet<>(); - cluster_data clusterdata = new cluster_data(); - clusterdata.label = str[0]; - clusterdata.name = str[1]; - clusterdata.sequence = str[2]; - pre_set.add(clusterdata); - } else { - cluster_data clusterdata = new cluster_data(); - clusterdata.label = str[0]; - clusterdata.name = str[1]; - clusterdata.sequence = str[2]; - pre_set.add(clusterdata); - } - }// end while - sum_set.add(pre_set); - br.close(); - } - - public void kvProcess(String inputKVFile, String outputClusterFile) throws IOException { - BufferedReader bufferedReader = new BufferedReader(new FileReader(inputKVFile)); - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputClusterFile)); - - String value; - while (bufferedReader.ready()) { - value = bufferedReader.readLine().trim(); - String[] value_temp = value.split("\t"); - String name = value_temp[0]; - String sequence = value_temp[1]; - String label = ""; - double min_distance = 100000; - for (Set set : sum_set) { - Iterator iter = set.iterator(); - cluster_data clusterdata = (cluster_data) iter.next(); // random select one sample to calculate the distance - double p = JukeCantor(sequence, clusterdata.sequence); - p = 1.0 - 0.75 * p; - double distance = (double) (int) (-0.75 * Math.log(p) * 1000) / 1000; //根据公式计算距离 - if (distance < min_distance) { - min_distance = distance; - label = clusterdata.label; - } - } - bufferedWriter.write(label + "\t" + name + "\t" + sequence+"\n"); - } - bufferedReader.close(); - bufferedWriter.close(); - } - - /*input two sequences, return differ parts rate of them.*/ - public static double JukeCantor(String gene1, String gene2) { - int rate = 0; - int i; - double result; - int length = gene1.length(); - if (gene1.length() > gene2.length()) { - length = gene2.length(); - } - for (i = 0; i < length; i++) { - if (gene1.charAt(i) != gene2.charAt(i)) { - rate++; - } - } - result = (double) rate / (double) gene1.length(); - return result; - } - -} diff --git a/maven-src/target/classes/java/tree/MSATree.java b/maven-src/target/classes/java/tree/MSATree.java deleted file mode 100644 index f6356ee..0000000 --- a/maven-src/target/classes/java/tree/MSATree.java +++ /dev/null @@ -1,123 +0,0 @@ -package tree; - -import utils.IOUtils; -import utils.HDFSUtils; - -import java.io.*; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -public class MSATree { - public static void main(String[] args) throws Exception { - String inputFile = "/home/shixiang/out.fasta"; - String outputFile = "/home/shixiang/tree.tre"; - new MSATree().start(inputFile, outputFile); - } - - public void start(String inputFile, String outputFile) throws Exception { - - String localPath = ""; - if (inputFile.contains("/")) { - localPath = inputFile.substring(0, inputFile.lastIndexOf("/")+1); - inputFile = inputFile.substring(inputFile.lastIndexOf("/")+1); - } - HDFSUtils utils = new HDFSUtils(); - utils.clear_local_path(new File(localPath + "HPTree_OutPut")); - - System.out.println(">>(Local mode for tree) loading data ..."); - long startTime = System.currentTimeMillis(); - IOUtils formatUtils = new IOUtils(); - formatUtils.formatKVFasta(localPath + inputFile, localPath + "inputKV"); - int allNum = formatUtils.getAllNum(); - System.out.println("total number: " + allNum); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - System.out.println(">>clustering process ..."); - String reduce_number = "2"; - Pre_Cluster_process cluster = new Pre_Cluster_process(localPath + "inputKV", reduce_number); - cluster.Get_Cluster(localPath + "single_cluster_output", allNum); - - //////////////////////////////////////////////////////////////////////////////////////// - ClusterProcess clusterProcess = new ClusterProcess(); - clusterProcess.preProcess(localPath + "single_cluster_output"); - new File(localPath + "single_cluster_output").delete(); - clusterProcess.kvProcess(localPath + "inputKV", localPath + "Cluster_OutPut"); - new File(localPath + "inputKV").delete(); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - /*local_path: Cluster_OutPut -> OnBalance_OutPut*/ - int cluster_number = 3; - OnBalance onbalance = new OnBalance(localPath + "Cluster_OutPut"); - onbalance.Balance(cluster_number, localPath); - new File(localPath + "Cluster_OutPut").delete(); - - System.out.println(">>construct phylogenetic tree ..."); - //////////////////////////////////////////////////////////////////////////////////////// - new File(localPath + "HPTree_OutPut").mkdir(); - BufferedReader bufferedReader = new BufferedReader(new FileReader(localPath + "OnBalance_OutPut")); - String value; - List balanceKey = new ArrayList<>(); - List balanceVal = new ArrayList<>(); - while (bufferedReader.ready()) { - value = bufferedReader.readLine(); - String [] list = value.split("\t");// 把三个字段分离出来 - balanceKey.add(list[1]); - balanceVal.add(list[2]); - } - bufferedReader.close(); - - int loop; - if (allNum < 100) loop = 4; - else loop = 32; - int loopNum = allNum/loop; - int position = 0; - ExecutorService pool = Executors.newFixedThreadPool(loop); - for (int i = 0; i < loop; i++) { - int position2 = position+loopNum; - if (i == loop-1) position2 = allNum; - List key = balanceKey.subList(position, position2); - List val = balanceVal.subList(position, position2); - GetSubTreeThread getSubTreeThread = new GetSubTreeThread(key, val, localPath + "HPTree_OutPut/"+i+".txt"); - pool.execute(new Thread(getSubTreeThread)); - position = position2; - } - pool.shutdown(); - while (!pool.isTerminated()); - new File(localPath + "OnBalance_OutPut").delete(); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - System.out.println(">>merge and save phylogenetic tree ..."); - NeighbourJoining_Summary nj_summary = new NeighbourJoining_Summary(localPath+"HPTree_OutPut", outputFile); - nj_summary.Merge(); - nj_summary.Summary(); - - utils.clear_local_path(new File(localPath + "HPTree_OutPut")); - } - - public class GetSubTreeThread implements Runnable { - private List Key; - private List Val; - private String outputFile; - GetSubTreeThread(List Key, List Val, String outputFile) { - this.Key = Key; - this.Val = Val; - this.outputFile = outputFile; - } - @Override - public void run() { - try { - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); - NeighbourJoining nj = new NeighbourJoining();//开启进化树构建算法 - nj.construct(Key, Val); - String sub_tree = nj.getSubTree(); - String present_seq = nj.getPresentNode(); - bufferedWriter.write(present_seq+"\t"+sub_tree); - bufferedWriter.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } -} diff --git a/maven-src/target/classes/java/tree/MinDistance.java b/maven-src/target/classes/java/tree/MinDistance.java deleted file mode 100644 index 03dff9c..0000000 --- a/maven-src/target/classes/java/tree/MinDistance.java +++ /dev/null @@ -1,30 +0,0 @@ -package tree; - -public class MinDistance{//这个类用来保存在迭代查找的最小值信息 - private double mindistance; - private int i; - private int j; - public MinDistance(double mindistance,int i,int j){ - this.mindistance=mindistance; //保存最小值 - this.i=i;//最小值的下标 - this.j=j; - } - public void setDistance(double mindistance){ - this.mindistance=mindistance; - } - public void seti(int i){ - this.i=i; - } - public void setj(int j){ - this.j=j; - } - public double getDistance(){ - return mindistance; - } - public int geti(){ - return i; - } - public int getj(){ - return j; - } -} \ No newline at end of file diff --git a/maven-src/target/classes/java/tree/NeighbourJoining.java b/maven-src/target/classes/java/tree/NeighbourJoining.java deleted file mode 100644 index f420034..0000000 --- a/maven-src/target/classes/java/tree/NeighbourJoining.java +++ /dev/null @@ -1,309 +0,0 @@ -package tree; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -class NeighbourJoining_Node { - private NeighbourJoining_Node ParentNode; - private NeighbourJoining_Node LNode; - private NeighbourJoining_Node RNode; - private String Tree; - private int index; - - public NeighbourJoining_Node(int index, NeighbourJoining_Node ParentNode, NeighbourJoining_Node LNode, NeighbourJoining_Node RNode, String Tree) { - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.Tree = Tree; - } - - public void Reset(int index, NeighbourJoining_Node ParentNode, NeighbourJoining_Node LNode, NeighbourJoining_Node RNode, String Tree) { - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.Tree = Tree; - } - - // reset function - public void Reset_ParentNode(NeighbourJoining_Node ParentNode) { - this.ParentNode = ParentNode; - } - - public void Reset_LNode(NeighbourJoining_Node LNode) { - this.LNode = LNode; - } - - public void Reset_RNode(NeighbourJoining_Node RNode) { - this.RNode = RNode; - } - - public void Reset_index(int index) { - this.index = index; - } - - public void Reset_Tree(String Tree) { - this.Tree = Tree; - } - - // get function - public NeighbourJoining_Node Get_ParentNode() { - return this.ParentNode; - } - - public NeighbourJoining_Node Get_LNode() { - return this.LNode; - } - - public NeighbourJoining_Node Get_RNode() { - return this.RNode; - } - - public int Get_index() { - return this.index; - } - - public String Get_Tree() { - return this.Tree; - } - -} - -public class NeighbourJoining { - - String subTree;// 返回进化子树 - String present_seq; - - public void construct(List seq_name, List seq) throws IOException {//把子集合的序列名和序列数组作为参数传进来 - - int setsize = seq.size();//获取序列的条数 - double[][] distance = new double[setsize][setsize]; //设置子集合的距离矩阵 - double[] A = new double[setsize];//距离矩阵每行的和 - ArrayList LeaveNode_list = new ArrayList<>(); - for (int i = 0; i < setsize; i++) {//构建叶子节点列表 - LeaveNode_list.add(new NeighbourJoining_Node(i, null, null, null, "")); - } - - CountTheDistance(seq, seq.size(), distance, A);//计算距离矩阵以及A - MinDistance min_distance = new MinDistance(10000.0, 0, 0); - AmendTheDistance(distance, A, setsize, min_distance);//对距离矩阵进行修正 - Set Already_set = new HashSet(); - int iter = 0; - while (iter != setsize - 1) {//依次合并两个节点 - //System.out.println("iter time is:" + iter); - iter++; - double Li = 0.0, Lj = 0.0; - for (int z = 0; z < setsize; z++) { - Li = Li + distance[min_distance.geti()][z] - distance[min_distance.getj()][z]; - } - Lj = -Li; - Li = (min_distance.getDistance() + Li) / 2;//分枝长度计算的时候是全总再加min_distance - Lj = (min_distance.getDistance() + Lj) / 2; //获取了i , j 到父节点的分枝长度 - - for (int k = 0; k < setsize; k++) { //更新矩阵 - if (k != min_distance.geti() && k != min_distance.getj()) {//当不是扫描到对正轴的时候 - if (distance[k][min_distance.geti()] == 0) { - continue; - } - distance[min_distance.geti()][k] = (distance[min_distance.geti()][k] + distance[min_distance.getj()][k] - - min_distance.getDistance()) / 2; - distance[min_distance.getj()][k] = 0;//然后把下标大的横和列全部都变成0 - distance[k][min_distance.getj()] = 0; - distance[k][min_distance.geti()] = distance[min_distance.geti()][k]; - } else { //要么k=i ,或者k=j - distance[min_distance.geti()][k] = 0; - distance[min_distance.getj()][k] = 0; - distance[k][min_distance.getj()] = 0; - distance[k][min_distance.geti()] = 0; - } - } - - //更新完矩阵后,合并这两个节点, 1、两个均未出现过 2、一个出现过一个未出现过 - if (!Already_set.contains(min_distance.geti()) && !Already_set.contains(min_distance.getj())) { - LeaveNode_list.get(min_distance.geti()).Reset_Tree(seq_name.get(min_distance.geti()));//叶子节点添加子结构 - LeaveNode_list.get(min_distance.getj()).Reset_Tree(seq_name.get(min_distance.getj())); - NeighbourJoining_Node InternalNode = new NeighbourJoining_Node(-1,//构建一个内部节点 - null, - LeaveNode_list.get(min_distance.geti()), - LeaveNode_list.get(min_distance.getj()), - "(" + LeaveNode_list.get(min_distance.geti()).Get_Tree() + ":" + Li + "," + LeaveNode_list.get(min_distance.getj()).Get_Tree() + ":" + Lj + ")" - ); - LeaveNode_list.get(min_distance.geti()).Reset_ParentNode(InternalNode);//叶子节修改父节点 - LeaveNode_list.get(min_distance.getj()).Reset_ParentNode(InternalNode); - InternalNode.Get_LNode().Reset_Tree(null);// 设置左右子树节点为空,减小空间消耗 - InternalNode.Get_RNode().Reset_Tree(null); - Already_set.add(min_distance.geti());// 记录已处理节点 - Already_set.add(min_distance.getj()); - } else if (Already_set.contains(min_distance.geti()) && !Already_set.contains(min_distance.getj())) { // i 节点已经被处理了 - NeighbourJoining_Node CurrentNode = LeaveNode_list.get(min_distance.geti()); - while (CurrentNode.Get_ParentNode() != null) { - CurrentNode = CurrentNode.Get_ParentNode(); //回溯到i节点的根节点 - } - LeaveNode_list.get(min_distance.getj()).Reset_Tree(seq_name.get(min_distance.getj())); - NeighbourJoining_Node InternalNode = new NeighbourJoining_Node(-1,//构建一个内部节点 - null, - CurrentNode, - LeaveNode_list.get(min_distance.getj()), - "(" + CurrentNode.Get_Tree() + ":" + Li + "," + LeaveNode_list.get(min_distance.getj()).Get_Tree() + ":" + Lj + ")" - ); - CurrentNode.Reset_ParentNode(InternalNode); - LeaveNode_list.get(min_distance.getj()).Reset_ParentNode(InternalNode); - InternalNode.Get_LNode().Reset_Tree(null);// 设置左右子树节点为空,减小空间消耗 - InternalNode.Get_RNode().Reset_Tree(null); - Already_set.add(min_distance.getj());// 记录已处理节点 - }//end if i contain - else if (Already_set.contains(min_distance.getj()) && !Already_set.contains(min_distance.geti())) { // j 节点已经被处理了 - NeighbourJoining_Node CurrentNode = LeaveNode_list.get(min_distance.getj()); - while (CurrentNode.Get_ParentNode() != null) { - CurrentNode = CurrentNode.Get_ParentNode(); //回溯到i节点的根节点 - } - LeaveNode_list.get(min_distance.geti()).Reset_Tree(seq_name.get(min_distance.geti()));//叶子节点添加子结构 - NeighbourJoining_Node InternalNode = new NeighbourJoining_Node(-1,//构建一个内部节点 - null, - CurrentNode, - LeaveNode_list.get(min_distance.geti()), - "(" + LeaveNode_list.get(min_distance.geti()).Get_Tree() + ":" + Li + "," + CurrentNode.Get_Tree() + ":" + Lj + ")" - ); - CurrentNode.Reset_ParentNode(InternalNode); - LeaveNode_list.get(min_distance.geti()).Reset_ParentNode(InternalNode); - InternalNode.Get_LNode().Reset_Tree(null);// 设置左右子树节点为空,减小空间消耗 - InternalNode.Get_RNode().Reset_Tree(null); - Already_set.add(min_distance.geti());// 记录已处理节点 - }//end if j contain - else if (Already_set.contains(min_distance.geti()) && Already_set.contains(min_distance.getj())) { - NeighbourJoining_Node CurrentNodei = LeaveNode_list.get(min_distance.geti()); - while (CurrentNodei.Get_ParentNode() != null) { - CurrentNodei = CurrentNodei.Get_ParentNode(); //回溯到i节点的根节点 - } - NeighbourJoining_Node CurrentNodej = LeaveNode_list.get(min_distance.getj()); - while (CurrentNodej.Get_ParentNode() != null) { - CurrentNodej = CurrentNodej.Get_ParentNode(); //回溯到i节点的根节点 - } - NeighbourJoining_Node InternalNode = new NeighbourJoining_Node(-1,//构建一个内部节点 - null, - CurrentNodei, - CurrentNodej, - "(" + CurrentNodei.Get_Tree() + ":" + Li + "," + CurrentNodej.Get_Tree() + ":" + Lj + ")" - ); - CurrentNodei.Reset_ParentNode(InternalNode); - CurrentNodej.Reset_ParentNode(InternalNode); - CurrentNodei.Reset_Tree(null); - CurrentNodej.Reset_Tree(null); - } - // 合并节点过程完成 - - // 再次寻找最小值 - min_distance.setDistance(10000.0);//重新设置最小值的下标,后面的代码用来找新构建的最小值,因为扫描是从上到下从左到右,所以x一定是比y更小 - min_distance.seti(0); - min_distance.setj(0); - for (int i = 0; i < setsize; i++) { // 重新修改净分枝度 - A[i] = 0; - for (int j = 0; j < setsize; j++) { - A[i] = A[i] + distance[i][j]; - } - } - for (int i = 0; i < setsize; i++) { - for (int j = i + 1; j < setsize; j++) { - if (distance[i][j] == 0) { - continue; - } - distance[i][j] = distance[i][j] - (A[i] + A[j]) / (setsize - 2);//修正的时候根据公式要用到A 和distance - distance[j][i] = distance[i][j]; - if (distance[i][j] < min_distance.getDistance() && distance[i][j] != 0) {//获取矩阵中最小的距离 - min_distance.setDistance(distance[i][j]); - min_distance.seti(i); - min_distance.setj(j); - }// end if - }//end for - } //end for - }//end while(Already_set.size()!=setsize) - - // 获取子树 - NeighbourJoining_Node CurrentNode = LeaveNode_list.get(0); - while (CurrentNode.Get_ParentNode() != null) { - CurrentNode = CurrentNode.Get_ParentNode(); //回溯到i节点的根节点 - } - subTree = CurrentNode.Get_Tree(); - // 获取代表序列 - while (CurrentNode.Get_LNode() != null) { - CurrentNode = CurrentNode.Get_LNode(); - } - present_seq = seq.get(CurrentNode.Get_index()); - } - - public String getSubTree() {//用来获取子树 - return subTree; - } - - public String getPresentNode() {//获取代表序列 - return present_seq; - } - - public static void AmendTheDistance(double[][] distance, double[] A, int lineNumber, MinDistance min_distance) {//在进化树构建的时候用来修正距离 - int i, j; - for (i = 0; i < lineNumber; i++) { - for (j = i + 1; j < lineNumber; j++) { - distance[i][j] = distance[i][j] - (A[i] + A[j]) / (lineNumber - 2);//修正的时候根据公式要用到A 和distance - distance[j][i] = distance[i][j]; - if (distance[i][j] < min_distance.getDistance() && distance[i][j] != 0) {//获取矩阵中最小的距离 - min_distance.setDistance(distance[i][j]); - min_distance.seti(i); - min_distance.setj(j); - } - } - } - } - - public static void CountTheDistance(List sequences, int lineNumber, double[][] distance, double[] A) throws IOException {//这个函数用来计算距离矩阵 - int i, j; - double p; - double temp; - double distance_temp = 0;//这个在计算方差和均值的时候有用 - - for (i = 0; i < lineNumber; i++) { - for (j = 0; j < lineNumber; j++) { - - if (i < j) { - p = JukeCantor(sequences.get(i), sequences.get(j)); - p = 1.0 - 0.75 * p; - temp = Math.log(p); - distance_temp = -0.75 * temp; //根据公式计算距离 - distance[i][j] = distance_temp; - } else if (i == j) { - distance[i][j] = 0;//对角线上为0 - } else { - distance[i][j] = distance[j][i]; - } - // System.out.print(distance_temp+"\t"); //这里打印出距离矩阵可以在屏幕上显示 - A[i] += distance[i][j];//计算A数组 - } - // System.out.println(); - } - } - - public static double JukeCantor(String gene1, String gene2) { - int rate = 0; - int i; - double result = 0.0; - int length = gene1.length(); - if (gene1.length() > gene2.length()) { - length = gene2.length(); - } - for (i = 0; i < length; i++) { - //System.out.print(gene1.charAt(i)+" "); - if (gene1.charAt(i) != gene2.charAt(i)) { - rate++; - } - } - result = (double) rate / (double) gene1.length(); - //System.out.print(result+" "); - return result; - } - - -} - \ No newline at end of file diff --git a/maven-src/target/classes/java/tree/NeighbourJoining_Summary.java b/maven-src/target/classes/java/tree/NeighbourJoining_Summary.java deleted file mode 100644 index a1dd7cb..0000000 --- a/maven-src/target/classes/java/tree/NeighbourJoining_Summary.java +++ /dev/null @@ -1,319 +0,0 @@ -package tree; - -import java.io.*; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; - -class NeighbourJoiningSummary_Node{ - private NeighbourJoiningSummary_Node ParentNode; - private NeighbourJoiningSummary_Node LNode; - private NeighbourJoiningSummary_Node RNode; - private String Tree; - private int index; - - public NeighbourJoiningSummary_Node(int index, NeighbourJoiningSummary_Node ParentNode, NeighbourJoiningSummary_Node LNode, NeighbourJoiningSummary_Node RNode , String Tree){ - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.Tree = Tree; - } - public void Reset(int index, NeighbourJoiningSummary_Node ParentNode, NeighbourJoiningSummary_Node LNode, NeighbourJoiningSummary_Node RNode , String Tree){ - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.Tree = Tree; - } -//reset function - public void Reset_ParentNode(NeighbourJoiningSummary_Node ParentNode){ - this.ParentNode = ParentNode; - } - public void Reset_LNode(NeighbourJoiningSummary_Node LNode){ - this.LNode = LNode; - } - public void Reset_RNode(NeighbourJoiningSummary_Node RNode){ - this.RNode = RNode; - } - public void Reset_index(int index){ - this.index = index; - } - public void Reset_Tree(String Tree){ - this.Tree = Tree; - } -// get function - public NeighbourJoiningSummary_Node Get_ParentNode(){ - return this.ParentNode; - } - public NeighbourJoiningSummary_Node Get_LNode(){ - return this.LNode; - } - public NeighbourJoiningSummary_Node Get_RNode(){ - return this.RNode; - } - public int Get_index(){ - return this.index; - } - public String Get_Tree(){ - return this.Tree; - } - -} - -public class NeighbourJoining_Summary { - - String input_Directory; - String HPTree_OutPut; - ArrayList LeaveNode_list = new ArrayList(); - //列表用于保存所有的子树 - ArrayList seq = new ArrayList(); - //列表用于保存所有的代表节点 - - public NeighbourJoining_Summary(String input_Directory , String HPTree_OutPut){ - this.input_Directory = input_Directory; - this.HPTree_OutPut = HPTree_OutPut; - } - - public void Merge() throws IOException{ //合并文件夹下的所有reduce输出结果 - File NeighbourJoining_subTree_Directory = new File(input_Directory);//获取本地文件目录 - if (!NeighbourJoining_subTree_Directory.isDirectory()){ - System.out.println(NeighbourJoining_subTree_Directory + " is not a directory "); - System.exit(0); - } - else{//操作文件夹下的每个文件 - String[] filelist = NeighbourJoining_subTree_Directory.list(); - - for(int i=0;i Already_set = new HashSet(); - - int iter=0; - while(iter!=setsize-1){//依次合并两个节点 - iter++; - double Li=0.0 , Lj=0.0; - for(int z=0;zsequences,int lineNumber,double[][] distance,double[] A) throws IOException{//这个函数用来计算距离矩阵 - int i,j; - double p; - double temp; - double distance_temp = 0;//这个在计算方差和均值的时候有用 - - for(i=0;igene2.length()){ - length=gene2.length(); - } - for(i=0;i set_info_list = new ArrayList<>(); - for (int i = 0; i < cluster_num; i++) { - set_info_list.add(new set_info(String.valueOf(i), 0)); - } - - while (br.ready()) { - String[] line = br.readLine().split("\t"); - set_info_list.get(Integer.parseInt(line[0])).Reset_size( - set_info_list.get(Integer.parseInt(line[0])).Get_size() + 1); - - }//end while - br.close(); - - /* - * 以上获取正确的集合类别信息,所有集合的信息被保存到list当中 - */ - int balance_value = 0; - Comparator comparator = (obj1, obj2) -> { - set_info test1 = obj1; - set_info test2 = obj2; - if (test1.size > test2.size) { - return 1; - } else if (test1.size < test2.size) { - return -1; - } else { - return 0; - } - }; - - Collections.sort(set_info_list, comparator); //首先需要对set_info_list 根据size的大小进行排序 - - ArrayList new_list = new ArrayList<>(); - for (int i = 0; i < set_info_list.size() - 1; i++) { //排序后计算balance value - balance_value = balance_value + (set_info_list.get(i).size - set_info_list.get(i + 1).size); - new_list.add(set_info_list.get(i).size); - } - new_list.add(set_info_list.get(set_info_list.size() - 1).size);////把 set_info_list 中的size 复制给new_list - new_list.set(1, new_list.get(0) + new_list.get(1)); - new_list.set(0, new_list.get(new_list.size() - 1) / 2); - new_list.set(new_list.size() - 1, new_list.get(new_list.size() - 1) / 2); - - Collections.sort(new_list); //对new_list 进行排序,并计算其balance value - - int new_balance_value = 0; - for (int i = 0; i < set_info_list.size() - 1; i++) { //排序后计算 new balance value - new_balance_value = new_balance_value + (new_list.get(i) - new_list.get(i + 1)); - } - if (balance_value < 0) balance_value = -balance_value; - if (new_balance_value < 0) new_balance_value = -new_balance_value;//由于是从小到大,所有balance value 的正负号需要调整 - - - if (new_balance_value < balance_value) { - flag = 0;//flag等于0的时候表明有改进,需要继续迭代 - //重写数据 - String splitLabel = set_info_list.get(set_info_list.size() - 1).label; - String splitToLable = set_info_list.get(0).label; - int splitSize = set_info_list.get(set_info_list.size() - 1).size / 2; - String combineLabel = set_info_list.get(0).label; - String combineToLabel = set_info_list.get(1).label; - iteratorTime++; - inputfile = ReWriterFile(splitLabel, splitToLable, combineLabel, combineToLabel, splitSize, inputfile, iteratorTime); - } else { - flag = 1;//flag等于1的时候说明没有改进,退出while循环 - break; - } - }//end while - - BufferedReader br = new BufferedReader(new FileReader(inputfile)); - BufferedWriter bw = new BufferedWriter(new FileWriter(local_path + "/OnBalance_OutPut")); - while (br.ready()) { - bw.write(br.readLine()); - bw.newLine(); - bw.flush(); - } - br.close(); - bw.close(); - }// end Balance - - public String ReWriterFile(String splitLabel, String splitToLabel, - String combineLabel, String combineToLabel, int splitSize, String inputfile, int iteratorTime) throws IOException { - String fw = "tmp-" + iteratorTime; - BufferedReader br = new BufferedReader(new FileReader(inputfile)); - BufferedWriter bw = new BufferedWriter(new FileWriter(fw)); - while (br.ready()) { - String[] line = br.readLine().split("\t"); - if (line[0].equals(splitLabel) && splitSize > 0) { - splitSize--; - bw.write(line[0] + "\t" + line[1] + "\t" + line[2]); - bw.newLine(); - bw.flush(); - } else if (line[0].equals(splitLabel) && splitSize <= 0) { - bw.write(splitToLabel + "\t" + line[1] + "\t" + line[2]); - bw.newLine(); - bw.flush(); - } else if (line[0].equals(combineLabel)) { - bw.write(combineToLabel + "\t" + line[1] + "\t" + line[2]); - bw.newLine(); - bw.flush(); - } else { - bw.write(line[0] + "\t" + line[1] + "\t" + line[2]); - bw.newLine(); - bw.flush(); - } - } - br.close(); - bw.close(); - return fw; - } -} diff --git a/maven-src/target/classes/java/tree/Pre_Cluster_process.java b/maven-src/target/classes/java/tree/Pre_Cluster_process.java deleted file mode 100644 index 2f277e3..0000000 --- a/maven-src/target/classes/java/tree/Pre_Cluster_process.java +++ /dev/null @@ -1,524 +0,0 @@ -package tree; - -import java.io.*; -import java.util.*; - -class Point { - double meature; - int i; - int j; - - Point(double meature, int i, int j) { - this.meature = meature; - this.i = i; - this.j = j; - } -} - -class Node { - private String ID; - private int Lnum; - private int Rnum; - private Node ParentNode; - private Node LNode; - private Node RNode; - private int index; - private Boolean HaveClass; - - public Node(String ID, int Lnum, int Rnum, Node ParentNode, Node LNode, Node RNode, int index, Boolean HaveClass) { - this.ID = ID; - this.Lnum = Lnum; - this.Rnum = Rnum; - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.HaveClass = HaveClass; - } - - public void Reset(String ID, int Lnum, int Rnum, Node ParentNode, Node LNode, Node RNode, int index, Boolean HaveClass) { - this.ID = ID; - this.Lnum = Lnum; - this.Rnum = Rnum; - this.ParentNode = ParentNode; - this.LNode = LNode; - this.RNode = RNode; - this.index = index; - this.HaveClass = HaveClass; - } - - // reset function - public void Reset_Lnum(int Lnum) { - this.Lnum = Lnum; - } - - public void Reset_Rnum(int Rnum) { - this.Rnum = Rnum; - } - - public void Reset_ParentNode(Node ParentNode) { - this.ParentNode = ParentNode; - } - - public void Reset_LNode(Node LNode) { - this.LNode = LNode; - } - - public void Reset_RNode(Node RNode) { - this.RNode = RNode; - } - - public void Reset_index(int index) { - this.index = index; - } - - public void Reset_HaveClass(Boolean HaveClass) { - this.HaveClass = HaveClass; - } - - // get function - public int Get_Lnum() { - return this.Lnum; - } - - public int Get_Rnum() { - return this.Rnum; - } - - public Node Get_ParentNode() { - return this.ParentNode; - } - - public Node Get_LNode() { - return this.LNode; - } - - public Node Get_RNode() { - return this.RNode; - } - - public int Get_index() { - return this.index; - } - - public Boolean Get_HaveClass() { - return this.HaveClass; - } -} - -public class Pre_Cluster_process { - private String inputFile = new String(); - private int rdNum = 0; - private static int cluster_num; - - public Pre_Cluster_process(String inputFile, String reduceNumber) { - // TODO Auto-generated constructor stub - this.inputFile = inputFile; - this.rdNum = Integer.parseInt(reduceNumber); - } - - public static String ClusterFromMatrix(double[][] distance, String output, ArrayList cluster_list, int cluster_list_size, int k) { - try { - Comparator comparator = (obj1, obj2) -> { // for the sort - Point point = obj2; - if (point.meature > point.meature) { - return 1; - } else if (point.meature < point.meature) { - return -1; - } else { - return 0; - } - }; - ArrayList distance_list = new ArrayList<>(); - Set Already_set = new HashSet(); // this set save the whole index of data - for (int i = 0; i < cluster_list_size; i++) { // translate the matrix to the list - for (int j = i + 1; j < cluster_list_size; j++) { - Point point = new Point(distance[i][j], i, j); - distance_list.add(point); - } - } - Collections.sort(distance_list, comparator); // sort the list - Set Root_set = new HashSet(); - Set Sum_set = new HashSet(); - ArrayList LeaveNode_list = new ArrayList();//用于保存叶子节点的数组 - for (int i = 0; i < cluster_list_size; i++) { - LeaveNode_list.add(new Node("leave", 0, 0, null, null, null, i, null)); - } - int Index = 0; - while (Already_set.size() != cluster_list_size) { - //i和j都未被处理过 - if (!Already_set.contains(distance_list.get(Index).i) && !Already_set.contains(distance_list.get(Index).j)) { - Set new_set = new HashSet();// 申请新的集合用于存放i,j - new_set.add(distance_list.get(Index).i); //新集合添加i ,j - new_set.add(distance_list.get(Index).j); - Sum_set.add(new_set); //全总集合添加新集合 - Already_set.add(distance_list.get(Index).i); - Already_set.add(distance_list.get(Index).j); - Node InternalNode = new Node("Internal", 1, 1, null, LeaveNode_list.get(distance_list.get(Index).i), - LeaveNode_list.get(distance_list.get(Index).j), -1, null); //申请一个内部节点,左右节点指向叶子节点,Parent节点为null - LeaveNode_list.get(distance_list.get(Index).i).Reset("leave", 0, 0, InternalNode, - null, null, distance_list.get(Index).i, true); //修改叶子节点的信息 - LeaveNode_list.get(distance_list.get(Index).j).Reset("leave", 0, 0, InternalNode, - null, null, distance_list.get(Index).j, true); - Root_set.add(InternalNode); //将当前的根节点添加到根节点集合 - }// end if //i和j有一个被处理过 - else if (Already_set.contains(distance_list.get(Index).i) && !Already_set.contains(distance_list.get(Index).j)) { - for (Set seti : Sum_set) { - if (seti.contains(distance_list.get(Index).i)) { - seti.add(distance_list.get(Index).j); - Already_set.add(distance_list.get(Index).j); - break; - } - }// end for - Node CurrentNode = LeaveNode_list.get(distance_list.get(Index).i); // current node - while (CurrentNode.Get_ParentNode() != null) { - CurrentNode = CurrentNode.Get_ParentNode(); //回溯到i节点的根节点 - } - // now the CurrentNode is the root - Node InternalNode = new Node("Internal", CurrentNode.Get_Lnum() + CurrentNode.Get_Rnum(), 1, null, CurrentNode, - LeaveNode_list.get(distance_list.get(Index).j), -1, null); //申请一个内部节点, - LeaveNode_list.get(distance_list.get(Index).j).Reset("leave", 0, 0, InternalNode, - null, null, distance_list.get(Index).j, true); //设置右子节点 - CurrentNode.Reset_ParentNode(InternalNode); //修改左节点的父节点 - Root_set.add(InternalNode); //添加新的根节点 - Root_set.remove(CurrentNode); //移除旧的根节点 - }// end if //i和j有一个被处理过 - else if (!Already_set.contains(distance_list.get(Index).i) && Already_set.contains(distance_list.get(Index).j)) { - for (Set setj : Sum_set) { - if (setj.contains(distance_list.get(Index).j)) { - setj.add(distance_list.get(Index).i); - Already_set.add(distance_list.get(Index).i); - break; - } - }//end for - Node CurrentNode = LeaveNode_list.get(distance_list.get(Index).j); // current node - while (CurrentNode.Get_ParentNode() != null) { - CurrentNode = CurrentNode.Get_ParentNode(); //回溯到i节点的根节点 - } - // now the CurrentNode is the root - Node InternalNode = new Node("Internal", CurrentNode.Get_Lnum() + CurrentNode.Get_Rnum(), 1, null, CurrentNode, - LeaveNode_list.get(distance_list.get(Index).i), -1, null); //申请一个内部节点, - LeaveNode_list.get(distance_list.get(Index).i).Reset("leave", 0, 0, InternalNode, - null, null, distance_list.get(Index).i, true); //设置右子节点 - CurrentNode.Reset_ParentNode(InternalNode); //修改左节点的父节点 - Root_set.add(InternalNode); //添加新的根节点 - Root_set.remove(CurrentNode); //移除旧的根节点 - }// end if - else { // in this part the Already_set no add element - Set seti = new HashSet(); - Set setj = new HashSet(); - for (Set set : Sum_set) { - if (set.contains(distance_list.get(Index).i)) { - seti = set; - break; - } - } - for (Set set : Sum_set) { - if (set.contains(distance_list.get(Index).j)) { - setj = set; - break; - } - } - if (seti.equals(setj)) { // if i and j in the same set - Index++; - continue; - } - Set combine_set = new HashSet(); // combine the two set - for (Integer item : seti) { // get the set's elements - combine_set.add(item); - } - for (Integer item : setj) { - combine_set.add(item); - } - - Set tmp_set = new HashSet();////为了确保能够删除seti和setj - tmp_set.add(combine_set); - for (Set set : Sum_set) { - if (set.equals(seti)) { - continue; - } - if (set.equals(setj)) { - continue; - } - tmp_set.add(set); - } - Sum_set = null; - Sum_set = tmp_set; - - Node CurrentNodei = LeaveNode_list.get(distance_list.get(Index).i); // current node i - Node CurrentNodej = LeaveNode_list.get(distance_list.get(Index).j); // current node i - while (CurrentNodei.Get_ParentNode() != null) { - CurrentNodei = CurrentNodei.Get_ParentNode(); //回溯到i节点的根节点 - } - while (CurrentNodej.Get_ParentNode() != null) { - CurrentNodej = CurrentNodej.Get_ParentNode(); //回溯到i节点的根节点 - } - Node InternalNode = new Node("Internal", CurrentNodei.Get_Lnum() + CurrentNodei.Get_Rnum(), - CurrentNodej.Get_Lnum() + CurrentNodej.Get_Rnum(), null, CurrentNodei, - CurrentNodej, -1, null); //申请一个内部节点, - CurrentNodei.Reset_ParentNode(InternalNode); //修改 父节点 - CurrentNodej.Reset_ParentNode(InternalNode); //修改 父节点 - Root_set.add(InternalNode); //添加新的根节点 - Root_set.remove(CurrentNodei); //移除旧的根节点 - Root_set.remove(CurrentNodej); //移除旧的根节点 - } // end else - Index++; - } // end while - // now the Sum_set contains the class of the data - - /* - * This should have the on load balance to the sum_set to make the set size==rdNum - * Root_set.size() == Sum_set.size() - */ - if (Sum_set.size() > 3 * k) { - while (Sum_set.size() > 3 * k) { - ArrayList set_list = new ArrayList(); //用于存储集合的列表 - for (Set set : Sum_set) { - set_list.add(set); //向列表中添加元素 - } - Comparator comparator2 = new Comparator() { //比较函数 - public int compare(Set obj1, Set obj2) { // for the sort - Set test1 = (Set) obj1; - Set test2 = (Set) obj2; - if (test1.size() > test2.size()) { - return 1; - } else if (test1.size() < test2.size()) { - return -1; - } else { - return 0; - } - } - }; - Collections.sort(set_list, comparator2);//对集合列表进行排序 - Set tmp = set_list.get(0); - set_list.get(0).addAll(set_list.get(1));//合并最小的两个集合 - Sum_set.remove(tmp);//删除总集合中的最小两个 - Sum_set.remove(set_list.get(1));//并添加新的集合进总集合中 - } - int label = 0; - BufferedWriter bw = new BufferedWriter(new FileWriter(output)); // write the class the the output file - for (Set set : Sum_set) { - for (int item : set) { - bw.write(label + "\t" + cluster_list.get(item)); // output is label \t name \t seq - bw.newLine(); - bw.flush(); - } - label++; - }//end for - cluster_num = Sum_set.size(); - //System.out.println("Sum_set.size()>3k the class number is " + Sum_set.size()); - }// end Sum_set.size()>3*rdNum - else if (Sum_set.size() >= k && Sum_set.size() <= 3 * k) { - int label = 0; - BufferedWriter bw = new BufferedWriter(new FileWriter(output)); // write the class the the output file - for (Set set : Sum_set) { - for (int item : set) { - bw.write(label + "\t" + cluster_list.get(item)); // output is label \t name \t seq - bw.newLine(); - bw.flush(); - } - label++; - }//end for - - //System.out.println("rdNum Root_set = new HashSet(); - int max_size = 0; //记录最大树 - Node max_node = null; - for (Node root : Root_set) {//遍历所有的根节点获取节点数目最多的树 - int node_number = root.Get_Lnum() + root.Get_Rnum(); - if (node_number > max_size) { - max_size = node_number; - max_node = root; - } - }//end for - double LRrate = (double) max_node.Get_Lnum() / (double) max_node.Get_Rnum(); - if (LRrate >= 0.5 && LRrate <= 2) {//左右子分支个数满足拆分条件,直接拆分根节点 - max_node.Get_LNode().Reset_ParentNode(null); - max_node.Get_RNode().Reset_ParentNode(null); - Root_set.remove(max_node); - Root_set.add(max_node.Get_LNode()); - Root_set.add(max_node.Get_RNode()); - } else if (LRrate > 2) { - while (LRrate > 2) { - max_node = max_node.Get_LNode(); //修改节点及其分支数目 - max_node.Reset_Rnum(max_node.Get_ParentNode().Get_Rnum() + max_node.Get_Rnum()); - LRrate = (double) max_node.Get_Lnum() / (double) max_node.Get_Rnum(); - } - max_node.Get_LNode().Reset_ParentNode(null); - max_node.Get_ParentNode().Reset_LNode(max_node.Get_RNode()); - max_node.Get_RNode().Reset_ParentNode(max_node.Get_ParentNode()); - Root_set.add(max_node.Get_LNode());//设置当前节点的左分支为根节点 - while (max_node.Get_ParentNode() != null) { - max_node = max_node.Get_ParentNode();//向根节点回溯 - max_node.Reset_Lnum(max_node.Get_LNode().Get_Lnum() + max_node.Get_LNode().Get_Rnum()); - max_node.Reset_Rnum(max_node.Get_RNode().Get_Lnum() + max_node.Get_RNode().Get_Rnum()); - } - }//end else - else if (LRrate < 0.5) { - while (LRrate < 0.5) { - max_node = max_node.Get_RNode(); - max_node.Reset_Lnum(max_node.Get_ParentNode().Get_Lnum() + max_node.Get_Lnum()); - LRrate = (double) max_node.Get_Lnum() / (double) max_node.Get_Rnum(); - } - max_node.Get_RNode().Reset_ParentNode(null); - max_node.Get_ParentNode().Reset_RNode(max_node.Get_LNode()); - max_node.Get_LNode().Reset_ParentNode(max_node.Get_ParentNode()); - Root_set.add(max_node.Get_RNode()); - while (max_node.Get_ParentNode() != null) { - max_node = max_node.Get_ParentNode(); - max_node.Reset_Lnum(max_node.Get_LNode().Get_Lnum() + max_node.Get_LNode().Get_Rnum()); - max_node.Reset_Rnum(max_node.Get_RNode().Get_Lnum() + max_node.Get_RNode().Get_Rnum()); - } - } //end else - }// end while - // now the Root_set.size > rdNum 遍历每棵子树,写出聚类信息 - int label = 0; - BufferedWriter bw = new BufferedWriter(new FileWriter(output)); - for (Node root : Root_set) { - Queue queue = new LinkedList(); //用队列实现层序遍历 - queue.add(root); - Node current_node; - while (!queue.isEmpty()) { - current_node = queue.poll(); - if (current_node.Get_LNode().Get_index() != -1) { //不等于-1为叶子节点 - bw.write(label + "\t" + cluster_list.get(current_node.Get_LNode().Get_index())); // output is label \t name \t seq - bw.newLine(); - bw.flush(); - } else { - queue.add(current_node.Get_LNode()); - }// end if - if (current_node.Get_RNode().Get_index() != -1) { //不等于-1为叶子节点 - bw.write(label + "\t" + cluster_list.get(current_node.Get_RNode().Get_index())); // output is label \t name \t seq - bw.newLine(); - bw.flush(); - } else { - queue.add(current_node.Get_RNode()); - }//end if - }// end while - label++; - } - //System.out.println("Sum_set.size() sequences, int lineNumber, double[][] distance, double[] A) {//这个函数用来计算距离矩阵 - int i, j; - double p; - double temp; - double distance_temp = 0;//这个在计算方差和均值的时候有用 - - for (i = 0; i < lineNumber; i++) { - for (j = 0; j < lineNumber; j++) { - - if (i < j) { - p = JukeCantor(sequences.get(i).split("\t")[1], sequences.get(j).split("\t")[1]); - p = 1.0 - 0.75 * p; - temp = Math.log(p); - distance_temp = -0.75 * temp; //根据公式计算距离 - distance[i][j] = distance_temp; - } else if (i == j) { - distance[i][j] = 0;//对角线上为0 - } else { - distance[i][j] = distance[j][i]; - } - //System.out.print(distance_temp+"\t"); //这里打印出距离矩阵可以在屏幕上显示 - A[i] += distance[i][j];//计算A数组 - } - } - } - - public double JukeCantor(String gene1, String gene2) { - int rate = 0; - int i; - double result = 0.0; - int length = gene1.length(); - if (gene1.length() > gene2.length()) { - length = gene2.length(); - } - for (i = 0; i < length; i++) { - if (gene1.charAt(i) != gene2.charAt(i)) { - rate++; - } - } - result = (double) rate / (double) gene1.length(); - return result; - } - - public static void AmendTheDistance(double[][] distance, double[] A, int lineNumber) {//在进化树构建的时候用来修正距离 - int i, j; - for (i = 0; i < lineNumber; i++) { - for (j = i + 1; j < lineNumber; j++) { - distance[i][j] = distance[i][j] - (A[i] + A[j]) / (lineNumber - 2);//修正的时候根据公式要用到A 和distance - distance[j][i] = distance[i][j]; - } - } - } - - - public void Get_Cluster(String output, int line_number) throws IOException { - int select_number = 0; - if (line_number < 100) { // if the totle number is bigger than 100000 , we random select 10000 sequences - select_number = line_number / 2; - } else if (line_number < 10000) { // if the totle number is bigger than 100000 , we random select 10000 sequences - select_number = line_number / 10; - } else if (10000 <= line_number && line_number <= 100000) { // if the number is less than 100000 , we random select 1 of the 10 number sequences - select_number = 1000; - } else if (line_number > 100000) { - select_number = 3000; - } - - ArrayList cluster_list = new ArrayList<>(); //用于保存样本序列 - ArrayList random_list = new ArrayList<>(); // the index of the samples - Set random_set = new HashSet(); - Random random = new Random(); - int count = 0; - while (count < select_number) { - int ran_num = random.nextInt(line_number); - if (!random_set.contains(ran_num)) { - count++; - random_set.add(ran_num); - random_list.add(ran_num); - } - } - Collections.sort(random_list); - - // get the random data to cluster - BufferedReader br = new BufferedReader(new FileReader(inputFile)); // the input data is key value format - count = 0; - int index_random_list = 0; - String current_line; - while (br.ready() && index_random_list < random_list.size()) { - current_line = br.readLine(); - if (count == random_list.get(index_random_list)) { - cluster_list.add(current_line); // the current_line is key value format - index_random_list++; - } - count++; - } - br.close(); - - // the cluster_list is the key value format - int cluster_list_size = cluster_list.size(); - double[][] distance = new double[cluster_list_size][cluster_list_size]; -// double[] A = new double[cluster_list_size]; -// CountTheDistance(cluster_list, cluster_list_size, distance, A);//计算距离矩阵以及A -// AmendTheDistance(distance, A, cluster_list_size);//对距离矩阵进行修正 - String flag; - flag = ClusterFromMatrix(distance, output, cluster_list, cluster_list_size, rdNum); -// do { -// } while (flag.equals(null)); - } -} diff --git a/maven-src/target/classes/java/tree/SparkTree.java b/maven-src/target/classes/java/tree/SparkTree.java deleted file mode 100644 index 21a5c02..0000000 --- a/maven-src/target/classes/java/tree/SparkTree.java +++ /dev/null @@ -1,170 +0,0 @@ -package tree; - -import org.apache.spark.SparkConf; -import org.apache.spark.api.java.JavaPairRDD; -import org.apache.spark.api.java.JavaSparkContext; -import org.apache.spark.api.java.function.Function; -import org.apache.spark.api.java.function.PairFunction; -import scala.Tuple2; -import utils.IOUtils; -import utils.HDFSUtils; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -public class SparkTree { - public static void main(String[] args) throws Exception { - String filename = "/home/shixiang/out.fasta"; -// filename = "/home/shixiang/genome-out2.fasta"; - String outputFile = "/home/shixiang/tree.tre"; - - SparkConf conf = new SparkConf().setAppName("SparkMSATree"); - conf.setMaster("local[16]"); - conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer"); - conf.set("spark.kryoserializer.buffer.max", "2000m"); - conf.registerKryoClasses(new Class[]{SparkTree.class}); - JavaSparkContext jsc = new JavaSparkContext(conf); - new SparkTree().GenerateTree(jsc, filename, outputFile); - jsc.stop(); - } - - public void GenerateTree(JavaSparkContext jsc, String inputFile, String outputFile) throws Exception { - - String localPath = ""; - if (inputFile.contains("/")) { - localPath = inputFile.substring(0, inputFile.lastIndexOf("/")+1); - inputFile = inputFile.substring(inputFile.lastIndexOf("/")+1); - } - - HDFSUtils utils = new HDFSUtils(); - utils.clear_local_path(new File(localPath + "HPTree_OutPut")); - - System.out.println(">> (Spark mode for tree) loading data ..."); - long startTime = System.currentTimeMillis(); - IOUtils formatUtils = new IOUtils(); - formatUtils.formatKVFasta(localPath + inputFile, localPath + "inputKV"); - int allNum = formatUtils.getAllNum(); - System.out.println("total number: " + allNum); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - System.out.println(">>clustering process ..."); - String reduce_number = "2"; - Pre_Cluster_process cluster = new Pre_Cluster_process(localPath + "inputKV", reduce_number); - cluster.Get_Cluster(localPath + "single_cluster_output", allNum); - - //////////////////////////////////////////////////////////////////////////////////////// - ClusterProcess clusterProcess = new ClusterProcess(); - clusterProcess.preProcess(localPath + "single_cluster_output"); - new File(localPath + "single_cluster_output").delete(); - //clusterProcess.kvProcess(local_path + "inputKV", local_path + "Cluster_OutPut"); - - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(localPath + "Cluster_OutPut")); - jsc.textFile("file://"+localPath + "inputKV").map( - (Function) f -> { - String value = f.trim(); - String[] value_temp = value.split("\t"); - String name = value_temp[0]; - String sequence = value_temp[1]; - String label = ""; - double min_distance = 100000; - for (Set set : ClusterProcess.sum_set) { - Iterator iter = set.iterator(); - ClusterProcess.cluster_data data = (ClusterProcess.cluster_data) iter.next(); - double p = ClusterProcess.JukeCantor(sequence, data.sequence); - p = 1.0 - 0.75 * p; - double distance = (double) (int) (-0.75 * Math.log(p) * 1000) / 1000; - if (distance < min_distance) { - min_distance = distance; - label = data.label; - } - } - return label + "\t" + name + "\t" + sequence+"\n"; - }).collect().forEach(l -> { - try { - bufferedWriter.write(l); - } catch (IOException e) { - e.printStackTrace(); - } - }); - bufferedWriter.close(); - new File(localPath + "inputKV").delete(); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - /*local_path: Cluster_OutPut -> OnBalance_OutPut*/ - int cluster_number = 3; - OnBalance onbalance = new OnBalance(localPath + "Cluster_OutPut"); - onbalance.Balance(cluster_number, localPath); - new File(localPath + "Cluster_OutPut").delete(); - - System.out.println(">>construct phylogenetic tree ..."); - //////////////////////////////////////////////////////////////////////////////////////// - new File(localPath + "HPTree_OutPut").mkdir(); - JavaPairRDD balancePairRDD = jsc.textFile("file://"+localPath + "OnBalance_OutPut").mapToPair( - (PairFunction) s -> { - String [] list = s.split("\t"); - return new Tuple2(list[1], list[2]); - }); - List balanceKey = balancePairRDD.keys().collect(); - List balanceVal = balancePairRDD.values().collect(); - - int loop; - if (allNum < 100) loop = 8; - else loop = 32; - int loopNum = allNum/loop; - int position = 0; - ExecutorService pool = Executors.newFixedThreadPool(loop); - for (int i = 0; i < loop; i++) { - int position2 = position+loopNum; - if (i == loop-1) position2 = allNum; - List key = balanceKey.subList(position, position2); - List val = balanceVal.subList(position, position2); - GetSubTreeThread getSubTreeThread = new GetSubTreeThread(key, val, localPath + "HPTree_OutPut/"+i+".txt"); - pool.execute(new Thread(getSubTreeThread)); - position = position2; - } - pool.shutdown(); - while (!pool.isTerminated()); - new File(localPath + "OnBalance_OutPut").delete(); - System.out.println((System.currentTimeMillis() - startTime) + "ms"); - - System.out.println(">>merge and save phylogenetic tree ..."); - NeighbourJoining_Summary nj_summary = new NeighbourJoining_Summary(localPath+"HPTree_OutPut", outputFile); - nj_summary.Merge(); - nj_summary.Summary(); - - utils.clear_local_path(new File(localPath + "HPTree_OutPut")); - System.out.println(">>success! time cost: " + (System.currentTimeMillis() - startTime) + "ms"); - } - - public class GetSubTreeThread implements Runnable { - private List Key; - private List Val; - private String outputFile; - GetSubTreeThread(List Key, List Val, String outputFile) { - this.Key = Key; - this.Val = Val; - this.outputFile = outputFile; - } - @Override - public void run() { - try { - BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(outputFile)); - NeighbourJoining nj = new NeighbourJoining();//开启进化树构建算法 - nj.construct(Key, Val); - String sub_tree = nj.getSubTree(); - String present_seq = nj.getPresentNode(); - bufferedWriter.write(present_seq+"\t"+sub_tree); - bufferedWriter.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } -} diff --git a/maven-src/target/classes/java/utils/HDFSUtils.java b/maven-src/target/classes/java/utils/HDFSUtils.java deleted file mode 100644 index 460fed1..0000000 --- a/maven-src/target/classes/java/utils/HDFSUtils.java +++ /dev/null @@ -1,71 +0,0 @@ -package utils; - -import java.io.File; -import java.io.IOException; -import java.net.URI; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; - -public class HDFSUtils { - public void local_to_dfs(String local_file, String dfs_file) { - try { - Configuration conf = new Configuration(); - FileSystem fs = FileSystem.get(URI.create(dfs_file), conf); - Path src = new Path(local_file); - Path dst = new Path(dfs_file); - fs.copyFromLocalFile(src, dst); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public void dfs_to_local(String dfs_file, String local_file) { - try { - Configuration conf = new Configuration(); - FileSystem fs = FileSystem.get(URI.create(dfs_file), conf); - Path src = new Path(local_file); - Path dst = new Path(dfs_file); - fs.copyToLocalFile(true, dst, src); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public void clear_dfs_path(String dfs_path) { - try { - Configuration conf = new Configuration(); - FileSystem fs = FileSystem.get(URI.create(dfs_path), conf); - fs.delete(new Path(dfs_path), true); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public boolean clear_local_path(File local_path) { - if (local_path.isFile() && local_path.exists()) { - local_path.delete(); - return true; - } - if (local_path.isDirectory()) { - String[] children = local_path.list(); - for (String child : children) { - boolean success = clear_local_path(new File(local_path, child)); - if (!success) { - return false; - } - } - } - return local_path.delete(); - } - - public static String check_input_path(String path) { - if (!path.contains("/")) { - System.out.println("Error: Please set full input file path, such as '/home/user/input.txt'"); - System.exit(0); - } - return path.substring(0, path.lastIndexOf("/")); - } - -} diff --git a/maven-src/target/classes/java/utils/IOUtils.java b/maven-src/target/classes/java/utils/IOUtils.java deleted file mode 100644 index f0ab63b..0000000 --- a/maven-src/target/classes/java/utils/IOUtils.java +++ /dev/null @@ -1,124 +0,0 @@ -package utils; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.FileReader; -import java.io.FileWriter; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -public class IOUtils { - private List s_key = new ArrayList<>(); - private List s_val = new ArrayList<>(); - private int maxLength; - private int allNum; - - public int getMaxLength() { - return maxLength; - } - - public int getAllNum() { - return allNum; - } - - public List getS_key() { - return s_key; - } - - public List getS_val() { - return s_val; - } - - public void readFasta(String input, boolean isDNA) { - try { - BufferedReader brReader = new BufferedReader(new FileReader(input)); - StringBuilder stringBuilder = new StringBuilder(); - int max = 0; - int all = 0; - while(brReader.ready()) { - String line = brReader.readLine(); - if (line.equals("")) continue; - line = line.trim(); - if (line.charAt(0) == '>') { - s_key.add(line); - all++; - if (stringBuilder.length() != 0) { - String sbString; - if (isDNA) sbString = formatDNA(stringBuilder.toString()); - else sbString = stringBuilder.toString(); - int len = sbString.length(); - if (max < len) max = len; - s_val.add(sbString); - stringBuilder.setLength(0); - } - } else { - stringBuilder.append(line); - } - } - if (stringBuilder.length() != 0) { - String sbString; - if (isDNA) sbString = formatDNA(stringBuilder.toString()); - else sbString = stringBuilder.toString(); - int len = sbString.length(); - if (max < len) max = len; - s_val.add(sbString); - } - maxLength = max; - allNum = all; - brReader.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public List deleteSimilarityOutput(List in_key, List in_val, - List out_key, List out_val) { - List deleteIndex = new ArrayList<>(); - for (int i=0; i