Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Transcript sequence extractor
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 sequence extractor
Commits
83fc6e1a
Commit
83fc6e1a
authored
2 years ago
by
Samuel Mondal
Browse files
Options
Downloads
Patches
Plain Diff
function name change
parent
324c44c4
No related branches found
No related tags found
1 merge request
!43
function name change
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sequence_extractor/polyA.py
+3
-3
3 additions, 3 deletions
sequence_extractor/polyA.py
tests/test_polyA.py
+3
-0
3 additions, 0 deletions
tests/test_polyA.py
with
6 additions
and
3 deletions
sequence_extractor/polyA.py
+
3
−
3
View file @
83fc6e1a
import
numpy
as
np
# To do: Taking probabilities of nucleotides from user and raising error if sum != 1
def
poly
A
_generator
(
def
poly
_a
_generator
(
exon
:
str
,
)
->
str
:
"""
Adds a PolyA tail to an exon sequence input into the function.
...
...
@@ -15,7 +15,7 @@ def polyA_generator(
polyA
=
''
.
join
(
np
.
random
.
choice
(
listA
,
250
,
p
=
[
0.9
,
0.040
,
0.020
,
0.020
]))
return
(
exon
+
polyA
)
def
poly
A
_addition_to_fasta_list
(
def
poly
_a
_addition_to_fasta_list
(
fasta_list
:
list
,
)
->
list
:
"""
Takes in a list of tuples with annotations and exons and outputs a list where polyA tail has been added to all the exon 3
'
ends.
...
...
@@ -26,5 +26,5 @@ def polyA_addition_to_fasta_list(
Returns:
A list like the initial list, this time with polyA tail added onto it.
"""
mature_rna_list
=
[(
i
[
0
],
poly
A
_generator
(
i
[
1
]))
for
i
in
fasta_list
]
mature_rna_list
=
[(
i
[
0
],
poly
_a
_generator
(
i
[
1
]))
for
i
in
fasta_list
]
return
mature_rna_list
This diff is collapsed.
Click to expand it.
tests/test_polyA.py
0 → 100644
+
3
−
0
View file @
83fc6e1a
import
pytest
from
polyA
import
poly
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