Skip to content
Snippets Groups Projects
Commit 7caba48a authored by Laura Urbanska's avatar Laura Urbanska
Browse files

fixed typos

parent 2c662762
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import pandas as pd import pandas as pd
import json import json
import re import re
import rerpresentative_v4 as repr import representative as repr
import os import os
...@@ -197,4 +197,4 @@ print("this is the function :\n\n {}".format(match_final)) ...@@ -197,4 +197,4 @@ print("this is the function :\n\n {}".format(match_final))
if __name__ == "__main__": if __name__ == "__main__":
match_reprTranscript_expressionLevel() match_reprTranscript_expressionLevel()
\ No newline at end of file
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import os
import argparse import argparse
import transcript_extractor as te import transcript_extractor as te
import exon_length_filter as elf import exon_length_filter as elf
import representative as rtcl import representative as rtcl
import representative as rp import poisson_sampling as ps
import writegtf as gt
import match_reprtranscript_expressionlevel as ma
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description="transcript sampler",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument("--annotation", required=True, help="gtf file with genome annotation")
#parser.add_argument("--expression_level", required=True, help="csv file with expression level")
parser.add_argument("--output_csv", required=True, help="output csv file")
parser.add_argument("--output_gtf", required=True, help="output gtf file")
parser.add_argument("--transcript_number", required=True, help="total number of transcripts to sample")
args = parser.parse_args()
def exe(input_file, csv, gtf, transcript_nr): def exe(input_file, csv, gtf, transcript_nr):
file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, deposit_pathway_name = True, Input_free = Input_free) file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, deposit_pathway_name = True, Input_free = Input_free)
inter_mediate_file_directory = input_file +"_intermediate_file.txt" inter_mediate_file_directory = input_file +"_intermediate_file.txt"
print("Transcripts are filtered based on transcript score. Please wait...") print("Transcripts are filtered based on transcript score. Please wait...")
pre_filter_representative_transcripts_dict = rtcl.find_repr_by_SupportLevel(inter_mediate_file_directory) pre_filter_representative_transcripts_dict = rtcl.find_repr_by_SupportLevel(inter_mediate_file_directory)
print("Transcripts filtered\n") print("Transcripts filtered\n")
elf.exon_length_filter(file_name,gen_dict= pre_filter_representative_transcripts_dict, Input_free = True) elf.exon_length_filter(file_name,gen_dict= pre_filter_representative_transcripts_dict, Input_free = True)
tsv_input = ma.output_tsv()
print("Poisson sampling of transcripts")
ps.transcript_sampling(transcript_nr, tsv_input, csv)
print("output csv file ready")
print("writing output gtf file")
gt.gtf_file_writer(input_file, csv, gtf)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description="transcript sampler",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument("--annotation", required=True, help="gtf file with genome annotation")
parser.add_argument("--output_csv", required=True, help="output csv file")
parser.add_argument("--output_gtf", required=True, help="output gtf file")
parser.add_argument("--transcript_number", required=True, help="total number of transcripts to sample")
args = parser.parse_args()
exe(args.annotation, args.output_csv, args.output_gtf, args.transcript_nr)
#return(file_name,source_pathway_name,deposit_pathway_name) #return(file_name,source_pathway_name,deposit_pathway_name)
``` ```
%% Output %% Output
usage: ipykernel_launcher.py [-h] --annotation ANNOTATION --expression_level ---------------------------------------------------------------------------
EXPRESSION_LEVEL --output_csv OUTPUT_CSV ModuleNotFoundError Traceback (most recent call last)
--output_gtf OUTPUT_GTF --transcript_number /home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb Cell 1 in <cell line: 7>()
TRANSCRIPT_NUMBER <a href='vscode-notebook-cell:/home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb#W1sZmlsZQ%3D%3D?line=4'>5</a> import poisson_sampling as ps
ipykernel_launcher.py: error: the following arguments are required: --annotation, --expression_level, --output_csv, --output_gtf, --transcript_number <a href='vscode-notebook-cell:/home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb#W1sZmlsZQ%3D%3D?line=5'>6</a> import writegtf as gt
----> <a href='vscode-notebook-cell:/home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb#W1sZmlsZQ%3D%3D?line=6'>7</a> import match_reprtranscript_expressionlevel as ma
An exception has occurred, use %tb to see the full traceback. <a href='vscode-notebook-cell:/home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb#W1sZmlsZQ%3D%3D?line=9'>10</a> def exe(input_file, csv, gtf, transcript_nr):
SystemExit: 2 <a href='vscode-notebook-cell:/home/laura/code/transcript-sampler/scripts/new_exe_file.ipynb#W1sZmlsZQ%3D%3D?line=10'>11</a> file_name,source_pathway_name_2,deposit_pathway_name_2 = te.extract_transcript(input_file, deposit_pathway_name = True, Input_free = Input_free)
File ~/code/transcript-sampler/scripts/match_reprtranscript_expressionlevel.py:5, in <module>
3 import json
4 import re
----> 5 import rerpresentative_v4 as repr
6 import os
9 def dict_reprTrans_to_df(dict_reprTrans: dict):
ModuleNotFoundError: No module named 'rerpresentative_v4'
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment