Skip to content

Commit

Permalink
don't pass user-defined deflines to GFF3 route
Browse files Browse the repository at this point in the history
and warn the user if they are asking for a GFF output with FASTA defline
specifications.
  • Loading branch information
meren committed Nov 5, 2024
1 parent df9ec0e commit 4cf465f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/anvi-get-sequences-for-gene-calls
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ def export_from_contigs(args):
gene_caller_ids_list=gene_caller_ids,
output_file_path=args.output_file,
simple_headers=not args.report_extended_deflines,
list_defline_variables=args.list_defline_variables,
wrap=args.wrap
)

if args.export_gff3 and (args.list_defline_variables or args.defline_format):
raise ConfigError("User-defined deflines for gene sequence output files is not compatible with the "
"GFF3 output mode. Sorry :/")

if args.export_gff3:
if args.get_aa_sequences:
raise ConfigError("AA sequences can only be reported in FASTA format, please remove the --export-gff3 flag to continue.")
Expand All @@ -64,7 +67,8 @@ def export_from_contigs(args):
if args.annotation_source:
raise ConfigError("A functional annotation source is only relevant for the GFF output format.")
c.get_sequences_for_gene_callers_ids(**func_kwargs, report_aa_sequences=args.get_aa_sequences, flank_length=args.flank_length,
output_file_path_external_gene_calls=args.external_gene_calls, defline_format=args.defline_format)
output_file_path_external_gene_calls=args.external_gene_calls, defline_format=args.defline_format,
list_defline_variables=args.list_defline_variables)


def export_from_genomes_storage(genomes_storage_db_path, output_file_path):
Expand Down

0 comments on commit 4cf465f

Please sign in to comment.