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
1efe9b84
Commit
1efe9b84
authored
3 years ago
by
Michele Garioni
Browse files
Options
Downloads
Patches
Plain Diff
fix: add cli
parent
557be05b
No related branches found
No related tags found
2 merge requests
!24
Draft: Count gene
,
!21
fix: add cli to sample_from_input
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sample_from_input.py
+27
-0
27 additions, 0 deletions
src/sample_from_input.py
with
27 additions
and
0 deletions
src/sampleinput.py
→
src/sample
_from_
input.py
+
27
−
0
View file @
1efe9b84
...
...
@@ -71,3 +71,30 @@ def sample_from_input(
myfile
.
write
(
line
+
'
\n
'
)
myfile
.
close
()
LOG
.
info
(
'
output written.
'
)
def
main
():
"""
CLI interface for the transcripts sampler.
Accepts arguments from the command line and
runs the transcript sampler.
"""
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'
Read functions argument
'
)
parser
.
add_argument
(
'
input
'
,
action
=
'
store
'
,
type
=
Path
,
help
=
'
path of the input file
'
)
parser
.
add_argument
(
'
-o
'
,
action
=
'
store
'
,
type
=
Path
,
default
=
Path
.
cwd
()
/
'
sampled_cell.csv
'
,
help
=
'
path of the output file
'
)
parser
.
add_argument
(
'
-n
'
,
action
=
'
store
'
,
type
=
int
,
default
=
10000
,
help
=
'
number of total reads to be simulated
'
)
parser
.
add_argument
(
'
-sep
'
,
action
=
'
store
'
,
type
=
str
,
default
=
'
,
'
,
help
=
'
separator of the input file
'
)
args
=
parser
.
parse_args
()
sample_from_input
(
args
.
input
,
args
.
o
,
args
.
n
,
args
.
sep
)
if
__name__
==
'
__main__
'
:
main
()
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