Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
raccroche_v2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Alex Liu (nma904)
raccroche_v2
Commits
dfa125c8
Commit
dfa125c8
authored
2 years ago
by
Lingling Jin (lij313)
Browse files
Options
Downloads
Patches
Plain Diff
revisions to work with self-median monoploid genome
parent
d78a1cad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
module1_2/inputData/project-legumes8/Genomes.txt
+8
-8
8 additions, 8 deletions
module1_2/inputData/project-legumes8/Genomes.txt
module1_2/src/GeneFamily.py
+15
-7
15 additions, 7 deletions
module1_2/src/GeneFamily.py
module1_2/src/Module1_2.ipynb
+71
-273
71 additions, 273 deletions
module1_2/src/Module1_2.ipynb
with
94 additions
and
288 deletions
module1_2/inputData/project-legumes8/Genomes.txt
+
8
−
8
View file @
dfa125c8
#genomeID genomeName ancestor numChr
#genomeID genomeName ancestor numChr
64965 Vitis
1
19
64965 Vitis
6
19
64962 Prunus
1
8
64962 Prunus
6
8
64734 Quillaja
2
14
64734 Quillaja
5
14
64742 Cercis
3
7
64742 Cercis
4
7
64767 Sindora
4
12
64767 Sindora
3
12
64768 Senna
5
13
64768 Senna
2
13
64963 Phaseolus
6
11
64963 Phaseolus
1
11
64964 Medicago
6
8
64964 Medicago
1
8
This diff is collapsed.
Click to expand it.
module1_2/src/GeneFamily.py
+
15
−
7
View file @
dfa125c8
...
@@ -154,16 +154,21 @@ class GeneFamily:
...
@@ -154,16 +154,21 @@ class GeneFamily:
[
leaf1
.
replace
(
"
-
"
,
"
,
"
),
leaf2
.
replace
(
"
-
"
,
"
,
"
),
self
.
find_other_leaves
(
leaf1
,
leaf2
,
all_leaves
)])
[
leaf1
.
replace
(
"
-
"
,
"
,
"
),
leaf2
.
replace
(
"
-
"
,
"
,
"
),
self
.
find_other_leaves
(
leaf1
,
leaf2
,
all_leaves
)])
newick_tree
=
newick_tree
.
replace
(
newick_tree
[
last_left
:
first_right
+
1
],
leaf_pair
)
newick_tree
=
newick_tree
.
replace
(
newick_tree
[
last_left
:
first_right
+
1
],
leaf_pair
)
print
(
"
The order of ancestors:
"
)
print
(
median_structure
[
-
1
])
#print(median_structure)
# print(newick_tree)
#print(newick_tree)
first_right
=
newick_tree
.
find
(
"
)
"
)
first_right
=
newick_tree
.
find
(
"
)
"
)
last_left
=
newick_tree
.
rfind
(
"
(
"
,
0
,
first_right
)
last_left
=
newick_tree
.
rfind
(
"
(
"
,
0
,
first_right
)
# print("FR "+str(first_right))
# print("FR "+str(first_right))
# print("LL "+str(last_left))
# print("LL "+str(last_left))
print
(
"
Confirm ancestors:
"
)
for
median
in
median_structure
:
print
(
median
)
print
()
try
:
try
:
neighbours
=
newick_tree
[
last_left
+
1
:
first_right
].
replace
(
"
"
,
""
)
neighbours
=
newick_tree
[
last_left
+
1
:
first_right
].
replace
(
"
"
,
""
)
leaf1
,
leaf2
=
neighbours
.
split
(
"
,
"
)
leaf1
,
leaf2
=
neighbours
.
split
(
"
,
"
)
...
@@ -200,9 +205,12 @@ class GeneFamily:
...
@@ -200,9 +205,12 @@ class GeneFamily:
leaves_to_remove
=
leaves1
+
leaves2
leaves_to_remove
=
leaves1
+
leaves2
other_leaves
=
[
leaf
[
0
]
for
leaf
in
all_leaves
if
leaf
[
0
]
not
in
leaves_to_remove
]
other_leaves
=
[
leaf
[
0
]
for
leaf
in
all_leaves
if
leaf
[
0
]
not
in
leaves_to_remove
]
#print("all leaves")
# print(leaves_to_remove)
#print(all_leaves)
# print(other_leaves)
#print("leaves to remove")
#print(leaves_to_remove)
#print("other leaves")
#print(other_leaves)
result
=
'
,
'
.
join
(
other_leaves
)
result
=
'
,
'
.
join
(
other_leaves
)
...
...
This diff is collapsed.
Click to expand it.
module1_2/src/Module1_2.ipynb
+
71
−
273
View file @
dfa125c8
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