"""This script defines a BED from exon annotation in a GTF, to get exon coordinates for use in bedtools. It also ensures that the concatenation happens in the correct order, regardless of the strandedness of the transcript.
Args:
GTF file
Returns:
BED file with the format: chr, start, end, transcript_id, score, strand, gene_id
"""
parser=argparse.ArgumentParser(
prog='pre_bedtools',
description='extracts ordered information from gtf file and for transcripts in the negative strand, flips the order in which exons are ordered.')
parser.add_argument('--input_gtf_file',
help='ordered and processed gtf file')
parser.add_argument('--output_bed_file',
help='bed file with only exons with strandedness taken into account')