Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GrAnnoT
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
DIADE
dynadiv
GrAnnoT
Commits
69116bb5
Commit
69116bb5
authored
1 year ago
by
nina.marthe_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
added function to get a chromosome's path
parent
ae5fa3c2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Functions.py
+18
-9
18 additions, 9 deletions
Functions.py
with
18 additions
and
9 deletions
Functions.py
+
18
−
9
View file @
69116bb5
...
...
@@ -306,15 +306,24 @@ def compare_strand(list_1,list_2,list_1_unstrand,list_2_unstrand):
same_strand_count
+=
1
return
[
seg_common
,
same_strand_count
]
def
add_target_genome_path
(
feature_id
,
target_genome_path
):
feature
=
Features
[
feature_id
]
list_seg
=
feature
.
segments_list_source
first_seg
=
get_first_seg
(
list_seg
)
last_seg
=
get_first_seg
(
reversed
(
list_seg
))
feature_path
=
[]
if
first_seg
!=
''
:
feature_path
=
get_feature_path
(
target_genome_path
,
first_seg
,
last_seg
)
feature
.
segments_list_target
=
feature_path
def
get_chr_path
(
feature_id
,
target_genome_paths
):
feat_chr_number
=
Features
[
feature_id
].
chr
[
3
:]
for
path_name
in
target_genome_paths
.
keys
():
if
feat_chr_number
in
path_name
[
-
3
:]:
return
target_genome_paths
[
path_name
]
return
False
def
add_target_genome_path
(
feature_id
,
target_genome_paths
):
target_genome_path
=
get_chr_path
(
feature_id
,
target_genome_paths
)
if
target_genome_paths
!=
False
:
feature
=
Features
[
feature_id
]
list_seg
=
feature
.
segments_list_source
first_seg
=
get_first_seg
(
list_seg
)
last_seg
=
get_first_seg
(
reversed
(
list_seg
))
feature_path
=
[]
if
first_seg
!=
''
:
feature_path
=
get_feature_path
(
target_genome_path
,
first_seg
,
last_seg
)
feature
.
segments_list_target
=
feature_path
def
get_feature_path
(
target_genome_path
,
first_seg
,
last_seg
):
# find the path in target genome
...
...
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