#!/usr/bin/env python3 # Given a GTF file, write a file of exons. eg. if the input file is # GCF_000005005.2_B73_RefGen_v4_genomic.gtf, # the output will be written GCF_000005005.2_B73_RefGen_v4_genomic.exon import os.path import subprocess import sys #Convert arguments to variables IFN = sys.argv[1] NAME = os.path.splitext(IFN)[0] # Create ouput stream OFN = NAME + '.exon' OUTFILE = open(OFN,'w') #Run the command p = subprocess.Popen(['hisat2_extract_exons.py', IFN], stdout=OUTFILE) p.wait() OUTFILE.close()