Skip to content
Snippets Groups Projects
Commit 1efe9b84 authored by Michele Garioni's avatar Michele Garioni
Browse files

fix: add cli

parent 557be05b
No related branches found
No related tags found
2 merge requests!24Draft: Count gene,!21fix: add cli to sample_from_input
......@@ -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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment