{ "cells": [ { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "usage: ipykernel_launcher.py [-h] --annotation ANNOTATION --expression_level\n", " EXPRESSION_LEVEL --output_csv OUTPUT_CSV\n", " --output_gtf OUTPUT_GTF --transcript_number\n", " TRANSCRIPT_NUMBER\n", "ipykernel_launcher.py: error: the following arguments are required: --annotation, --expression_level, --output_csv, --output_gtf, --transcript_number\n" ] }, { "ename": "SystemExit", "evalue": "2", "output_type": "error", "traceback": [ "An exception has occurred, use %tb to see the full traceback.\n", "\u001b[0;31mSystemExit\u001b[0m\u001b[0;31m:\u001b[0m 2\n" ] } ], "source": [ "import os\n", "\n", "import argparse\n", "import transcript_extractor as te\n", "import exon_length_filter as elf\n", "import representative as rtcl\n", "import representative as rp\n", "\n", "if __name__ == '__main__':\n", " parser = argparse.ArgumentParser(\n", " description=\"transcript sampler\",\n", " formatter_class=argparse.ArgumentDefaultsHelpFormatter\n", " )\n", " parser.add_argument(\"--annotation\", required=True, help=\"gtf file with genome annotation\")\n", " #parser.add_argument(\"--expression_level\", required=True, help=\"csv file with expression level\")\n", " parser.add_argument(\"--output_csv\", required=True, help=\"output csv file\")\n", " parser.add_argument(\"--output_gtf\", required=True, help=\"output gtf file\")\n", " parser.add_argument(\"--transcript_number\", required=True, help=\"total number of transcripts to sample\")\n", " args = parser.parse_args()\n", "\n", "def exe(input_file, csv, gtf, transcript_nr):\n", " file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, deposit_pathway_name = True, Input_free = Input_free)\n", " inter_mediate_file_directory = input_file +\"_intermediate_file.txt\"\n", "\n", " print(\"Transcripts are filtered based on transcript score. Please wait...\")\n", "\n", " pre_filter_representative_transcripts_dict = rtcl.find_repr_by_SupportLevel(inter_mediate_file_directory)\n", "\n", " print(\"Transcripts filtered\\n\")\n", " elf.exon_length_filter(file_name,gen_dict= pre_filter_representative_transcripts_dict, Input_free = True)\n", "\n", "\n", " #return(file_name,source_pathway_name,deposit_pathway_name)\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.12 ('nextstrain')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12" }, "orig_nbformat": 4, "vscode": { "interpreter": { "hash": "41a54f34eee8c9e478b3404dd74579d3248e5c82a4969468d7042e338229b1fe" } } }, "nbformat": 4, "nbformat_minor": 2 }