Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PanTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinformatics
PanTools
Commits
1365179c
Commit
1365179c
authored
2 years ago
by
Robin van Esch
Browse files
Options
Downloads
Patches
Plain Diff
Renamed ProteomeLayer.Intersection (from intersection) to follow Java class naming conventions
parent
1097ca86
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!106
Some bug fixes and final changes for release in 4.0.0
,
!105
Draft: Bugfixes and final changes for 4.0.0 release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/source/user_guide/construct.rst
+5
-5
5 additions, 5 deletions
docs/source/user_guide/construct.rst
src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java
+11
-11
11 additions, 11 deletions
...ain/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java
with
16 additions
and
16 deletions
docs/source/user_guide/construct.rst
+
5
−
5
View file @
1365179c
...
@@ -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 parameter
s
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
""""""
""""""
...
...
This diff is collapsed.
Click to expand it.
src/main/java/nl/wur/bif/pantools/pangenome/ProteomeLayer.java
+
11
−
11
View file @
1365179c
...
@@ -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
<
i
ntersection
>
intersections
;
private
BlockingQueue
<
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
>
intersections
;
private
BlockingQueue
<
i
ntersection
>
similarities
;
private
BlockingQueue
<
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
>
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
i
ntersection
{
public
class
I
ntersection
{
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
i
ntersection
(
Node
p1
,
Node
p2
,
double
s
)
{
public
I
ntersection
(
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
i
ntersection
(
protein_node
,
crossing_protein_node
,
0
));
intersections
.
put
(
new
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
(
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
i
ntersection
(
protein_node
,
crossing_protein_node
,
0
));
intersections
.
put
(
new
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
(
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
i
ntersection
(
null
,
null
,-
1
));
// end of queue
intersections
.
put
(
new
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
(
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
;
i
ntersection
ints
;
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
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
i
ntersection
(
pangenome_node
,
null
,
0
));
similarities
.
put
(
new
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
(
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
()
{
i
ntersection
ints
;
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
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
i
ntersection
(
null
,
null
,
0
));
similarities
.
put
(
new
nl
.
wur
.
bif
.
pantools
.
pangenome
.
ProteomeLayer
.
I
ntersection
(
null
,
null
,
0
));
}
}
ints
=
similarities
.
take
();
ints
=
similarities
.
take
();
continue
;
continue
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment