Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
baseLess
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Lannoy, Carlos de
baseLess
Commits
dbe6a5d7
Commit
dbe6a5d7
authored
3 years ago
by
Lannoy, Carlos de
Browse files
Options
Downloads
Patches
Plain Diff
small fixes, update env
parent
68456266
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
env.yaml
+3
-1
3 additions, 1 deletion
env.yaml
validation/validate_16S.py
+8
-4
8 additions, 4 deletions
validation/validate_16S.py
with
11 additions
and
5 deletions
env.yaml
+
3
−
1
View file @
dbe6a5d7
...
...
@@ -14,4 +14,6 @@ dependencies:
-
hyperopt=0.2.5
-
seaborn=0.11.1
-
numpy=1.19.5
-
pytables=3.6.1
\ No newline at end of file
-
pytables=3.6.1
-
kmer-jellyfish=2.3.0
-
scikit-learn=0.24.2
This diff is collapsed.
Click to expand it.
validation/validate_16S.py
+
8
−
4
View file @
dbe6a5d7
import
os
import
os
,
sys
import
pandas
as
pd
from
os.path
import
basename
from
shutil
import
copy
...
...
@@ -6,6 +6,11 @@ from pathlib import Path
from
distutils.dir_util
import
copy_tree
from
sklearn.model_selection
import
StratifiedKFold
from
jinja2
import
Template
__location__
=
os
.
path
.
realpath
(
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
__file__
)))
baseless_location
=
os
.
path
.
realpath
(
f
'
{
__location__
}
/..
'
)
sys
.
path
.
append
(
baseless_location
)
from
argparse_dicts
import
get_validate_parser
from
helper_functions
import
parse_input_path
,
parse_output_path
from
snakemake
import
snakemake
...
...
@@ -17,8 +22,7 @@ args = parser.parse_args()
nn_target_list
=
[
pth
.
name
for
pth
in
Path
(
args
.
primed_nn_dir
).
iterdir
()
if
pth
.
is_dir
()]
__location__
=
os
.
path
.
realpath
(
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
__file__
)))
baseless_location
=
os
.
path
.
realpath
(
f
'
{
__location__
}
/..
'
)
with
open
(
args
.
parameter_file
,
'
r
'
)
as
pf
:
params
=
yaml
.
load
(
pf
,
Loader
=
yaml
.
FullLoader
)
primed_nn_dir
=
args
.
primed_nn_dir
if
primed_nn_dir
[
-
1
]
!=
'
/
'
:
primed_nn_dir
+=
'
/
'
...
...
@@ -44,7 +48,7 @@ fast5_basename_list = [basename(f) for f in fast5_list]
fast5_df
=
pd
.
DataFrame
({
'
read_id
'
:
fast5_basename_list
,
'
fn
'
:
fast5_list
,
'
species
'
:
[
gt_df
.
species_short
.
get
(
ff
)
for
ff
in
fast5_basename_list
]}
'
species
'
:
[
gt_df
.
species_short
.
get
(
ff
,
'
unknown
'
)
for
ff
in
fast5_basename_list
]}
).
set_index
(
'
read_id
'
)
fast5_df
.
drop
(
fast5_df
.
query
(
'
species ==
"
unknown
"'
).
index
,
axis
=
0
,
inplace
=
True
)
...
...
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