From 50a2153264329cdcfdc2c6af952071595881e3c9 Mon Sep 17 00:00:00 2001 From: Samuel Mondal <mondal0000@bz-rgab01-pdm02.bioz.unibas.ch> Date: Tue, 13 Dec 2022 15:59:21 +0100 Subject: [PATCH] reducing the scope of cli.py to work only after bedtools --- sequence_extractor/cli.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sequence_extractor/cli.py b/sequence_extractor/cli.py index 55c0393..5f01338 100644 --- a/sequence_extractor/cli.py +++ b/sequence_extractor/cli.py @@ -9,20 +9,18 @@ parser = argparse.ArgumentParser( prog = 'transcript_sequence_extractor', description = 'extracts transcript sequences from genome sequence and ouputs transcripts with PolyA tail added to them') parser.add_argument('--input_fasta_file', - help='genome fasta file') -parser.add_argument('--input_gtf', - help='gtf file') + help='fasta file obtained from bedtools') parser.add_argument('--output_file_name', - help='output fasta file') + help='Name of the output fasta file') args = parser.parse_args() def main(): LOG.info("sequence_extractor begins") - exon_extraction_from_gtf() - fasta_list = exon_concatenation(args.) + fasta_list = exon_concatenation(args.input_fasta_file) final_list = poly_a_addition_to_fasta_list(fasta_list) - list_to_file(final_list,args.output_file_name) + with open(args.output_file_name, 'w') as fasta_out: + fasta_out.write('\n'.join('%s\n%s' % x for x in final_list)) LOG.info("sequence_extractor ends") if ___name__ == 'main': -- GitLab