Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ORG.Annotate
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Annotate
Commits
574aace9
Commit
574aace9
authored
Nov 14, 2015
by
Alain Viari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed need of R igraph from chlorodb/subdb
parent
7017655a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
66 deletions
+81
-66
TODO
TODO
+5
-0
detectors/cds/tools/chlorodb/README.txt
detectors/cds/tools/chlorodb/README.txt
+9
-11
detectors/cds/tools/chlorodb/subdb/go_subdb.sh
detectors/cds/tools/chlorodb/subdb/go_subdb.sh
+3
-7
detectors/cds/tools/chlorodb/subdb/lib/db.cc.awk
detectors/cds/tools/chlorodb/subdb/lib/db.cc.awk
+31
-0
detectors/cds/tools/chlorodb/subdb/lib/db.cc.r
detectors/cds/tools/chlorodb/subdb/lib/db.cc.r
+0
-18
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.awk
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.awk
+33
-0
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.r
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.r
+0
-19
detectors/cds/tools/chlorodb/subdb/lib/db.getlen.awk
detectors/cds/tools/chlorodb/subdb/lib/db.getlen.awk
+0
-10
detectors/cds/tools/lib/install.rpackages.r
detectors/cds/tools/lib/install.rpackages.r
+0
-1
No files found.
TODO
View file @
574aace9
...
...
@@ -18,3 +18,8 @@ o parameters in go_subdb.sh
o models in DB_DIR
o check R package igraph installation
o replace R igraph for cc
detectors/cds/tools/chlorodb/README.txt
View file @
574aace9
...
...
@@ -23,17 +23,15 @@ then (after checking)
# notes
#
this requires an installed R > 3.0.1
calculation of models currently requires R
(without any specific package) this will be
replaced in the future...
with the following packages
in addition, optional graphics output (plot.models.r)
requires the following graphic packages :
igraph # <- mandatory
grid
gridExtra
vcd
plotrix
grid # <- the following are not needed
gridExtra # by scripts, but just to
vcd # produce graphics for models
plotrix # by lib/plot.models.r
you can check and install them by running :
lib/install.rpackages.r
detectors/cds/tools/chlorodb/subdb/go_subdb.sh
View file @
574aace9
...
...
@@ -111,9 +111,7 @@ Notify "select by length"
foreach f
(
D_
$$
/
*
.fst
)
set
nom
=
`
basename
$f
:r
`
$AwkCmd
-f
$LIB_DIR
/db.getlen.awk
$f
>
L_
$$
$LIB_DIR
/db.filter.len.r L_
$$
$Delta
|
\
$AwkCmd
'($NF == "TRUE") {print $2}'
>
M_
$$
$AwkCmd
-v
DELTA
=
$Delta
-f
$LIB_DIR
/db.filter.len.awk
$f
>
M_
$$
$AwkCmd
-v
FILE
=
M_
$$
-f
$LIB_DIR
/db.subdb.awk
$f
>
E_
$$
/
$nom
.fst
Report E_
$$
/
$nom
.fst
"length_filter"
set
n
=
`
egrep
'^>'
E_
$$
/
$nom
.fst |
wc
-l
`
...
...
@@ -144,10 +142,8 @@ foreach f (E_$$/*.fst)
$AwkCmd
-v
COVMIN
=
$Covmin
-v
PMAX
=
$Pmax
-v
IDMIN
=
$Idmin
\
-f
$LIB_DIR
/db.blastlink.awk
$f
.blast.out |
\
$AwkCmd
-f
$LIB_DIR
/db.todl.awk
>
G_
$$
(
$LIB_DIR
/db.cc.r G_
$$
>
$f
.cc.txt
)
>>
& db.log
$AwkCmd
-f
$LIB_DIR
/db.cc.awk
>
$f
.cc.txt
awk
-v
NAME
=
$nom
-f
$LIB_DIR
/db.reportcc.awk
$f
.cc.txt
>>
$OutLog
$AwkCmd
-f
$LIB_DIR
/db.selcc.awk
$f
.cc.txt
>
S_
$$
...
...
detectors/cds/tools/chlorodb/subdb/lib/db.cc.awk
0 → 100644
View file @
574aace9
#
#
function
visit
(
u
,
i
,
_local_
,
v
)
{
if
(
Visited
[
u
])
return
Visited
[
u
]
=
i
for
(
v
in
Edge
[
u
])
{
visit
(
v
,
i
)
}
}
/^#/
{
next
}
{
Node
[
$1
]
++
Node
[
$2
]
++
Edge
[
$1
][
$2
]
++
Edge
[
$2
][
$1
]
++
}
END
{
for
(
u
in
Node
)
{
if
(
Visited
[
u
])
continue
visit
(
u
,
++
NbComp
)
}
for
(
u
in
Node
)
print
u
,
Visited
[
u
]
}
\ No newline at end of file
detectors/cds/tools/chlorodb/subdb/lib/db.cc.r
deleted
100755 → 0
View file @
7017655a
#!/usr/bin/env Rscript
#
require
(
igraph
,
warn.conflicts
=
F
)
args
<-
commandArgs
(
T
)
path
<-
if
(
length
(
args
)
>
0
)
args
[
1
]
else
'graph.dl'
g
<-
read.graph
(
path
,
format
=
'dl'
)
cc
<-
clusters
(
g
)
res
<-
cbind
(
V
(
g
)
$
name
,
membership
(
cc
))
write.table
(
res
,
quote
=
FALSE
,
row.names
=
FALSE
,
col.names
=
FALSE
)
quit
(
save
=
"no"
)
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.awk
0 → 100644
View file @
574aace9
#
function
Abs
(
x
)
{
return
(
x
+
0
>=
0
)
?
x
+
0
:
0
-
x
}
function
Median
(
array
,
_local_
,
tmp
,
size
,
lhs
,
rhs
)
{
size
=
asort
(
array
,
tmp
)
lhs
=
int
((
size
-
1
)
/
2
)
+
1
rhs
=
int
(
size
/
2
)
+
1
return
((
tmp
[
lhs
]
+
tmp
[
rhs
])
/
2.0
)
}
#
BEGIN
{
if
(
DELTA
==
""
)
DELTA
=
0.5
}
/^>/
{
N
++
Id
[
N
]
=
substr
(
$1
,
2
)
na
=
split
(
$1
,
a
,
"@"
)
Len
[
N
]
=
a
[
na
]
}
END
{
med
=
Median
(
Len
)
for
(
i
=
1
;
i
<=
N
;
i
++
)
{
if
(
Abs
(
Len
[
i
]
-
med
)
/
med
<=
DELTA
)
print
Id
[
i
]
}
}
detectors/cds/tools/chlorodb/subdb/lib/db.filter.len.r
deleted
100755 → 0
View file @
7017655a
#!/usr/bin/env Rscript
#
args
<-
commandArgs
(
T
)
path
<-
if
(
length
(
args
)
>
0
)
args
[
1
]
else
'len.txt'
delta
<-
if
(
length
(
args
)
>
1
)
args
[
2
]
else
0.5
tab
<-
read.table
(
path
,
header
=
T
)
lmed
<-
median
(
tab
$
len
)
dlen
<-
lmed
*
as.numeric
(
delta
)
tab
$
ok
<-
(
abs
(
tab
$
len
-
lmed
)
/
lmed
)
<=
delta
write.table
(
tab
,
quote
=
F
)
quit
(
save
=
'no'
)
detectors/cds/tools/chlorodb/subdb/lib/db.getlen.awk
deleted
100644 → 0
View file @
7017655a
#
BEGIN
{
print
"id len"
}
/^>/
{
na
=
split
(
$1
,
a
,
"@"
)
print
substr
(
$1
,
2
),
a
[
na
]
}
detectors/cds/tools/lib/install.rpackages.r
View file @
574aace9
...
...
@@ -25,7 +25,6 @@ check("grid")
check
(
"gridExtra"
)
check
(
"vcd"
)
check
(
"plotrix"
)
check
(
"igraph"
)
quit
(
save
=
'no'
,
status
=
0
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment