Update and rename CountTreeTips.py to CountTaxonOccurence.py

This commit is contained in:
Auden Cote-L'Heureux 2023-10-24 11:19:50 -04:00 committed by GitHub
parent 9edbf3b87c
commit 81f54d2e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ def get_args():
description = "Updated Oct 24th, 2023 by Auden Cote-L'Heureux."
)
parser.add_argument('-i', '--input', type = str, required = True, help = 'Path to the folder containing the input trees')
parser.add_argument('-i', '--input', type = str, required = True, help = 'Path to the folder containing the aligned/unaligned fasta files')
args = parser.parse_args()
if(args.input.endswith('/')):
@ -38,7 +38,7 @@ def count_tips(in_dir):
count_data = { }
for file in os.listdir(in_dir):
if(file.endswith('.fas')):
if file.split('.')[-1] in ('fasta', 'fas', 'faa', 'fna'):
fname = in_dir + '/' + file
count_data.update({ file : { } })