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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
zavolan_group
tools
Transcript sequence extractor
Merge requests
!57
reducing the scope of cli.py to work only after bedtools
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
reducing the scope of cli.py to work only after bedtools
new
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
reducing the scope of cli.py to work only after bedtools
Samuel Mondal
requested to merge
new
into
master
Dec 13, 2022
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
50a21532
1 commit,
Dec 13, 2022
1 file
+
5
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
sequence_extractor/cli.py
+
5
−
7
View file @ 50a21532
Edit in single-file editor
Open in Web IDE
Show full file
@@ -9,20 +9,18 @@ parser = argparse.ArgumentParser(
prog
=
'
transcript_sequence_extractor
'
,
description
=
'
extracts transcript sequences from genome sequence and ouputs transcripts with PolyA tail added to them
'
)
parser
.
add_argument
(
'
--input_fasta_file
'
,
help
=
'
genome fasta file
'
)
parser
.
add_argument
(
'
--input_gtf
'
,
help
=
'
gtf file
'
)
help
=
'
fasta file obtained from bedtools
'
)
parser
.
add_argument
(
'
--output_file_name
'
,
help
=
'
output fasta file
'
)
help
=
'
Name of the
output fasta file
'
)
args
=
parser
.
parse_args
()
def
main
():
LOG
.
info
(
"
sequence_extractor begins
"
)
exon_extraction_from_gtf
()
fasta_list
=
exon_concatenation
(
args
.)
fasta_list
=
exon_concatenation
(
args
.
input_fasta_file
)
final_list
=
poly_a_addition_to_fasta_list
(
fasta_list
)
list_to_file
(
final_list
,
args
.
output_file_name
)
with
open
(
args
.
output_file_name
,
'
w
'
)
as
fasta_out
:
fasta_out
.
write
(
'
\n
'
.
join
(
'
%s
\n
%s
'
%
x
for
x
in
final_list
))
LOG
.
info
(
"
sequence_extractor ends
"
)
if
___name__
==
'
main
'
:
Loading