Skip to content
Snippets Groups Projects
Commit 1365179c authored by Robin van Esch's avatar Robin van Esch
Browse files

Renamed ProteomeLayer.Intersection (from intersection) to follow Java class naming conventions

parent 1097ca86
Branches
Tags
2 merge requests!106Some bug fixes and final changes for release in 4.0.0,!105Draft: Bugfixes and final changes for 4.0.0 release
...@@ -223,10 +223,10 @@ Relaxation ...@@ -223,10 +223,10 @@ Relaxation
"""""""""" """"""""""
The ``relaxation`` parameter is a combination of four sub-parameters: The ``relaxation`` parameter is a combination of four sub-parameters:
``intersection rate``, ``similarity threshold``, ``mcl inflation`` ``intersection rate``, ``similarity threshold``, ``mcl inflation``
and ``contrast``. The values for these parameter for each relaxation and ``contrast``. The values for these parameters for each relaxation
setting can be seen in the table below. We recommend using the setting can be seen in the table below. We strongly recommend using the
``--relaxation`` option if there is any uncertainty about its ``--relaxation`` option to control the grouping, but advanced users still
sub-parameters. have the option to control the individual sub-parameters.
.. csv-table:: .. csv-table::
:file: ../tables/relaxation.csv :file: ../tables/relaxation.csv
...@@ -286,8 +286,8 @@ Example commands ...@@ -286,8 +286,8 @@ Example commands
.. code:: bash .. code:: bash
$ pantools group tomato_DB
$ pantools group -t=12 -r=4 tomato_DB $ pantools group -t=12 -r=4 tomato_DB
$ pantools group --intersection-rate=0.05 --similarity-threshold=65 --mcl-inflation=7.2 --contrast=5 tomato_DB
Output Output
"""""" """"""
......
...@@ -75,8 +75,8 @@ public class ProteomeLayer { ...@@ -75,8 +75,8 @@ public class ProteomeLayer {
private long[][] kmers_proteins_list; private long[][] kmers_proteins_list;
private int[] kmer_frequencies; private int[] kmer_frequencies;
private BlockingQueue<Node> proteins; private BlockingQueue<Node> proteins;
private BlockingQueue<intersection> intersections; private BlockingQueue<nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection> intersections;
private BlockingQueue<intersection> similarities; private BlockingQueue<nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection> similarities;
private BlockingQueue<LinkedList> components; private BlockingQueue<LinkedList> components;
private BlockingQueue<LinkedList> homology_groups_list; private BlockingQueue<LinkedList> homology_groups_list;
private Node pangenome_node; private Node pangenome_node;
...@@ -97,7 +97,7 @@ public class ProteomeLayer { ...@@ -97,7 +97,7 @@ public class ProteomeLayer {
/** /**
* Implements the class for intersecting pair of proteins. * Implements the class for intersecting pair of proteins.
*/ */
public class intersection { public class Intersection {
public Node protein1; public Node protein1;
public Node protein2; public Node protein2;
public double similarity; public double similarity;
...@@ -108,7 +108,7 @@ public class ProteomeLayer { ...@@ -108,7 +108,7 @@ public class ProteomeLayer {
* @param p2 The second protein. * @param p2 The second protein.
* @param s The normalized similarity score of two proteins * @param s The normalized similarity score of two proteins
*/ */
public intersection(Node p1, Node p2, double s) { public Intersection(Node p1, Node p2, double s) {
protein1 = p1; protein1 = p1;
protein2 = p2; protein2 = p2;
similarity = s; similarity = s;
...@@ -378,7 +378,7 @@ public class ProteomeLayer { ...@@ -378,7 +378,7 @@ public class ProteomeLayer {
crossing_protein = get_protein_sequence(crossing_protein_node); crossing_protein = get_protein_sequence(crossing_protein_node);
shorter_len = Math.min(protein_length, crossing_protein.length()); shorter_len = Math.min(protein_length, crossing_protein.length());
if (counter >= frac * (shorter_len - PEPTIDE_SIZE + 1)) { if (counter >= frac * (shorter_len - PEPTIDE_SIZE + 1)) {
intersections.put(new intersection(protein_node, crossing_protein_node, 0)); intersections.put(new nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection(protein_node, crossing_protein_node, 0));
++num_ins; ++num_ins;
} }
} }
...@@ -393,7 +393,7 @@ public class ProteomeLayer { ...@@ -393,7 +393,7 @@ public class ProteomeLayer {
crossing_protein = get_protein_sequence(crossing_protein_node); crossing_protein = get_protein_sequence(crossing_protein_node);
shorter_len = Math.min(protein_length, crossing_protein.length()); shorter_len = Math.min(protein_length, crossing_protein.length());
if (counter >= frac * (shorter_len - PEPTIDE_SIZE + 1)) { if (counter >= frac * (shorter_len - PEPTIDE_SIZE + 1)) {
intersections.put(new intersection(protein_node, crossing_protein_node,0)); intersections.put(new nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection(protein_node, crossing_protein_node,0));
++num_ins; ++num_ins;
} }
} }
...@@ -408,7 +408,7 @@ public class ProteomeLayer { ...@@ -408,7 +408,7 @@ public class ProteomeLayer {
System.out.print("0 ......................................... 100\n "); System.out.print("0 ......................................... 100\n ");
// Signify the end of intersections queue. // Signify the end of intersections queue.
for (i = 0; i < THREADS; ++i) for (i = 0; i < THREADS; ++i)
intersections.put(new intersection(null, null,-1));// end of queue intersections.put(new nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection(null, null,-1));// end of queue
} catch(InterruptedException e) { } catch(InterruptedException e) {
System.err.println(e.getMessage()); System.err.println(e.getMessage());
} }
...@@ -454,7 +454,7 @@ public class ProteomeLayer { ...@@ -454,7 +454,7 @@ public class ProteomeLayer {
public void run() { public void run() {
Node protein_node1, protein_node2; Node protein_node1, protein_node2;
String protein1, protein2; String protein1, protein2;
intersection ints; nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection ints;
int num_ints = 0; int num_ints = 0;
boolean all_intersections_found = false; boolean all_intersections_found = false;
int trsc = 0; int trsc = 0;
...@@ -505,7 +505,7 @@ public class ProteomeLayer { ...@@ -505,7 +505,7 @@ public class ProteomeLayer {
// Signify the end of the similarities queue. // Signify the end of the similarities queue.
//similarities.put(new intersection(null, null,0)); //similarities.put(new intersection(null, null,0));
Node pangenome_node = GRAPH_DB.getNodeById(0); Node pangenome_node = GRAPH_DB.getNodeById(0);
similarities.put(new intersection(pangenome_node, null, 0)); similarities.put(new nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection(pangenome_node, null, 0));
tx.success(); tx.success();
} finally { } finally {
tx.close(); tx.close();
...@@ -567,7 +567,7 @@ public class ProteomeLayer { ...@@ -567,7 +567,7 @@ public class ProteomeLayer {
@Override @Override
public void run() { public void run() {
intersection ints; nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection ints;
int finished_thread_counter = 0; int finished_thread_counter = 0;
try{ try{
ints = similarities.take(); ints = similarities.take();
...@@ -577,7 +577,7 @@ public class ProteomeLayer { ...@@ -577,7 +577,7 @@ public class ProteomeLayer {
if (ints.protein2 == null) { if (ints.protein2 == null) {
finished_thread_counter ++; finished_thread_counter ++;
if (finished_thread_counter == THREADS-2) { if (finished_thread_counter == THREADS-2) {
similarities.put(new intersection(null, null, 0)); similarities.put(new nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection(null, null, 0));
} }
ints = similarities.take(); ints = similarities.take();
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment