diff --git a/docs/source/user_guide/construct.rst b/docs/source/user_guide/construct.rst index 85fd2a28f3fb14fc6306a1103195fd4d55c36eeb..ab02a4aaab1a2438895e5b7874f7a6691a8abedf 100644 --- a/docs/source/user_guide/construct.rst +++ b/docs/source/user_guide/construct.rst @@ -223,10 +223,10 @@ Relaxation """""""""" The ``relaxation`` parameter is a combination of four sub-parameters: ``intersection rate``, ``similarity threshold``, ``mcl inflation`` -and ``contrast``. The values for these parameter for each relaxation -setting can be seen in the table below. We recommend using the -``--relaxation`` option if there is any uncertainty about its -sub-parameters. +and ``contrast``. The values for these parameters for each relaxation +setting can be seen in the table below. We strongly recommend using the +``--relaxation`` option to control the grouping, but advanced users still +have the option to control the individual sub-parameters. .. csv-table:: :file: ../tables/relaxation.csv @@ -286,8 +286,8 @@ Example commands .. code:: bash - $ pantools group 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 """""" diff --git a/src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java b/src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java index 80ec886ad524b0464da2b1528844b51808800557..5668473d4d35a8e14a8874d66178b065778e3ec0 100644 --- a/src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java +++ b/src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java @@ -75,8 +75,8 @@ public class ProteomeLayer { private long[][] kmers_proteins_list; private int[] kmer_frequencies; private BlockingQueue<Node> proteins; - private BlockingQueue<intersection> intersections; - private BlockingQueue<intersection> similarities; + private BlockingQueue<nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection> intersections; + private BlockingQueue<nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection> similarities; private BlockingQueue<LinkedList> components; private BlockingQueue<LinkedList> homology_groups_list; private Node pangenome_node; @@ -97,7 +97,7 @@ public class ProteomeLayer { /** * Implements the class for intersecting pair of proteins. */ - public class intersection { + public class Intersection { public Node protein1; public Node protein2; public double similarity; @@ -108,7 +108,7 @@ public class ProteomeLayer { * @param p2 The second protein. * @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; protein2 = p2; similarity = s; @@ -378,7 +378,7 @@ public class ProteomeLayer { crossing_protein = get_protein_sequence(crossing_protein_node); shorter_len = Math.min(protein_length, crossing_protein.length()); 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; } } @@ -393,7 +393,7 @@ public class ProteomeLayer { crossing_protein = get_protein_sequence(crossing_protein_node); shorter_len = Math.min(protein_length, crossing_protein.length()); 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; } } @@ -408,7 +408,7 @@ public class ProteomeLayer { System.out.print("0 ......................................... 100\n "); // Signify the end of intersections queue. 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) { System.err.println(e.getMessage()); } @@ -454,7 +454,7 @@ public class ProteomeLayer { public void run() { Node protein_node1, protein_node2; String protein1, protein2; - intersection ints; + nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection ints; int num_ints = 0; boolean all_intersections_found = false; int trsc = 0; @@ -505,7 +505,7 @@ public class ProteomeLayer { // Signify the end of the similarities queue. //similarities.put(new intersection(null, null,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(); } finally { tx.close(); @@ -567,7 +567,7 @@ public class ProteomeLayer { @Override public void run() { - intersection ints; + nl.wur.bif.pantools.pangenome.ProteomeLayer.Intersection ints; int finished_thread_counter = 0; try{ ints = similarities.take(); @@ -577,7 +577,7 @@ public class ProteomeLayer { if (ints.protein2 == null) { finished_thread_counter ++; 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(); continue;