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
05453696
Commit
05453696
authored
2 years ago
by
Jakob Rien
Browse files
Options
Downloads
Patches
Plain Diff
Replace new_exe.py
parent
1c09b7c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/new_exe.py
+12
-5
12 additions, 5 deletions
scripts/new_exe.py
with
12 additions
and
5 deletions
scripts/new_exe.py
+
12
−
5
View file @
05453696
### Called Packages ###
import
argparse
import
argparse
import
transcript_extractor
as
te
import
transcript_extractor
as
te
import
exon_length_filter
as
elf
import
exon_length_filter
as
elf
import
representative
as
rtcl
import
representative
as
rtcl
import
poisson_sampling
as
ps
import
poisson_sampling
as
ps
import
writegtf
as
gt
import
writegtf
as
gt
import
match_reprtranscript_expressionlevel
as
ma
import
match_reprtranscript_expressionlevel
as
ma
python_version
=
"
3.7.13
"
module_list
=
[
argparse
]
modul_name_list
=
[
"
argparse
"
]
### Functions ###
def
exe
(
input_file
,
csv
,
gtf
,
input_csv
,
transcript_nr
,
input_free
=
True
):
def
exe
(
input_file
,
csv
,
gtf
,
input_csv
,
transcript_nr
,
input_free
=
True
):
file_name
,
source_pathway_name_2
,
deposit_pathway_name_2
=
te
.
extract_transcript
(
input_file
,
Input_free
=
input_free
)
file_name
,
source_pathway_name_2
,
deposit_pathway_name_2
=
te
.
extract_transcript
(
input_file
,
Input_free
=
input_free
)
inter_mediate_file_directory
=
file_name
+
"
_intermediate_file.txt
"
inter_mediate_file_directory
=
file_name
+
"
_intermediate_file.txt
"
print
(
"
Transcripts are filtered based on transcript score. Please wait...
"
)
print
(
"
Transcripts are filtered based on transcript score. Please wait...
"
)
pre_filter_representative_transcripts_dict
=
rtcl
.
find_repr_by_SupportLevel
(
inter_mediate_file_directory
)
pre_filter_representative_transcripts_dict
=
rtcl
.
find_repr_by_SupportLevel
(
inter_mediate_file_directory
)
print
(
"
Transcripts filtered
\n
"
)
print
(
"
Transcripts filtered
\n
"
)
dictionary1
=
elf
.
exon_length_filter
(
file_name
,
gen_dict
=
pre_filter_representative_transcripts_dict
,
Input_free
=
input_free
)
dictionary1
=
elf
.
exon_length_filter
(
file_name
,
gen_dict
=
pre_filter_representative_transcripts_dict
)
print
(
dictionary1
)
df_repr
=
ma
.
match_reprTranscript_expressionLevel
(
dict_reprTrans
=
dictionary1
,
exprTrans
=
input_csv
,
intermediate_file
=
inter_mediate_file_directory
,)
print
(
"
Finiding match between representative transcripts and expression level file
"
)
tsv_input
=
ma
.
match_reprTranscript_expressionLevel
(
input_csv
,
dictionary1
,
inter_mediate_file_directory
)
print
(
"
Poisson sampling of transcripts
"
)
print
(
"
Poisson sampling of transcripts
"
)
ps
.
transcript_sampling
(
transcript_nr
,
tsv_input
,
csv
)
ps
.
transcript_sampling
(
transcript_nr
,
df_repr
,
csv
)
print
(
"
output csv file ready
"
)
print
(
"
output csv file ready
"
)
print
(
"
writing output gtf file
"
)
print
(
"
writing output gtf file
"
)
gt
.
gtf_file_writer
(
input_file
,
csv
,
gtf
)
gt
.
gtf_file_writer
(
input_file
,
csv
,
gtf
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
#te.version_control(module_list,modul_name_list,python_version)
parser
=
argparse
.
ArgumentParser
(
parser
=
argparse
.
ArgumentParser
(
description
=
"
transcript sampler
"
,
description
=
"
transcript sampler
"
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
...
...
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