Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
panacota
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amandine PERRIN
panacota
Commits
38488d6f
Commit
38488d6f
authored
5 years ago
by
Yoann Dufresne
Browse files
Options
Downloads
Patches
Plain Diff
update all the tests and usages of the read function
parent
2dab6d97
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#34026
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
PanACoTA/utils_pangenome.py
+2
-2
2 additions, 2 deletions
PanACoTA/utils_pangenome.py
test/test_unit/test_utils-pan.py
+6
-6
6 additions, 6 deletions
test/test_unit/test_utils-pan.py
with
8 additions
and
8 deletions
PanACoTA/utils_pangenome.py
+
2
−
2
View file @
38488d6f
...
...
@@ -77,12 +77,12 @@ def get_fams_info(families, logger):
"""
logger
.
info
(
"
Retrieving information from pan families
"
)
fams_by_strain
=
{}
all_strains
=
[]
all_strains
=
set
()
for
num
,
fam
in
families
.
items
():
fams_by_strain
[
num
]
=
{}
for
gene
in
fam
:
read_gene
(
gene
,
num
,
fams_by_strain
,
all_strains
)
sort_all_strains
=
sorted
(
all_strains
,
key
=
utils
.
sort_genomes_by_name
)
sort_all_strains
=
sorted
(
list
(
all_strains
)
,
key
=
utils
.
sort_genomes_by_name
)
return
fams_by_strain
,
sort_all_strains
...
...
This diff is collapsed.
Click to expand it.
test/test_unit/test_utils-pan.py
+
6
−
6
View file @
38488d6f
...
...
@@ -156,9 +156,9 @@ def test_read_gene():
gene
=
"
ESCO.1016.00012.i012_00015
"
num
=
"
1
"
fams_by_strain
=
{
"
1
"
:
{}}
all_strains
=
[]
all_strains
=
set
()
upan
.
read_gene
(
gene
,
num
,
fams_by_strain
,
all_strains
)
assert
all_strains
==
[
"
ESCO.1016.00012
"
]
assert
all_strains
==
{
"
ESCO.1016.00012
"
}
assert
fams_by_strain
==
{
"
1
"
:
{
"
ESCO.1016.00012
"
:
[
gene
]}}
...
...
@@ -170,9 +170,9 @@ def test_read_gene_other_format():
gene
=
"
my_gene-name_other_0001
"
num
=
"
1
"
fams_by_strain
=
{
"
1
"
:
{}}
all_strains
=
[]
all_strains
=
set
()
upan
.
read_gene
(
gene
,
num
,
fams_by_strain
,
all_strains
)
assert
all_strains
==
[
"
my_gene-name_other
"
]
assert
all_strains
==
{
"
my_gene-name_other
"
}
assert
fams_by_strain
==
{
"
1
"
:
{
"
my_gene-name_other
"
:
[
gene
]}}
...
...
@@ -185,9 +185,9 @@ def test_read_gene_strain_known():
gene
=
"
ESCO.1016.00012.i012_00015
"
num
=
"
1
"
fams_by_strain
=
{
"
1
"
:
{
"
ESCO.1016.00012
"
:
[
"
ESCO.1016.00012.i001_01
"
]}}
all_strains
=
[
"
ESCO.1016.00012
"
]
all_strains
=
{
"
ESCO.1016.00012
"
}
upan
.
read_gene
(
gene
,
num
,
fams_by_strain
,
all_strains
)
assert
all_strains
==
[
"
ESCO.1016.00012
"
]
assert
all_strains
==
{
"
ESCO.1016.00012
"
}
assert
fams_by_strain
==
{
"
1
"
:
{
"
ESCO.1016.00012
"
:
[
"
ESCO.1016.00012.i001_01
"
,
gene
]}}
...
...
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