Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scRNA-seq-simulation
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
pipelines
scRNA-seq-simulation
Commits
3e933d2d
Commit
3e933d2d
authored
3 years ago
by
Kathleen Moriarty
Browse files
Options
Downloads
Patches
Plain Diff
add subpackage with cli
parent
958f7e41
Branches
Branches containing commit
No related tags found
1 merge request
!17
Issue 7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/read_sequencing/__init__.py
+3
-0
3 additions, 0 deletions
src/read_sequencing/__init__.py
src/read_sequencing/cli.py
+53
-0
53 additions, 0 deletions
src/read_sequencing/cli.py
src/read_sequencing/read_sequencing.py
+0
-0
0 additions, 0 deletions
src/read_sequencing/read_sequencing.py
with
56 additions
and
0 deletions
src/read_sequencing/__init__.py
0 → 100644
+
3
−
0
View file @
3e933d2d
"""
Placeholder package.
"""
__version__
=
'
0.1.0
'
This diff is collapsed.
Click to expand it.
src/read_sequencing/cli.py
0 → 100644
+
53
−
0
View file @
3e933d2d
import
argparse
from
read_sequencing
import
read_sequencing
def
parse_args
()
->
argparse
.
Namespace
:
"""
Parse CLI arguments.
Returns:
Parsed CLI arguments.
"""
# initiate parser
parser
=
argparse
.
ArgumentParser
(
description
=
'
Simulate the Sequencing of Reads
'
)
# add arguments
parser
.
add_argument
(
'
--frag_file_name
'
,
type
=
str
,
help
=
'
input file name
'
)
parser
.
add_argument
(
'
--output_file_name
'
,
type
=
str
,
help
=
'
output file name
'
)
parser
.
add_argument
(
'
--num_reads
'
,
type
=
int
,
help
=
'
desired number of reads
'
)
parser
.
add_argument
(
'
--read_len
'
,
type
=
int
,
help
=
'
length of each read
'
)
return
parser
.
parse_args
()
def
main
()
->
None
:
"""
Main function.
Interprets the arguments from the commandline,
Runs the functions read_sequencing.
"""
args
=
parse_args
()
read_sequencing
(
frag_file_name
=
args
.
frag_file_name
,
output_file_name
=
args
.
output_file_name
,
num_reads
=
args
.
num_reads
,
read_len
=
args
.
read_len
)
if
__name__
==
'
__main__
'
:
"""
Initiates main.
Calls main function only if run from commandline, but not if imported.
"""
main
()
This diff is collapsed.
Click to expand it.
src/read_sequencing.py
→
src/read_sequencing
/read_sequencing
.py
+
0
−
0
View file @
3e933d2d
File moved
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