From 24d3533232e996480bfa601549b841117841e7fa Mon Sep 17 00:00:00 2001 From: Larissa Glass <larissa.glass@unibas.ch> Date: Tue, 1 Nov 2022 16:06:34 +0000 Subject: [PATCH] Draf: Resolve "Input/output" --- README.md | 13 +++++++++++++ src/__init__.py | 3 +++ src/main.py | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 src/__init__.py create mode 100644 src/main.py diff --git a/README.md b/README.md index 3161d7a..58cfa03 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,16 @@ conda env create --file environment.yml conda activate transcript-structure-generator ``` +# Usage + +Input: +- Csv-formatted file ("ID,Count") with counts for individual transcripts +- Probability of intron inclusion (float in range [0,1]) +- gtf-formatted file with exon coordinates of the transcripts included in the csv file + +Output: +- gtf-formatted file containing generated intron/exon structures per transcript +- csv-formatted file ("NewTranscriptID,ID,Count") with + - id of generated transcript + - id of original transcript (without intron inclusions) + - count \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..d9744d3 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1,3 @@ +"""Transcript structure generator package.""" + +__version__ = '0.0.0' \ No newline at end of file diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..ea1a4d9 --- /dev/null +++ b/src/main.py @@ -0,0 +1,17 @@ +import argparse +from pathlib import Path + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--transcripts", type=str) + parser.add_argument("--annotation", type=str) + parser.add_argument("--prob_inclusion", type=float) + args = parser.parse_args() + + input_transcripts_file = args.transcripts + input_annotations_file = args.annotation + prob_inclusion = args.prob_inclusion + input_transcripts_path = Path(input_transcripts_file) + input_annotations_path = Path(input_annotations_file) + output_transcripts_file = "generated_" + input_transcripts_path.stem + ".csv" + output_annotations_file = "generated_" + input_annotations_path.name -- GitLab