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
e6e0ce2b
Commit
e6e0ce2b
authored
2 years ago
by
Laura Urbanska
Browse files
Options
Downloads
Patches
Plain Diff
added new exe python file and modified match transcript script
parent
7caba48a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/match_reprtranscript_expressionlevel.py
+8
-8
8 additions, 8 deletions
scripts/match_reprtranscript_expressionlevel.py
scripts/new_exe.py
+41
-0
41 additions, 0 deletions
scripts/new_exe.py
with
49 additions
and
8 deletions
scripts/match_reprtranscript_expressionlevel.py
+
8
−
8
View file @
e6e0ce2b
...
...
@@ -187,14 +187,14 @@ def match_reprTranscript_expressionLevel(exprTrans:str, dict_reprTrans:dict, int
# run the programm
dict_txt
=
a
#input a dict of {gene:reprTrans} in the form of a txt file
input_intermediate_file
=
b
#input the intermediate file generated by transckript extractor
input_expr
=
c
#input a csv or tsv file containing the expr level
#
dict_txt = a #input a dict of {gene:reprTrans} in the form of a txt file
#
input_intermediate_file = b #input the intermediate file generated by transckript extractor
#
input_expr = c #input a csv or tsv file containing the expr level
dict_reprTrans
=
txt_to_dict
(
dict_txt
)
match_final
=
match_reprTranscript_expressionLevel
(
input_expr
,
dict_reprTrans
,
input_intermediate_file
)
print
(
"
this is the function :
\n\n
{}
"
.
format
(
match_final
))
#
dict_reprTrans = txt_to_dict(dict_txt)
#
match_final = match_reprTranscript_expressionLevel(input_expr, dict_reprTrans, input_intermediate_file)
#
print("this is the function :\n\n {}".format(match_final))
if
__name__
==
"
__main__
"
:
match_reprTranscript_expressionLevel
()
#
if __name__ == "__main__":
#
match_reprTranscript_expressionLevel()
This diff is collapsed.
Click to expand it.
scripts/new_exe.py
0 → 100644
+
41
−
0
View file @
e6e0ce2b
import
argparse
import
transcript_extractor
as
te
import
exon_length_filter
as
elf
import
representative
as
rtcl
import
poisson_sampling
as
ps
import
writegtf
as
gt
import
match_reprtranscript_expressionlevel
as
ma
def
exe
(
input_file
,
csv
,
gtf
,
transcript_nr
):
file_name
,
source_pathway_name_2
,
deposit_pathway_name_2
=
te
.
extract_transcript
(
input_file
,
deposit_pathway_name
=
True
,
Input_free
=
Input_free
)
inter_mediate_file_directory
=
input_file
+
"
_intermediate_file.txt
"
print
(
"
Transcripts are filtered based on transcript score. Please wait...
"
)
pre_filter_representative_transcripts_dict
=
rtcl
.
find_repr_by_SupportLevel
(
inter_mediate_file_directory
)
print
(
"
Transcripts filtered
\n
"
)
elf
.
exon_length_filter
(
file_name
,
gen_dict
=
pre_filter_representative_transcripts_dict
,
Input_free
=
True
)
tsv_input
=
ma
.
output_tsv
()
print
(
"
Poisson sampling of transcripts
"
)
ps
.
transcript_sampling
(
transcript_nr
,
tsv_input
,
csv
)
print
(
"
output csv file ready
"
)
print
(
"
writing output gtf file
"
)
gt
.
gtf_file_writer
(
input_file
,
csv
,
gtf
)
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
(
description
=
"
transcript sampler
"
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
parser
.
add_argument
(
"
--annotation
"
,
required
=
True
,
help
=
"
gtf file with genome annotation
"
)
parser
.
add_argument
(
"
--output_csv
"
,
required
=
True
,
help
=
"
output csv file
"
)
parser
.
add_argument
(
"
--output_gtf
"
,
required
=
True
,
help
=
"
output gtf file
"
)
parser
.
add_argument
(
"
--transcript_number
"
,
required
=
True
,
help
=
"
total number of transcripts to sample
"
)
args
=
parser
.
parse_args
()
exe
(
args
.
annotation
,
args
.
output_csv
,
args
.
output_gtf
,
args
.
transcript_number
)
\ No newline at end of file
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