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
Merge requests
!21
fix: add cli to sample_from_input
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
fix: add cli to sample_from_input
feature
into
main
Overview
9
Commits
10
Pipelines
2
Changes
2
7 unresolved threads
Hide all comments
Closed
Michele Garioni
requested to merge
feature
into
main
3 years ago
Overview
9
Commits
10
Pipelines
2
Changes
2
7 unresolved threads
Hide all comments
Expand
0
0
Merge request reports
Compare
main
version 1
33f21ba6
3 years ago
main (base)
and
version 1
latest version
f9d2e0df
10 commits,
3 years ago
version 1
33f21ba6
9 commits,
3 years ago
2 files
+
65
−
4
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/sampleinput.py
→
src/sample
_from_
input.py
+
27
−
0
Options
@@ -71,3 +71,30 @@ def sample_from_input(
@@ -71,3 +71,30 @@ def sample_from_input(
myfile
.
write
(
line
+
'
\n
'
)
myfile
.
write
(
line
+
'
\n
'
)
myfile
.
close
()
myfile
.
close
()
LOG
.
info
(
'
output written.
'
)
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
()
Loading