diff --git a/find_exons.py b/find_exons.py index 6fa2a80..c31c063 100644 --- a/find_exons.py +++ b/find_exons.py @@ -31,7 +31,7 @@ def parse_args(): required_arguments = parser.add_argument_group('required arguments') required_arguments.add_argument('--gtf_genes', help='a .gtf file with genes', required=True) required_arguments.add_argument('--gtf_exons', help='a .gtf file with exons', required=True) - required_arguments.add_argument('--genes_of_interest', nargs='*', dest='genes_of_interest', help='a .txt file or a list with genes one is interested in', required=True) + required_arguments.add_argument('--genes_of_interest', nargs='*', dest='genes_of_interest', help='a .txt file with genes of interest containing one columnt with gene names', required=True) #all other arguments are optional parser.add_argument('--output_directory', default='output', const='output', nargs='?', help='output directory, by default ./output/') @@ -46,16 +46,6 @@ def check_directory(directory): os.makedirs(directory) print('a new directory ' + directory + ' was created') -def remove_file(file): - if os.path.isfile(file): - os.remove(file) - -def make_name_from_path(full_path, output_directory, ending): - return os.path.join(output_directory, get_name_from_path(full_path) + ending) - -def get_name_from_path(full_path): - return os.path.splitext(os.path.basename(full_path))[0] - def check_existing_input_files(args): print('checking the input files') @@ -70,8 +60,9 @@ def check_existing_input_files(args): if len(args.genes_of_interest) == 1: if not os.path.isfile(args.genes_of_interest[0]): - print('working with one gene of interest') - genes_of_interest = args.genes_of_interest + #print('working with one gene of interest') + #genes_of_interest = args.genes_of_interest + print('please provide a file with genes of interest in .txt format containint one column with names of genes you are interested in') else: print('reading from the file with genes') #there is a file with list of genes. Extract them and return in an array @@ -90,8 +81,9 @@ def check_existing_input_files(args): genes_of_interest = genes else: #there is a list of genes of interest - print('working with a list of genes') - genes_of_interest = args.genes_of_interest + #print('working with a list of genes') + #genes_of_interest = args.genes_of_interest + print('please provide only one file with genes of interest') return genes_of_interest