def test_ncbi_stockholm( namespace_base, path_ncbi_stockholm, path_ncbi_stockholm_targets, tmp_path, ): """ncfp collects correct coding sequences for NCBI/Stockholm input. This test was added as a check for the fix in issue 31. """ # Modify default arguments infile = path_ncbi_stockholm outdir = tmp_path / "ncbi_stockholm" args = modify_namespace(namespace_base, infname=infile, outdirname=outdir, stockholm=True) # Run ersatz command-line ncfp.run_main(args) # Compare output (should be no skipped files) check_files( outdir, path_ncbi_stockholm_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta"), )
def test_small_stockholm_use_protein_id( namespace_base, path_uniprot_stockholm_small, path_uniprot_stockholm_small_use_proteinid_targets, tmp_path, ): """ncfp collects correct coding sequences for small UniProt/Stockholm input.""" # Modify default arguments infile = path_uniprot_stockholm_small outdir = tmp_path / "small_stockholm_use_proteinid" args = modify_namespace( namespace_base, infname=infile, outdirname=outdir, stockholm=True, use_protein_ids=True, ) # Run ersatz command-line ncfp.run_main(args) # Compare output (should be no skipped files) check_files( outdir, path_uniprot_stockholm_small_use_proteinid_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta"), )
def test_basic_ncbi(namespace_base, path_ncbi, path_ncbi_targets, tmp_path): """ncfp collects correct coding sequences for basic NCBI input.""" # Modify default arguments infile = path_ncbi outdir = tmp_path / "basic_ncbi" args = modify_namespace(namespace_base, infname=infile, outdirname=outdir) # Run ersatz command-line ncfp.run_main(args) # Compare output check_files(outdir, path_ncbi_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta"))
def test_alternative_start(namespace_base, path_altstart, path_altstart_targets, tmp_path): """ncfp collects correct coding sequences for NCBI input with alternative start codon.""" infile = path_altstart outdir = tmp_path / "alternative_start" args = modify_namespace(namespace_base, infname=infile, outdirname=outdir, alternative_start_codon=True) # Run ersatz command-line ncfp.run_main(args) # Compare output check_files(outdir, path_altstart_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta"))
def test_basic_uniprot(namespace_base, path_uniprot, path_uniprot_targets, tmp_path, mock_basic_uniprot): """ncfp collects correct coding sequences for basic UniProt input.""" # Modify default arguments infile = path_uniprot outdir = tmp_path / "basic_uniprot" args = modify_namespace(namespace_base, infname=infile, outdirname=outdir) # Run ersatz command-line ncfp.run_main(args) # Compare output check_files( outdir, path_uniprot_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta", "skipped.fasta"), )
def test_basic_stockholm(namespace_base, path_stockholm, path_stockholm_targets, tmp_path): """ncfp collects correct coding sequences for basic UniProt/Stockholm input.""" # Modify default arguments infile = path_stockholm outdir = tmp_path / "basic_stockholm" args = modify_namespace(namespace_base, infname=infile, outdirname=outdir, stockholm=True) # Run ersatz command-line ncfp.run_main(args) # Compare output (should be no skipped files) check_files( outdir, path_stockholm_targets, ("ncfp_aa.fasta", "ncfp_nt.fasta"), )