#!/usr/bin/env python3

# Given a GTF file, write a file of splice sites. 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.ss

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 + '.ss'
OUTFILE = open(OFN,'w')

#Run the command
p = subprocess.Popen(['hisat2_extract_splice_sites.py', IFN], stdout=OUTFILE)
p.wait()
OUTFILE.close()



