Skip to content

Commit 360f45a

Browse files
committed
minor update to v1.3.1
1 parent e80a61b commit 360f45a

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,12 @@ options:
340340
-h, --help show this help message and exit
341341
-g GENOMES [GENOMES ...], --genomes GENOMES [GENOMES ...]
342342
Genome assembly file paths or paths to containing
343-
directories. Files should be in FASTA format and can be gzipped
344-
(accepted suffices are: *.fasta,
345-
*.fa, *.fas, or *.fna) [Optional].
343+
directories. Files should be in FASTA format (accepted suffices
344+
are: *.fasta, *.fa, *.fas, or *.fna) [Optional].
346345
-p PROTEOMES [PROTEOMES ...], --proteomes PROTEOMES [PROTEOMES ...]
347346
Proteome file paths or paths to containing
348-
directories. Files should be in FASTA format and can be gzipped
349-
(accepted suffices are: *.fasta,
350-
*.fa, or *.faa) [Optional].
347+
directories. Files should be in FASTA format (accepted suffices
348+
are: *.fasta, *.fa, or *.faa) [Optional].
351349
-t TAXA_NAME, --taxa-name TAXA_NAME
352350
Genus or species identifier from GTDB for which to
353351
download genomes for and include in

bin/cidder

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def create_parser():
9090
metagenomic applications. Salamzade, Kottapalli, and Kalan, 2025.
9191
""", formatter_class=argparse.RawTextHelpFormatter)
9292

93-
parser.add_argument('-g', '--genomes', nargs='+', help='Genome assembly file paths or paths to containing\ndirectories. Files should be in FASTA format and can be gzipped\n(accepted suffices are: *.fasta,\n*.fa, *.fas, or *.fna) [Optional].', required=False, default=[])
94-
parser.add_argument('-p', '--proteomes', nargs='+', help='Proteome file paths or paths to containing\ndirectories. Files should be in FASTA format and can be gzipped\n(accepted suffices are: *.fasta,\n*.fa, or *.faa) [Optional].', required=False, default=[])
93+
parser.add_argument('-g', '--genomes', nargs='+', help='Genome assembly file paths or paths to containing\ndirectories. Files should be in FASTA format (accepted suffices\nare: *.fasta, *.fa, *.fas, or *.fna) [Optional].', required=False, default=[])
94+
parser.add_argument('-p', '--proteomes', nargs='+', help='Proteome file paths or paths to containing\ndirectories. Files should be in FASTA format (accepted suffices\nare: *.fasta, *.fa, or *.faa) [Optional].', required=False, default=[])
9595
parser.add_argument('-t', '--taxa-name', help='Genus or species identifier from GTDB for which to\ndownload genomes for and include in\ndereplication analysis [Optional].', required=False, default=None)
9696
parser.add_argument('-a', '--new-proteins-needed', type=int, help="The number of new protein clusters needed to add [Default is 0].", required=False, default=0)
9797
parser.add_argument('-ts', '--total-saturation', type=float, help="The percentage of total proteins clusters needed to stop representative\ngenome selection [Default is 90.0].", required=False, default=90.0)
@@ -268,7 +268,7 @@ def cidder_main():
268268
proteome_name_to_path = {}
269269
if len(proteomes) > 0:
270270
try:
271-
proteome_name_to_path = util.processInputProteomes(proteomes, combined_proteome_faa, genome_name_to_path, logObject, sanity_check=sanity_check_flag)
271+
proteome_name_to_path = util.processInputProteomes(proteomes, combined_proteome_faa, genome_name_to_path, logObject, sanity_check=sanity_check_flag, allow_gzipped=False)
272272
except Exception as e:
273273
msg = 'Error: issues processing user-provided proteomes. Exiting ...'
274274
sys.stderr.write(msg + '\n')

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "skDER"
33
authors = [{name="Rauf Salamzade", email="salamzader@gmail.com"}]
4-
version = "1.3.0"
4+
version = "1.3.1"
55
description = "Program to select distinct representatives from an input set of microbial genomes."
66

77
[build-system]

src/skDER/util.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def downloadGTDBGenomes(taxa_name, gtdb_release, outdir, genome_listing_file, lo
204204
sys.stdout.write(msg + '\n')
205205
logObject.info(msg)
206206

207-
def processInputProteomes(proteomes, combined_proteome_faa, genome_to_path, logObject, sanity_check=False):
207+
def processInputProteomes(proteomes, combined_proteome_faa, genome_to_path, logObject, sanity_check=False, allow_gzipped=True):
208208
combined_proteome_handle = open(combined_proteome_faa, 'a+')
209209
proteome_name_to_path = {}
210210
for p in proteomes:
@@ -217,7 +217,11 @@ def processInputProteomes(proteomes, combined_proteome_faa, genome_to_path, logO
217217
if proteome_file.endswith('.gz'):
218218
proteome_name = '.'.join(proteome_file.split('/')[-1][:-3].split('.')[:-1])
219219
suffix = proteome_file[:-3].split('.')[-1].lower()
220-
220+
if not allow_gzipped:
221+
msg = 'Warning: proteome %s is gzipped. Skipping ...' % proteome_file
222+
sys.stderr.write(msg + '\n')
223+
logObject.warning(msg)
224+
continue
221225
if proteome_name in genome_to_path:
222226
msg = 'Warning: proteome %s has the same name as a genome. Skipping ...' % proteome_file
223227
logObject.warning(msg)
@@ -262,7 +266,11 @@ def processInputProteomes(proteomes, combined_proteome_faa, genome_to_path, logO
262266
if proteome_file.endswith('.gz'):
263267
proteome_name = '.'.join(proteome_file.split('/')[-1][:-3].split('.')[:-1])
264268
suffix = proteome_file.split('/')[-1][:-3].split('.')[-1].lower()
265-
269+
if not allow_gzipped:
270+
msg = 'Warning: proteome %s is gzipped. Skipping ...' % proteome_file
271+
sys.stderr.write(msg + '\n')
272+
logObject.warning(msg)
273+
continue
266274
if proteome_name in genome_to_path:
267275
msg = 'Warning: proteome %s has the same name as a genome. Skipping ...' % proteome_file
268276
logObject.warning(msg)

0 commit comments

Comments
 (0)