Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Transcript sampler
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
zavolan_group
tools
Transcript sampler
Commits
1368ccf7
Commit
1368ccf7
authored
2 years ago
by
Jakob Rien
Browse files
Options
Downloads
Patches
Plain Diff
Replace find_representative_transcripts.py
parent
d9b2b067
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/find_representative_transcripts.py
+6
-6
6 additions, 6 deletions
scripts/find_representative_transcripts.py
with
6 additions
and
6 deletions
scripts/find_representative_transcripts.py
+
6
−
6
View file @
1368ccf7
#### Find representative transcripts ####
"""
Version 1.0.
0
"""
"""
Version 1.0.
1
"""
### Imports ###
import
argparse
...
...
@@ -36,7 +36,7 @@ def find_in_attributs (attributs,look_for):
index
=
attributs
.
index
(
look_for
)
+
1
return
attributs
[
index
]
except
:
#
print("No",look_for,"in the entry the return was set to NA\n",attributs)
print
(
"
No
"
,
look_for
,
"
in the entry the return was set to NA
\n
"
,
attributs
)
return
"
NA
"
def
exon_length
(
entry
):
...
...
@@ -108,10 +108,10 @@ def get_rep_trans(file_name = "test"):
if
ignor_trans
:
continue
elif
cur_gID
!=
attributs
[
1
]:
print
(
"
ERROR exon from an unexpected Gen
"
)
raise
ValueError
(
"
ERROR exon from an unexpected Gen
"
)
continue
elif
find_in_attributs
(
attributs
,
"
transcript_id
"
)
!=
cur_tID
:
print
(
"
ERROR
exon from an unexpected transcript
"
)
raise
ValueError
(
"
exon from an unexpected transcript
"
)
continue
#calculating exon_length and adding it to the appropriat list and chackin for changes in best transcript
...
...
@@ -129,7 +129,7 @@ def get_rep_trans(file_name = "test"):
#varryfi that the gen is correct
if
cur_gID
!=
attributs
[
1
]:
print
(
"
ERROR transcript from an unexpected Gen
"
)
raise
ValueError
(
"
ERROR transcript from an unexpected Gen
"
)
continue
#finding the transcript id and the support level
...
...
@@ -175,7 +175,7 @@ def get_rep_trans(file_name = "test"):
#raises an error for unidentifyable entrys
else
:
print
(
"
This entry could not be identified
\n
"
,
entry
)
raise
ValueError
(
"
This entry could not be identified
\n
"
,
entry
)
del
rep_trans
[
""
]
rep_transcripts
=
_re_format
(
rep_trans
)
...
...
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